Go to the documentation of this file.
20 #if !defined(__MITSUBA_CORE_CONSTANTS_H)
21 #define __MITSUBA_CORE_CONSTANTS_H
24 #ifdef DOUBLE_PRECISION
26 #define ShadowEpsilon 1e-5
29 #define ShadowEpsilon 1e-3f
31 #define DeltaEpsilon 1e-3f
34 #if !defined(L1_CACHE_LINE_SIZE)
35 #define L1_CACHE_LINE_SIZE 64
50 #if defined(__WINDOWS__)
51 #define ONE_MINUS_EPS_FLT 0.999999940395355225f
52 #define ONE_MINUS_EPS_DBL 0.999999999999999888
53 #define RCPOVERFLOW_FLT 2.93873587705571876e-39f
54 #define RCPOVERFLOW_DBL 5.56268464626800345e-309
56 #define ONE_MINUS_EPS_FLT 0x1.fffffep-1f
57 #define ONE_MINUS_EPS_DBL 0x1.fffffffffffff7p-1
58 #define RCPOVERFLOW_FLT 0x1p-128f
59 #define RCPOVERFLOW_DBL 0x1p-1024
62 #define M_E_FLT 2.71828182845904523536f
63 #define M_PI_FLT 3.14159265358979323846f
64 #define INV_PI_FLT 0.31830988618379067154f
65 #define INV_TWOPI_FLT 0.15915494309189533577f
66 #define INV_FOURPI_FLT 0.07957747154594766788f
67 #define SQRT_TWO_FLT 1.41421356237309504880f
68 #define INV_SQRT_TWO_FLT 0.70710678118654752440f
70 #define M_E_DBL 2.71828182845904523536
71 #define M_PI_DBL 3.14159265358979323846
72 #define INV_PI_DBL 0.31830988618379067154
73 #define INV_TWOPI_DBL 0.15915494309189533577
74 #define INV_FOURPI_DBL 0.07957747154594766788
75 #define SQRT_TWO_DBL 1.41421356237309504880
76 #define INV_SQRT_TWO_DBL 0.70710678118654752440
78 #ifdef SINGLE_PRECISION
81 #define INV_PI INV_PI_FLT
82 #define INV_TWOPI INV_TWOPI_FLT
83 #define INV_FOURPI INV_FOURPI_FLT
84 #define SQRT_TWO SQRT_TWO_FLT
85 #define INV_SQRT_TWO INV_SQRT_TWO_FLT
86 #define ONE_MINUS_EPS ONE_MINUS_EPS_FLT
87 #define RCPOVERFLOW RCPOVERFLOW_FLT
91 #define INV_PI INV_PI_DBL
92 #define INV_TWOPI INV_TWOPI_DBL
93 #define INV_FOURPI INV_FOURPI_DBL
94 #define SQRT_TWO SQRT_TWO_DBL
95 #define INV_SQRT_TWO INV_SQRT_TWO_DBL
96 #define ONE_MINUS_EPS ONE_MINUS_EPS_DBL
97 #define RCPOVERFLOW RCPOVERFLOW_DBL