# NAG FL Interfacex06aff (in_​parallel)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

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

## 2Specification

Fortran Interface
 Function x06aff ( )
 Integer :: x06aff
#include <nag.h>
 Integer x06aff_ ()
The routine may be called by the names x06aff or nagf_omp_in_parallel.

## 3Description

x06aff, for multithreaded 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.

## 4References

The OpenMP API Specification for Parallel Programming
Chapman B, Jost G and van der Pas R (2008) Using OpenMP Portable Shared Memory Parallel Programming The MIT Press

None.

None.

Not applicable.