- Select ref document -

SDK Align API documentation

version 1.2.144

<dmsdk/dlib/align.h>

Alignment macros. Use for compiler compatibility

Macros

DM_ALIGN

DM_ALIGN(x, a)

Align a value to a boundary

Parameters

x

int value to align

a

int alignment boundary

x

int value to align

a

int alignment boundary

Examples

Align 24 to 16 alignment boundary. results is 16:

int result = DM_ALIGN(24, 16);

DM_ALIGNED

DM_ALIGNED(a)

Data structure alignment

Parameters

a

int number of bytes to align to

a

int number of bytes to align to

Examples

Align m_Data to 16 bytes alignment boundary:

int DM_ALIGNED(16) m_Data;