OpenMP API V4.5 support

IBM® XL C/C++ for Linux, V16.1 supports the OpenMP Application Program Interface Version 4.5 specification. The XL C/C++ implementation is based on IBM's interpretation of the OpenMP Application Program Interface 4.5.

The new OpenMP Application Program Interface Version 4.5 support falls into the following categories:

New directives

In addition to the existing OpenMP directives, IBM XL C/C++ for Linux, V16.1 adds support for the following directives and their clauses.
omp cancel
You can use the omp cancel directive to activate the cancellation of the innermost enclosing of the specified type.
omp cancellation point
You can use the omp cancellation point directive to explicitly set cancellation points in the program. At cancellation points, the encountering task checks if cancellation of the innermost enclosing region of the specified type has been activated.
omp declare simd
You can apply the omp declare simd directive to a function to create one or more versions for being called in a SIMD loop.
omp taskgroup
You can use the omp taskgroup directive to specify a wait on completion of the child tasks of the current task and their descendent tasks.
omp taskloop
You can use the omp taskloop directive to specify that the iterations of one or more associated loops are executed in parallel using OpenMP tasks.
omp taskloop simd
You can use the omp taskloop simd directive to specify that a loop can be executed concurrently using SIMD instructions and that the iterations are to be executed in parallel using OpenMP tasks.

Expanded functionality for existing directives

The following directives have been updated with functionality for additional clauses in IBM XL C/C++ for Linux, V16.1.
omp task
The priority clause is now supported on the omp task directive. You can use omp task priority(priority-value) to specify the execution priority of the generated task.

New runtime functions

omp_get_cancellation
You can use the omp_get_cancellation runtime function to check whether the cancellation model is enabled or not.

New environment variables

OMP_CANCELLATION
You can use the OMP_CANCELLATION environment variable to enable or disable the cancellation model.


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us