Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 7/13/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

align

Directs the compiler to align the variable to a specified boundary and a specified offset.

Syntax

Windows

__declspec(align(n))

Linux

__attribute__((aligned(n)))

For portability on Linux OS, you should use the syntax form __attribute__((aligned(n))). This form is compatible with the GNU compiler.

Arguments

n

Specifies the alignment. The compiler will align the variable to an n-byte boundary.

Description

This keyword directs the compiler to align the variable to an n-byte boundary.