Pragma Loop_Count(Min, Max, Modulo); Pragma Vector_For - Analog Devices VISUALDSP++ 3.5 Manual

C/c++ compiler and library for adsp-219x processors
Hide thumbs Also See for VISUALDSP++ 3.5:
Table of Contents

Advertisement

C/C++ Compiler Language Extensions

#pragma loop_count(min, max, modulo)

The
loop_count(min, max, modulo)
it describes. It asserts that the loop will iterate at least
than
times, and a multiple of
max
the optimizer to omit loop guards, to decide whether the loop is worth
completely unrolling, and whether code need be generated for odd itera-
tions. The last two arguments can be omitted if they are unknown.
For example,
int i;
#pragma loop_count(24, 48, 8)
for (i=0; i < n; i++)

#pragma vector_for

The
#pragma vector_for
two iterations of the loop in parallel. The
force the compiler to vectorize the loop; the optimizer checks various
properties of the loop and does not vectorize it if it believes it is unsafe or
if it cannot deduce that the various properties necessary for the vectoriza-
tion transformation are valid.
Strictly speaking, the pragma simply disables checking for loop-carried
dependencies.
void copy(short *a, short *b) {
int i;
#pragma vector_for
for (i=0; i<100; i++)
a[i] = b[i];
}
In cases where vectorization is impossible (for example, if array
aligned on a word boundary, but array
in the assertion made by
other optimizations.
1-124
modulo
notifies the optimizer that it is safe to execute
vector_for
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
pragma appears just before the loop
min
times. This information enables
pragma does not
vector_for
was not), the information given
b
may still be put to good use in aiding
for ADSP-219x DSPs
times, no more
were
a

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Related Products for Analog Devices VISUALDSP++ 3.5

Table of Contents