NAG Library Routine Document

x06aff  (in_parallel)

 Contents

    1  Purpose
    7  Accuracy
    10  Example

1
Purpose

x06aff returns 1 if called from within an active OpenMP parallel region, and 0 otherwise.

2
Specification

Fortran Interface
Function x06aff ( )
Integer:: x06aff
C Header Interface
#include nagmk26.h
Integer  x06aff_ ()

3
Description

x06aff, for multi-threaded implementations, returns 1 if called from within an active OpenMP parallel region, and 0 otherwise.
Note that the equivalent OpenMP routine omp_in_parallel() returns a logical value.
In serial implementations of the NAG Library this routine will always return 0. See the X06 Chapter Introduction for a discussion of the behaviour of these routines when called in serial.

4
References

OpenMP Specifications http://openmp.org/
Chapman B, Jost G and van der Pas R (2008) Using OpenMP Portable Shared Memory Parallel Programming The MIT Press

5
Arguments

None.

6
Error Indicators and Warnings

None.

7
Accuracy

Not applicable.

8
Parallelism and Performance

x06aff is not threaded in any implementation.

9
Further Comments

None.

10
Example

See Section 10 in x06adf for a demonstration of how to use x06aff.
© The Numerical Algorithms Group Ltd, Oxford, UK. 2017