ALF and alf are the prefixes for the namespace for ALF. For normal function prototypes and data structure declarations, use all lowercase characters with underscores (_) separating the words. For macro definitions, use all uppercase characters with underscores separating the words.
int | This data type is assumed to be signed by default on both the host and accelerator. The size of this data type is defined by the Application Binary Interface (ABI) of the architecture. However, the minimum size of this data type is 32 bits. The actual size of this data type might differ between the host and the accelerator architectures. |
unsigned int | This data type is assumed to be the same size as that of int. |
char | This data type is not assumed to be signed or unsigned. The size of this data structure, however, must be 8 bits. |
long | This data type is not used in the API definitions because it might not be uniformly defined across platforms. |
void * | The size of this data type is defined by the ABI of the corresponding architecture and compiler implementation. Note that the actual size of this data type might differ between the host and accelerator architectures. |
The basic APIs and data structures of ALF are designed with cross-platform portability in mind. Platform-dependent implementation details are not exposed in the core APIs.
The enumeration type ALF_DATA_TYPE_T defines the data types for data movement operations between the hosts and the accelerators. The ALF runtime does byte swapping automatically if the endianness of the host and the accelerators are different. To disable endian swapping, you can use the data type ALF_DATA_BYTE.
ALF_DATA_BYTE | For data types that are independent of byte orders |
ALF_DATA_INT16 | For two bytes signed / unsigned integer types |
ALF_DATA_INT32 | For four bytes signed / unsigned integer types |
ALF_DATA_INT64 | For eight bytes signed / unsigned integer types |
ALF_DATA_FLOAT | For four bytes float point types |
ALF_DATA_DOUBLE | For eight bytes float point types |
ALF_DATA_ADDR32 | 32-bit address |
ALF_DATA_ADDR64 | 64-bit address |