omp_is_initial_device (GNU libgomp)

#### 3.6.8 `omp_is_initial_device` – Whether executing on the host device ¶

Description:

  This function returns `true` if currently running on the host device, `false` otherwise. Here, `true` and `false` represent their language-specific counterparts.

  Note that in GCC this function call is already folded to a constant in the compiler; compile with `-fno-builtin-omp_is_initial_device` if a run-time function is desired.

C/C++:

  Prototype: | `int omp_is_initial_device(void);`

Fortran:

  Interface: | `logical function omp_is_initial_device()`

Reference:

  OpenMP specification v4.5, Section 3.2.34.