#pragma LOOP_UNROLL: Force Loop Unrolling

Scope

Function

Syntax
  #pragma LOOP_UNROLL 
  
Synonym

None

Arguments

None

Default

None

Description

This pragma performs loop unrolling for the next function. This is the same as setting the -Cu option for a subsequent single function.

Example

In the following example, the pragma unrolls a for loop.

Listing: Using the LOOP_UNROLL Pragma to Unroll a For Loop
#pragma LOOP_UNROLL
void F(void) {

  for (i=0; i<5; i++) { // unrolling this loop

  ...
See also

#pragma NO_LOOP_UNROLL: Disable Loop Unrolling

-Cu: Loop Unrolling