The compiler will issue a warning when it encounters an unrecognized
pragma directive or pragma operator. The compiler will not expand any
pre-processor macros used within any pragma directive or pragma
operator.
Data Alignment Pragmas
The data alignment pragmas include
specified using these pragmas must be a power of two. The compiler will
reject uses of those pragmas that specify alignments that are not powers of
two.
#pragma align num
The
align num
It applies to the variable or field declaration that immediately follows the
pragma. Use of this pragma causes the compiler to generate the next vari-
able or field declaration aligned on a boundary specified by
The
pragma is useful for declaring arrays that need to be on a circu-
align
lar boundary. Such arrays might be required to make use of a bit-reversal
sorting algorithm that is implemented using the ADSP-219x processor's
bit reversal mode.
DAG1
#pragma align 256
int arr[128];
#pragma pad (alignopt)
The
#pragma pad (alignopt)
applies to
struct
restored by omitting
parentheses.
This pragma is effectively a shorthand for placing
every field within the
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
for ADSP-219x DSPs
pragma may be used before variable and field declarations.
may be applied to
definitions that follow, until the default alignment is
, for example, by
alignopt
definition.
struct
and
pragmas. Alignments
align
pad
struct
#pragma pad()
#pragma align
Compiler
.
num
definitions. It
with empty
before
1-121
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?
Questions and answers