ampsci
High-precision calculations for one- and two-valence atomic systems
omp.hpp File Reference

Include instead of <omp.h> to allow compilation with or without OpenMP. More...

#include <string>

Go to the source code of this file.

Namespaces

namespace  qip
 General-purpose utility library.
 

Macros

#define omp_get_thread_num()   0
 
#define omp_get_max_threads()   1
 
#define omp_get_num_threads()   1
 

Functions

std::string qip::omp_details ()
 Returns a short string describing the threading status, e.g. "Using OpenMP with 8 threads." or "Single-threaded.".
 

Variables

constexpr bool qip::use_omp = false
 True if compiled with OpenMP support, false otherwise.
 

Detailed Description

Include instead of <omp.h> to allow compilation with or without OpenMP.

If OpenMP is not available, stub macros are provided so #pragma omp directives are silently ignored, and the common omp_*thread functions return 0 or 1.