Data typesTypes.h
LinAsm libraries define their own data types. They are separated into two categories: scalar and vector data types. Scalar types are just aliases to internal C and C++ types and have the same length and operations set. Vector types are custom types, which use gcc aggregates to hold vectors. LinAsm also define union types which can hold both types simultaneously. They are useful when you apply vector operations to the data, but also need to extract some elements of target vectors.
Contents
Scalar types
| Type | Description | C/C++ equivalent |
|---|---|---|
| Unsigned integer types | ||
| uint8_t | 8-bit wide unsigned integer type | unsigned char |
| uint16_t | 16-bit wide unsigned integer type | unsigned short |
| uint32_t | 32-bit wide unsigned integer type | unsigned int |
| uint64_t | 64-bit wide unsigned integer type | unsigned long long |
| Signed integer types | ||
| sint8_t | 8-bit wide signed integer type | signed char |
| sint16_t | 16-bit wide signed integer type | signed short |
| sint32_t | 32-bit wide signed integer type | signed int |
| sint64_t | 64-bit wide signed integer type | signed long long |
| Bit field types | ||
| bit8_t | 8-bit wide bit field type | unsigned char |
| bit16_t | 16-bit wide bit field type | unsigned short |
| bit32_t | 32-bit wide bit field type | unsigned int |
| bit64_t | 64-bit wide bit field type | unsigned long long |
| Character types | ||
| char8_t | 8-bit wide character type | char |
| char16_t | 16-bit wide character type | short |
| char32_t | 32-bit wide character type | int |
| Floating-point types | ||
| flt32_t | 32-bit wide floating-point type | float |
| flt64_t | 64-bit wide floating-point type | double |
| Other types | ||
| size_t | Integer type that holds object size | unsigned long int |
| ptr_t | Integer type that can hold pointer value | signed long int |
| time_t | Integer type that holds unix time value | signed long long |
| error_t | Integer type that holds errno value | unsigned int |
| enum_t | Integer type that can hold enumeration value | unsigned int |
| Boolean type | ||
| bool | Boolean type for C programs | _Bool |
SSE Vector types
| Type | Description |
|---|---|
| Unsigned integer types | |
| uint8v16_t | Vector of 16 elements of 8-bit wide unsigned integer type |
| uint16v8_t | Vector of 8 elements of 16-bit wide unsigned integer type |
| uint32v4_t | Vector of 4 elements of 32-bit wide unsigned integer type |
| uint64v2_t | Vector of 2 elements of 64-bit wide unsigned integer type |
| Signed integer types | |
| sint8v16_t | Vector of 16 elements of 8-bit wide signed integer type |
| sint16v8_t | Vector of 8 elements of 16-bit wide signed integer type |
| sint32v4_t | Vector of 4 elements of 32-bit wide signed integer type |
| sint64v2_t | Vector of 2 elements of 64-bit wide signed integer type |
| Bit field types | |
| bit8v16_t | Vector of 16 elements of 8-bit wide bit field type |
| bit16v8_t | Vector of 8 elements of 16-bit wide bit field type |
| bit32v4_t | Vector of 4 elements of 32-bit wide bit field type |
| bit64v2_t | Vector of 2 elements of 64-bit wide bit field type |
| Character types | |
| char8v16_t | Vector of 16 elements of 8-bit wide character type |
| char16v8_t | Vector of 8 elements of 16-bit wide character type |
| char32v4_t | Vector of 4 elements of 32-bit wide character type |
| Floating-point types | |
| flt32v4_t | Vector of 4 elements of 32-bit wide floating-point type |
| flt64v2_t | Vector of 2 elements of 64-bit wide floating-point type |
| Other types | |
| sizev2_t | Vector of 2 elements of object size type |
| ptrv2_t | Vector of 2 elements of pointer type |
| timev2_t | Vector of 2 elements of unix time type |
AVX Vector types
| Type | Description |
|---|---|
| Unsigned integer types | |
| uint8v32_t | Vector of 32 elements of 8-bit wide unsigned integer type |
| uint16v16_t | Vector of 16 elements of 16-bit wide unsigned integer type |
| uint32v8_t | Vector of 8 elements of 32-bit wide unsigned integer type |
| uint64v4_t | Vector of 4 elements of 64-bit wide unsigned integer type |
| Signed integer types | |
| sint8v32_t | Vector of 32 elements of 8-bit wide signed integer type |
| sint16v16_t | Vector of 16 elements of 16-bit wide signed integer type |
| sint32v8_t | Vector of 8 elements of 32-bit wide signed integer type |
| sint64v4_t | Vector of 4 elements of 64-bit wide signed integer type |
| Bit field types | |
| bit8v32_t | Vector of 32 elements of 8-bit wide bit field type |
| bit16v16_t | Vector of 16 elements of 16-bit wide bit field type |
| bit32v8_t | Vector of 8 elements of 32-bit wide bit field type |
| bit64v4_t | Vector of 4 elements of 64-bit wide bit field type |
| Character types | |
| char8v32_t | Vector of 32 elements of 8-bit wide character type |
| char1616_t | Vector of 16 elements of 16-bit wide character type |
| char32v8_t | Vector of 8 elements of 32-bit wide character type |
| Floating-point types | |
| flt32v8_t | Vector of 8 elements of 32-bit wide floating-point type |
| flt64v4_t | Vector of 4 elements of 64-bit wide floating-point type |
| Other types | |
| sizev4_t | Vector of 4 elements of object size type |
| ptrv4_t | Vector of 4 elements of pointer type |
| timev4_t | Vector of 4 elements of unix time type |