24 #ifndef ARM_COMPUTE_CPP_TYPES_H 25 #define ARM_COMPUTE_CPP_TYPES_H 79 return std::string(
"GENERIC");
83 return std::string(
"KLEIN");
87 return std::string(
"GENERIC_FP16");
91 return std::string(
"GENERIC_FP16_DOT");
95 return std::string(
"A53");
99 return std::string(
"A55r0");
103 return std::string(
"A55r1");
107 return std::string(
"X1");
111 return std::string(
"A73");
116 return std::string(
"GENERIC");
216 std::vector<CPUModel> _percpu = {};
218 bool _dotprod =
false;
220 unsigned int _L1_cache_size = 32768;
221 unsigned int _L2_cache_size = 262144;
void set_L2_cache_size(unsigned int size)
Set the L2 cache size.
bool has_sve() const
Checks if the cpu model supports sve.
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
bool has_fp16() const
Checks if the cpu model supports fp16.
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.
static const size_t TWO_GB_IN_KB
static MemoryPolicy get_policy()
bool has_dotprod() const
Checks if the cpu model supports dot product.
void set_cpu_model(unsigned int cpuid, CPUModel model)
Set the cpumodel for a given cpu core.
CPUInfo & operator=(const CPUInfo &cpuinfo)=delete
Disable copy constructor and assignment operator to avoid copying the vector of CPUs each time CPUInf...
unsigned int get_cpu_num() const
Return the maximum number of CPUs present.
unsigned int get_L1_cache_size() const
Gets the L1 cache size.
unsigned int get_L2_cache_size() const
Gets the L2 cache size.
size_t get_total_in_kb() const
Return the total amount of RAM memory in the system expressed in KB.
static void set_policy(MemoryPolicy policy)
Information about executing thread and CPU.
void set_sve(const bool sve)
Set sve support.
CPUModel get_cpu_model() const
Gets the current thread's cpu model.
void set_L1_cache_size(unsigned int size)
Set the L1 cache size.
static const size_t ONE_GB_IN_KB
Common memory sizes expressed in Kb to avoid having them duplicated throughout the code.
void set_dotprod(const bool dotprod)
Set dot product support.
MemoryPolicy
Global memory policy.
void set_fp16(const bool fp16)
Set fp16 support.
void set_cpu_num(unsigned int cpu_count)
Set max number of cpus.