Alignment - 2025.2 English - UG1079

AI Engine Kernel and Graph Programming Guide (UG1079)

Document ID
UG1079
Release Date
2025-11-26
Version
2025.2 English

Use the alignas standard C specifier to ensure proper alignment of local memory. In the following example, the reals aligns to a 16 byte boundary.

alignas(16) const int32 reals[8] = 
       {32767, 23170, 0, -23170, -32768, -23170, 0, 23170};
       //align to 16 bytes boundary, equivalent to "alignas(v4int32)"