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

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

flt32v2_t | Vector of 2 elements of 32-bit wide floating-point type |

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 |

# Union types

Type | Description |
---|---|

Unsigned integer types | |

uint8v16_union | Union that holds uint8v16_t vector and array of 16 elements of 8-bit unsigned integer type |

uint16v8_union | Union that holds uint16v8_t vector and array of 8 elements of 16-bit unsigned integer type |

uint32v4_union | Union that holds uint32v4_t vector and array of 4 elements of 32-bit unsigned integer type |

uint64v2_union | Union that holds uint64v2_t vector and array of 2 elements of 64-bit unsigned integer type |

Signed integer types | |

sint8v16_union | Union that holds sint8v16_t vector and array of 16 elements of 8-bit unsigned integer type |

sint16v8_union | Union that holds sint16v8_t vector and array of 8 elements of 16-bit unsigned integer type |

sint32v4_union | Union that holds sint32v4_t vector and array of 4 elements of 32-bit unsigned integer type |

sint64v2_union | Union that holds sint64v2_t vector and array of 2 elements of 64-bit unsigned integer type |

Bit field types | |

bit8v16_union | Union that holds bit8v16_t vector and array of 16 elements of 8-bit bit field type |

bit16v8_union | Union that holds bit16v8_t vector and array of 8 elements of 16-bit bit field type |

bit32v4_union | Union that holds bit32v4_t vector and array of 4 elements of 32-bit bit field type |

bit64v2_union | Union that holds bit64v2_t vector and array of 2 elements of 64-bit bit field type |

Character types | |

char8v16_union | Union that holds char8v16_t vector and array of 16 elements of 8-bit character type |

char16v8_union | Union that holds char16v8_t vector and array of 8 elements of 16-bit character type |

char32v4_union | Union that holds char32v4_t vector and array of 4 elements of 32-bit character type |

Floating-point types | |

flt32v2_union | Union that holds flt32v2_t vector and array of 2 elements of 32-bit wide floating-point type |

flt32v4_union | Union that holds flt32v4_t vector and array of 4 elements of 32-bit wide floating-point type |

flt64v2_union | Union that holds flt64v2_t vector and array of 2 elements of 64-bit wide floating-point type |

Other types | |

sizev2_union | Union that holds sizev2_t vector and array of 2 elements of object size type |

ptrv2_union | Union that holds ptr2_t vector and array of 2 elements of pointer type |

time2_union | Union that holds time2_t vector and array of 2 elements of unix time type |