.. highlight:: c .. _pragma_loop_pipeline: Pipeline Loop ------------------------------- **Syntax** ``#pragma LEGUP loop pipeline II()`` **Description** This pragma enables pipelining for a given loop in the code. Loop pipelining allows a new iteration of the loop to begin before the current one has completed, achieving higher throughput. In a loop nest, only the innermost loop can be pipelined. **Parameters** +-----------+---------+----------+---------+------------------------------+ | Parameter | Value | Optional | Default | Description | +===========+=========+==========+=========+==============================+ | ``II`` | Integer | Yes | 1 | Pipeline initiation interval | +-----------+---------+----------+---------+------------------------------+ **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 pipeline II(2) for (int i = 0; i < 10; i++) { ... } .. code-block:: c LOOP_LABEL: #pragma LEGUP loop pipeline while (i < 10) { ... } --------------------------------------------------------------------------------