File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1010/// Include this header in ceed.h to use float instead of double.
1111#pragma once
1212
13+ #ifndef CEED_RUNNING_JIT_PASS
14+ #include <float.h>
15+ #endif
16+
1317#define CEED_SCALAR_IS_FP32
1418
1519/// Set base scalar type to FP32. (See CeedScalarType enum in ceed.h for all options.)
@@ -18,4 +22,4 @@ typedef float CeedScalar;
1822typedef CeedScalar CeedScalarCPU ;
1923
2024/// Machine epsilon
21- #define CEED_EPSILON 0x1p-23
25+ static const CeedScalar CEED_EPSILON = FLT_EPSILON ;
Original file line number Diff line number Diff line change 1010/// This is the default header included in ceed.h.
1111#pragma once
1212
13+ #ifndef CEED_RUNNING_JIT_PASS
14+ #include <float.h>
15+ #endif
16+
1317#define CEED_SCALAR_IS_FP64
1418
1519/// Set base scalar type to FP64. (See CeedScalarType enum in ceed.h for all options.)
@@ -19,11 +23,11 @@ typedef float CeedScalar;
1923typedef double CeedScalarCPU ;
2024
2125/// Machine epsilon
22- #define CEED_EPSILON 0x1p-23
26+ static const CeedScalar CEED_EPSILON = FLT_EPSILON ;
2327#else
2428typedef double CeedScalar ;
2529typedef CeedScalar CeedScalarCPU ;
2630
2731/// Machine epsilon
28- #define CEED_EPSILON 0x1p-52
32+ static const CeedScalar CEED_EPSILON = DBL_EPSILON ;
2933#endif // CEED_RUNNING_JIT_PASS && CEED_JIT_MIXED_PRECISION
You can’t perform that action at this time.
0 commit comments