Cpu and architecture related helpers.
More...
|
#define | MIN(x, y) (((x) > (y)) ? (y) : (x)) |
|
#define | MAX(x, y) (((x) > (y)) ? (x) : (y)) |
|
|
typedef enum _Eina_Cpu_Features | Eina_Cpu_Features |
| Enumerates different hardware architectures.
|
|
|
enum | _Eina_Cpu_Features {
EINA_CPU_MMX = 0x00000001,
EINA_CPU_SSE = 0x00000002,
EINA_CPU_SSE2 = 0x00000004,
EINA_CPU_SSE3 = 0x00000008,
EINA_CPU_ALTIVEC = 0x00000010,
EINA_CPU_VIS = 0x00000020,
EINA_CPU_NEON = 0x00000040,
EINA_CPU_SSSE3 = 0x00000080,
EINA_CPU_SSE41 = 0x00000100,
EINA_CPU_SSE42 = 0x00000200,
EINA_CPU_SVE = 0x00000400
} |
|
|
Eina_Cpu_Features | eina_cpu_features_get (void) |
| Cpu features accessor. More...
|
|
int | eina_cpu_count (void) |
| Gets the current number of processors. More...
|
|
int | eina_cpu_page_size (void) |
| Gets the current virtual page size. More...
|
|
static unsigned short | eina_swap16 (unsigned short x) |
| Reverses the byte order of a 16-bit (destination) register. More...
|
|
static unsigned int | eina_swap32 (unsigned int x) |
| Reverses the byte order of a 32-bit (destination) register. More...
|
|
static unsigned long long | eina_swap64 (unsigned long long x) |
| Reverses the byte order of a 64-bit (destination) register. More...
|
|
static unsigned short | eina_htons (unsigned short host) |
|
static unsigned int | eina_htonl (unsigned int host) |
|
static unsigned long long | eina_htonll (unsigned long long host) |
|
static unsigned short | eina_ntohs (unsigned short net) |
|
static unsigned int | eina_ntohl (unsigned int net) |
|
static unsigned long long | eina_ntohll (unsigned long long net) |
|
Cpu and architecture related helpers.
◆ eina_cpu_features_get()
Cpu features accessor.
- Returns
- the current cpu features
-
◆ eina_cpu_count()
int eina_cpu_count |
( |
void |
| ) |
|
◆ eina_cpu_page_size()
int eina_cpu_page_size |
( |
void |
| ) |
|
Gets the current virtual page size.
- Returns
- The fixed length that represents the smallest unit of data for memory allocation performed by the operating system on behalf of the program, and for transfers between the main memory and any other auxiliary store.
Referenced by eina_mmap_safety_enabled_set().
◆ eina_swap16()
static unsigned short eina_swap16 |
( |
unsigned short |
x | ) |
|
|
inlinestatic |
Reverses the byte order of a 16-bit (destination) register.
- Parameters
-
[in] | x | The binary word to swap |
- Returns
- A byte order swapped 16-bit integer.
On big endian systems, the number is converted to little endian byte order. On little endian systems, the number is converted to big endian byte order.
◆ eina_swap32()
static unsigned int eina_swap32 |
( |
unsigned int |
x | ) |
|
|
inlinestatic |
Reverses the byte order of a 32-bit (destination) register.
- Parameters
-
[in] | x | The binary word to swap |
- Returns
- A byte order swapped 32-bit integer.
On big endian systems, the number is converted to little endian byte order. On little endian systems, the number is converted to big endian byte order.
◆ eina_swap64()
static unsigned long long eina_swap64 |
( |
unsigned long long |
x | ) |
|
|
inlinestatic |
Reverses the byte order of a 64-bit (destination) register.
- Parameters
-
[in] | x | The binary word to swap |
- Returns
- A byte order swapped 64-bit integer.
On big endian systems, the number is converted to little endian byte order. On little endian systems, the number is converted to big endian byte order.
◆ eina_cpu_features
Global hardware architecture handler.
- Returns
- the current cpu features