24 #ifndef ARM_COMPUTE_CPP_TYPES_H 25 #define ARM_COMPUTE_CPP_TYPES_H 77 return std::string(
"GENERIC");
81 return std::string(
"GENERIC_FP16");
85 return std::string(
"GENERIC_FP16_DOT");
89 return std::string(
"A53");
93 return std::string(
"A55r0");
97 return std::string(
"A55r1");
101 return std::string(
"X1");
105 return std::string(
"A73");
110 return std::string(
"GENERIC");
133 bool has_fp16()
const;
138 bool has_dotprod()
const;
145 CPUModel get_cpu_model(
unsigned int cpuid)
const;
155 unsigned int get_L1_cache_size()
const;
160 unsigned int get_L2_cache_size()
const;
165 void set_L1_cache_size(
unsigned int size);
170 void set_L2_cache_size(
unsigned int size);
175 void set_fp16(
const bool fp16);
180 void set_dotprod(
const bool dotprod);
186 void set_cpu_model(
unsigned int cpuid,
CPUModel model);
191 void set_cpu_num(
unsigned int cpu_count);
197 unsigned int get_cpu_num()
const;
200 std::vector<CPUModel> _percpu = {};
202 bool _dotprod =
false;
203 unsigned int _L1_cache_size = 32768;
204 unsigned int _L2_cache_size = 262144;
216 size_t get_total_in_kb()
const;
224 static const size_t ONE_GB_IN_KB = { 1035842 };
225 static const size_t TWO_GB_IN_KB = { ONE_GB_IN_KB * 2 };
238 int num_threads{ 1 };
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
CPUModel
CPU models - we only need to detect CPUs we have microarchitecture-specific code for.
Copyright (c) 2017-2021 Arm Limited.
std::string cpu_model_to_string(CPUModel val)
Convert a cpumodel value to a string.
Information about executing thread and CPU.
MemoryPolicy
Global memory policy.