Compute Library
 22.05
CPUInfo Class Referencefinal

#include <CPPTypes.h>

Public Member Functions

 CPUInfo (CPUInfo const &)=delete
 
 CPUInfo (CPUInfo &&)=delete
 
CPUInfooperator= (CPUInfo const &)=delete
 
CPUInfooperator= (CPUInfo &&)=delete
 
bool has_fp16 () const
 Checks if the cpu model supports fp16. More...
 
bool has_bf16 () const
 Checks if the cpu model supports bf16. More...
 
bool has_svebf16 () const
 Checks if the cpu model supports bf16. More...
 
bool has_dotprod () const
 Checks if the cpu model supports dot product. More...
 
bool has_svef32mm () const
 Checks if the cpu model supports floating-point matrix multiplication. More...
 
bool has_i8mm () const
 Checks if the cpu model supports integer matrix multiplication. More...
 
bool has_svei8mm () const
 Checks if the cpu model supports integer matrix multiplication. More...
 
bool has_sve () const
 Checks if the cpu model supports sve. More...
 
bool has_sve2 () const
 Checks if the cpu model supports sve2. More...
 
CPUModel get_cpu_model (unsigned int cpuid) const
 Gets the cpu model for a given cpuid. More...
 
CPUModel get_cpu_model () const
 Gets the current thread's cpu model. More...
 
cpuinfo::CpuIsaInfo get_isa () const
 Gets the current cpu's ISA information. More...
 
unsigned int get_L1_cache_size () const
 Gets the L1 cache size. More...
 
unsigned int get_L2_cache_size () const
 Gets the L2 cache size. More...
 
unsigned int get_cpu_num () const
 Return the maximum number of CPUs present. More...
 

Static Public Member Functions

static CPUInfoget ()
 Access the KernelLibrary singleton. More...
 

Detailed Description

Definition at line 65 of file CPPTypes.h.

Constructor & Destructor Documentation

◆ CPUInfo() [1/2]

CPUInfo ( CPUInfo const &  )
delete

◆ CPUInfo() [2/2]

CPUInfo ( CPUInfo &&  )
delete

Member Function Documentation

◆ get()

◆ get_cpu_model() [1/2]

CPUModel get_cpu_model ( unsigned int  cpuid) const

Gets the cpu model for a given cpuid.

Parameters
[in]cpuidthe id of the cpu core to be retrieved,
Returns
the CPUModel of the cpuid queiried.

Definition at line 109 of file CPPTypes.cpp.

Referenced by CpuConv2d::get_convolution_method(), and main().

110 {
111  return _impl->info.cpu_model(cpuid);
112 }

◆ get_cpu_model() [2/2]

CPUModel get_cpu_model ( ) const

Gets the current thread's cpu model.

Returns
Current thread's CPUModel

Definition at line 104 of file CPPTypes.cpp.

105 {
106  return _impl->info.cpu_model();
107 }

◆ get_cpu_num()

unsigned int get_cpu_num ( ) const

Return the maximum number of CPUs present.

Returns
Number of CPUs

Definition at line 54 of file CPPTypes.cpp.

Referenced by main().

55 {
56  return _impl->info.num_cpus();
57 }

◆ get_isa()

◆ get_L1_cache_size()

unsigned int get_L1_cache_size ( ) const

Gets the L1 cache size.

Returns
the size of the L1 cache

Definition at line 119 of file CPPTypes.cpp.

120 {
121  return _impl->L1_cache_size;
122 }

◆ get_L2_cache_size()

unsigned int get_L2_cache_size ( ) const

Gets the L2 cache size.

Returns
the size of the L1 cache

Definition at line 124 of file CPPTypes.cpp.

Referenced by GemmInterleavedPretransposed2d< strategy, To, Tr >::GemmInterleavedPretransposed2d().

125 {
126  return _impl->L2_cache_size;
127 }

◆ has_bf16()

bool has_bf16 ( ) const

Checks if the cpu model supports bf16.

Returns
true of the cpu supports bf16, false otherwise

Definition at line 64 of file CPPTypes.cpp.

Referenced by arm_compute::error_on_unsupported_cpu_bf16(), and main().

65 {
66  return _impl->info.has_bf16();
67 }

◆ has_dotprod()

bool has_dotprod ( ) const

Checks if the cpu model supports dot product.

Returns
true of the cpu supports dot product, false otherwise

Definition at line 74 of file CPPTypes.cpp.

Referenced by main().

75 {
76  return _impl->info.has_dotprod();
77 }

◆ has_fp16()

bool has_fp16 ( ) const

Checks if the cpu model supports fp16.

Returns
true of the cpu supports fp16, false otherwise

Definition at line 59 of file CPPTypes.cpp.

Referenced by arm_compute::error_on_unsupported_cpu_fp16(), and main().

60 {
61  return _impl->info.has_fp16();
62 }

◆ has_i8mm()

bool has_i8mm ( ) const

Checks if the cpu model supports integer matrix multiplication.

Returns
true of the cpu supports integer matrix multiplication, false otherwise

Definition at line 84 of file CPPTypes.cpp.

85 {
86  return _impl->info.has_i8mm();
87 }

◆ has_sve()

bool has_sve ( ) const

Checks if the cpu model supports sve.

Returns
true of the cpu supports sve, false otherwise

Definition at line 94 of file CPPTypes.cpp.

Referenced by main().

95 {
96  return _impl->info.has_sve();
97 }

◆ has_sve2()

bool has_sve2 ( ) const

Checks if the cpu model supports sve2.

Returns
true of the cpu supports sve2, false otherwise

Definition at line 99 of file CPPTypes.cpp.

100 {
101  return _impl->info.has_sve2();
102 }

◆ has_svebf16()

bool has_svebf16 ( ) const

Checks if the cpu model supports bf16.

Returns
true of the cpu supports bf16, false otherwise

Definition at line 69 of file CPPTypes.cpp.

70 {
71  return _impl->info.has_svebf16();
72 }

◆ has_svef32mm()

bool has_svef32mm ( ) const

Checks if the cpu model supports floating-point matrix multiplication.

Returns
true of the cpu supports floating-point matrix multiplication, false otherwise

Definition at line 79 of file CPPTypes.cpp.

80 {
81  return _impl->info.has_svef32mm();
82 }

◆ has_svei8mm()

bool has_svei8mm ( ) const

Checks if the cpu model supports integer matrix multiplication.

Returns
true of the cpu supports integer matrix multiplication, false otherwise

Definition at line 89 of file CPPTypes.cpp.

90 {
91  return _impl->info.has_svei8mm();
92 }

◆ operator=() [1/2]

CPUInfo& operator= ( CPUInfo const &  )
delete

◆ operator=() [2/2]

CPUInfo& operator= ( CPUInfo &&  )
delete

The documentation for this class was generated from the following files: