29 #if !defined(BARE_METAL) 48 if(_percpu.size() > cpuid)
50 _percpu[cpuid] = model;
56 return _percpu.size();
70 if(cpuid < _percpu.size())
72 return _percpu[cpuid];
79 return _L1_cache_size;
84 _L1_cache_size = size;
89 return _L2_cache_size;
94 _L2_cache_size = size;
99 _percpu.resize(cpu_count);
113 #if defined(BARE_METAL) || defined(__APPLE__) || (!defined(__arm__) && !defined(__aarch64__)) void set_L2_cache_size(unsigned int size)
Set the L2 cache size.
bool has_fp16() const
Checks if the cpu model supports fp16.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
CPUModel
CPU models - we only need to detect CPUs we have microarchitecture-specific code for.
Copyright (c) 2017-2021 Arm Limited.
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.
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.
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.
void set_dotprod(const bool dotprod)
Set dot product support.
void set_fp16(const bool fp16)
Set fp16 support.
void set_cpu_num(unsigned int cpu_count)
Set max number of cpus.