Cpu

Typedefs | Enumerations | Functions | Variables
Cpu
Eina » Tools

Cpu and architecture related helpers. More...

## Typedefs
typedef enum _Eina_Cpu_Features | Eina_Cpu_Features
| Enumerates different hardware architectures.

## Enumerations
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 }

## Functions
EAPI Eina_Cpu_Features | eina_cpu_features_get (void)
| Cpu features accessor. More...
EAPI int | eina_cpu_count (void)
| Get the current number of processors. More...
EAPI int | eina_cpu_page_size (void)
| Get 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...

## Variables
EAPI Eina_Cpu_Features | eina_cpu_features
| Global hardware architecture handler. More...

## Detailed Description

Cpu and architecture related helpers.

## Function Documentation

## ◆ eina_cpu_features_get()

EAPI Eina_Cpu_Features eina_cpu_features_get | ( | void |  | ) |

Cpu features accessor.

Returns
  the current cpu features

## ◆ eina_cpu_count()

EAPI int eina_cpu_count | ( | void |  | ) |

Get the current number of processors.

Returns
  the number of processors that are online, that is available when the function is called.

Referenced by ecore_thread_max_reset(), ecore_thread_max_set(), and efl::eina::thread::hardware_concurrency().

## ◆ eina_cpu_page_size()

EAPI int eina_cpu_page_size | ( | void |  | ) |

Get 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

  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

  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

  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.

## Variable Documentation

## ◆ eina_cpu_features

EAPI Eina_Cpu_Features eina_cpu_features

Global hardware architecture handler.

Returns
  the current cpu features