.. highlight:: c .. _pragma_loop_unroll: Unroll Loop ------------------------------- **Syntax** ``#pragma LEGUP loop unroll factor()`` **Description** Specifies a loop to be unrolled. **Parameters** +------------+---------+----------+---------+--------------+ | Parameter | Value | Optional | Default | Description | +============+=========+==========+=========+==============+ | ``factor`` | Integer | Yes | 1 | Unroll count | +------------+---------+----------+---------+--------------+ **Position** Before the beginning of the loop. .. Note:: If there is a loop label, the pragma should be placed after the label. **Examples** .. code-block:: c #pragma LEGUP loop unroll for (int i = 0; i < 10; i++) { ... } .. code-block:: c LOOP_LABEL: #pragma LEGUP loop unroll factor(2) while (i < 10) { ... } --------------------------------------------------------------------------------