次の方法で共有


3.1.6 omp_in_parallel Function

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The omp_in_parallel function returns a nonzero value if it is called within the dynamic extent of a parallel region executing in parallel; otherwise, it returns 0. The format is as follows:

#include <omp.h>  
int omp_in_parallel(void);  

This function returns a nonzero value when called from within a region executing in parallel, including nested regions that are serialized.