# Intel-supported Pragma Reference

The Intel® C++ Compiler supports the following pragmas to ensure compatibility with other compilers.

## Pragmas Compatible with the Microsoft* Compiler

The following pragmas are compatible with the Microsoft* compiler. For more information about these pragmas, go to the Microsoft* Developer Network (http://msdn.microsoft.com).

Pragma | Description
--- | ---
`alloc_text` | Names the code section where the specified function definitions are to reside.
`auto_inline` | Excludes any function defined within the range where off is specified from being considered as candidates for automatic inline expansion.
`bss_seg` | Indicates to the compiler the segment where uninitialized variables are stored in the .obj file.
`check_stack` | The on argument indicates that stack checking should be enabled for functions that follow and the off argument indicates that stack checking should be disabled for functions that follow.
`code_seg` | Specifies a code section where functions are to be allocated.
`comment` | Places a comment record into an object file or executable file.
`component` | Controls collecting of browse information or dependency information from within source files.
`conform` | Specifies the run-time behavior of the `/Zc:forScope` compiler option.
`const_seg` | Specifies the segment where functions are stored in the .obj file.
`data_seg` | Specifies the default section for initialized data.
`deprecated` | Indicates that a function, type, or any other identifier may not be supported in a future release or indicates that a function, type, or any other identifier should not be used any more.
`fenv_access` | Informs an implementation that a program may test status flags or run under a non-default control mode.
`float_control` | Specifies floating-point behavior for a function.
`fp_contract` | Allows or disallows the implementation to contract expressions.
`loop` | Controls how the loop code will be considered or excluded from consideration by the auto-vectorizer.
`init_seg` | Specifies the section to contain C++ initialization code for the translation unit.
`message` | Displays the specified string literal to the standard output device (`stdout`).
`optimize` | Specifies optimizations to be performed on functions below the pragma or until the next optimize pragma; implemented to partly support the Microsoft* implementation of same pragma; for the Intel® C++ Compiler implementation, see the `optimize` reference page.
`pointers_to_members` | Specifies whether a pointer to a class member can be declared before its associated class definition and is used to control the pointer size and the code required to interpret the pointer.
`pop_macro` | Sets the value of the specified macro to the value on the top of the stack.
`push_macro` | Saves the value of the specified macro on the top of the stack.
`region/endregion` | Specifies a code segment in the Microsoft* Visual Studio* Code Editor that expands and contracts by using the outlining feature.
`section` | Creates a section in an .obj file. Once a section is defined, it remains valid for the remainder of the compilation.
`vtordisp` | The on argument enables the generation of hidden `vtordisp` members and the off disables them. push argument pushes the current `vtordisp` setting to the internal compiler stack. pop argument removes the top record from the compiler stack and restores the removed value of `vtordisp`.
`warning` | Allows selective modification of the behavior of compiler warning messages.
`weak` | Declares symbol you enter to be weak.

## OpenMP* Standard Pragmas

The Intel® C++ Compiler currently supports OpenMP* TR4: Version 5.0 pragmas, as listed below. For more information about these pragmas, reference the OpenMP* TR4: Version 5.0 specification.

Intel-specific clauses are noted in the affected pragma description.

Pragma | Description
--- | ---
omp atomic | Specifies a computation that must be executed atomically.
omp barrier | Specifies a point in the code where each thread must wait until all threads in the team arrive.
omp cancel | Requests cancellation of the innermost enclosing region of the type specified, and causes the encountering task to proceed to the end of the cancelled construct.
omp cancellation point | Defines a point at which implicit or explicit tasks check to see if cancellation has been requested for the innermost enclosing region of the type specified. This construct does not implement a synchronization between threads or tasks.
omp critical | Specifies a code block that is restricted to access by only one thread at a time.
omp declare reduction | Declares User-Defined Reduction (UDR) functions (reduction identifiers) that can be used as reduction operators in a reduction clause.
omp declare simd | Creates a version of a function that can process multiple arguments using Single Instruction Multiple Data (SIMD) instructions from a single invocation from a SIMD loop.
omp declare target | Specifies functions and variables that are created or mapped to a device.
omp distribute | Specifies that the iterations of one or more loops should be distributed among the master threads of all thread teams in a league.
omp distribute parallel for | Specifies a loop that can be executed in parallel by multiple threads that are members of multiple teams.
omp distribute parallel for simd | Specifies a loop that will be executed in parallel by multiple threads that are members of multiple teams. It will be executed concurrently using SIMD instructions.
omp distribute simd | Specifies a loop that will be distributed across the master threads of the teams region. It will be executed concurrently using SIMD instructions.
omp flush | Identifies a point at which the view of the memory by the thread becomes consistent with the memory.
omp for | Specifies a parallel loop. Each iteration of the loop is executed by one of the threads in the team.
omp for simd | Specifies that the iterations of the loop will be distributed across threads in the team. Iterations executed by each thread can also be executed concurrently using SIMD instructions.
omp inclusive_scan | Specifies that scan computations update the list items on each iteration.
omp master | Specifies the beginning of a code block that must be executed only once by the master thread of the team.
omp ordered | Specifies a block of code that the threads in a team must execute in the natural order of the loop iterations.
omp ordered simd | Specifies a block of code in the SIMD loop or SIMD-enabled function that should be executed serially, in a logical order of SIMD lanes.
omp ordered simd monotonic | Specifies a block of code in which the value of the new list item on each iteration of the associated SIMD loop(s) corresponds to the value of the original list item before entering the associated loop, plus the number of the iterations for which the conditional update happens prior to the current iteration, times linear-step. The value corresponding to the sequentially last iteration of the associated loop(s) is assigned to the original list item.
omp ordered simd overlap | Specifies a block of code that has to be executed scalar for overlapping inx values and parallel for different inx values within SIMD loop.
omp parallel | Specifies that a structured block should be run in parallel by a team of threads.
omp parallel for | Provides an abbreviated way to specify a parallel region containing a single FOR construct.
omp parallel for simd | Specifies a parallel construct that contains one for simd construct and no other statement.
omp parallel sections | Specifies a parallel construct that contains a single sections construct.
omp sections | Defines a region of structured blocks that will be distributed among the threads in a team.
omp simd | Transforms the loop into a loop that will be executed concurrently using SIMD instructions.
omp single | Specifies that a block of code is to be executed by only one thread in the team at a time.
omp target | Creates a device data environment and executes the construct on that device.
omp target data | Specifies that variables are mapped to a device data environment for the extent of the region.
omp target enter data | Specifies that variables are mapped to a device data environment.
omp target exit data | Specifies that variables are unmapped from a device data environment. .
omp target teams | Creates a device data environment and executes the construct on the same device. It also creates a league of thread teams with the master thread in each team executing the structured block.
omp target teams distribute | Creates a device data environment and then executes the construct on that device. It also specifies that loop iterations will be distributed among the master threads of all thread teams in a league created by a teams construct.
omp target teams distribute parallel for | Creates a device data environment and then executes the construct on that device. It also specifies a loop that can be executed in parallel by multiple threads that are members of multiple teams created by a teams construct.
omp target teams distribute parallel for simd | Creates a device data environment and then executes the construct on that device. It also specifies a loop that can be executed in parallel by multiple threads that are members of multiple teams created by a teams construct. The loop will be distributed across the teams, which will be executed concurrently using SIMD instructions.
omp target teams distribute simd | Creates a device data environment and then executes the construct on that device. It also specifies that loop iterations will be distributed among the master threads of all thread teams in a league created by a teams construct. It will be executed concurrently using SIMD instructions.
omp target update | Makes the items listed in the device data environment consistent between the device and host, in accordance with the motion clauses on the pragma.
omp task | Specifies the beginning of a code block whose execution may be deferred.
omp taskgroup | Causes the program to wait until the completion of all enclosed and descendant tasks.
omp taskwait | Specifies a wait on the completion of child tasks generated since the beginning of the current task.
omp taskyield | Specifies that the current task can be suspended at this point in favor of execution of a different task.
omp teams | Creates a league of thread teams inside a target region to execute a structured block in the master thread of each team.
omp teams distribute | Creates a league of thread teams to execute the structured block in the master thread of each team. It also specifies that loop iterations will be distributed among the master threads of all thread teams in a league created by a teams construct.
omp teams distribute parallel for | Creates a league of thread teams to execute a structured block in the master thread of each team. It also specifies a loop that can be executed in parallel by multiple threads that are members of multiple teams.
omp teams distribute parallel for simd | Creates a league of thread teams to execute a structured block in the master thread of each team. It also specifies a loop that can be executed in parallel by multiple threads that are members of multiple teams. The loop will be distributed across the master threads of the teams region, which will be executed concurrently using SIMD instructions.
omp teams distribute simd | Creates a league of thread teams to execute the structured block in the master thread of each team. It also specifies a loop that will be distributed across the master threads of the teams.
omp threadprivate | Specifies a list of globally-visible variables that will be allocated private to each thread.

## Pragmas Compatible with Other Compilers

The following pragmas are compatible with other compilers. For more information about these pragmas, see the documentation for the specified compiler.

Pragma | Description
--- | ---
`include_directory` | HP-compatible pragma. It appends the string argument to the list of places to search for `#include` files.
`poison` | GCC-compatible pragma. It labels the identifiers you want removed from your program; an error results when compiling a `"poisoned" identifier; #pragma POISON` is also supported.
`options` | GCC-compatible pragma; It sets the alignment of fields in structures.
`weak` | GCC-compatible pragma, it declares the symbol you enter to be weak.

Parent topic: Pragmas

## See Also

Intel-specific Pragmas
optimize compiler option
Zc compiler option