3.4.2 omp_in_explicit_task – Whether a given task is an explicit task

Description:

The function returns the explicit-task-var ICV; it returns true when the encountering task was generated by a task-generating construct such as target, task or taskloop. Otherwise, the encountering task is in an implicit task region such as generated by the implicit or explicit parallel region and omp_in_explicit_task returns false.

C/C++
Prototype:int omp_in_explicit_task(void);
Fortran:
Interface:logical function omp_in_explicit_task()
Reference:

OpenMP specification v5.2, Section 18.5.2.