Sdk align api documentation

Alignment macros. Use for compiler compatibility

Include: #include <dmsdk/dlib/align.h>
MACROS
DM_ALIGNED(a) data structure alignment macro
DM_ALIGN(x, a) value alignment macro

Macros

DM_ALIGNED

data structure alignment macro

Data structure alignment

a number of bytes to align to

EXAMPLES

Align m_Data to 16 bytes alignment boundary:
int DM_ALIGNED(16) m_Data;

DM_ALIGN

value alignment macro

Align a value to a boundary

x value to align
a alignment boundary

EXAMPLES

Align 24 to 16 alignment boundary. results is 32:
int result = DM_ALIGN(24, 16);