16 #if defined USE_OPENMP 
   18 #include "bgqthread.h" 
   39 #if defined USE_OPENMP 
   43     if (omp_get_thread_num() == 0) {
 
   44       nthread_env = omp_get_num_threads();
 
   48   if ((nthread == nthread_env) || (nthread == 0)) {
 
   54     omp_set_num_threads(nthread);
 
   97 #if defined USE_OPENMP 
   98   return omp_get_num_threads();
 
  109 #if defined USE_OPENMP 
  110   return omp_get_thread_num();
 
  121 #if defined USE_OPENMP 
  131 #if defined USE_OPENMP 
  135   BGQThread_Barrier(0, nth);
 
  156                                              const int ith, 
const int nth)
 
  158 #if defined USE_OPENMP 
  203 #pragma omp flush (m_darray_reduction) 
  207 #pragma omp flush (m_darray_reduction) 
  209     for (
int i = 0; i < nth; ++i) {
 
  215 #pragma omp flush (m_darray_reduction) 
  221 #pragma omp flush (m_darray_reduction) 
static void barrier(const int nth)
barrier among threads inside a node. 
 
static int m_Nthread
number of threads. 
 
static int get_num_threads()
returns available number of threads. 
 
void general(const char *format,...)
 
static Bridge::VerboseLevel Vlevel()
 
static void wait()
barrier among threads inside a node. 
 
static valarray< double > m_darray_reduction
 
static void reduce_sum_global(double &value, const int ith, const int nth)
global reduction with summation: value is assumed thread local. 
 
static int get_thread_id()
returns thread id. 
 
static void sync_barrier_all()
barrier among all the threads and nodes. 
 
static void finalize()
finalization. 
 
static void init(int nthread)
setup: called in main only once. 
 
void crucial(const char *format,...)
 
static Bridge::VerboseLevel m_vl
verbose level. 
 
static int reduce_sum(int count, double *recv_buf, double *send_buf, int pattern=0)
make a global sum of an array of double over the communicator. pattern specifies the dimensions to be...
 
static int sync()
synchronize within small world.