Following is its format:
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
//some code here
int TID = omp_get_thread_num();
references:
OpenMP Official Web sites
Using OpenMP: Portable Shared Memory Parallel Programming
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
//some code here
int TID = omp_get_thread_num();
沒有留言:
張貼留言