Chombo + EB + MF  3.2
CH_Thread.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifdef _OPENMP
12 #include <omp.h>
13 #endif
14 
15 #ifndef _CH_THREAD_H_
16 #define _CH_THREAD_H_
17 
18 #include "BaseNamespaceHeader.H"
19 
20 //returns true if we are on thread 0 (or if not threaded)
21 extern bool onThread0();
22 
23 //returns the value of OMP_NUM_THREADS (or 1 if not threaded)
24 extern int getMaxThreads();
25 
26 #include "BaseNamespaceFooter.H"
27 #endif
int getMaxThreads()
bool onThread0()