Distributed QUEST for GPU
QuEST_precision.h
Go to the documentation of this file.
1 // Distributed under MIT licence. See https://github.com/aniabrown/QuEST_GPU/blob/master/LICENCE.txt for details
2 
3 # ifndef QuEST_PRECISION
4 # define QuEST_PRECISION
5 
6 // *** EDIT PRECISION HERE
7 // OPTIONS: 1, 2, 4
8 # define PREC 2
9 
10 # if PREC==1
11  // SINGLE PRECISION
12  # define REAL float
13  # define MPI_QuEST_REAL MPI_FLOAT
14  # define REAL_STRING_FORMAT "%.8f"
15  # define REAL_EPS 1e-5
16 # elif PREC==4
17  // QUAD PRECISION
18  // 80-bit precision for most implementations
19  # define REAL long double
20  # define MPI_QuEST_REAL MPI_LONG_DOUBLE
21  # define REAL_STRING_FORMAT "%.17Lf"
22  # define REAL_EPS 1e-14
23 # else
24  // DOUBLE PRECISION
25  # define REAL double
26  # define MPI_QuEST_REAL MPI_DOUBLE
27  # define REAL_STRING_FORMAT "%.14f"
28  # define REAL_EPS 1e-13
29 # endif
30 
31 
32 # endif