Bridge++  Ver. 2.0.2
bridge_long.h
Go to the documentation of this file.
1 
14 #ifndef BRIDGE_LONG_INCLUDED
15 #define BRIDGE_LONG_INCLUDED
16 
18 
26 //-- choose long type
27 //- NB. size_t is not recommended due to its environment dependence
28 
29 #include <cstdint>
30 
31 #if (__WORDSIZE == 64)
32 typedef int64_t long_t;
33 #elif (__WORDSIZE == 32)
34 #warning 32bit environment may overflow for int variables
35 typedef int32_t long_t;
36 #else
37 #error unknown environment, not 32bit nor 64bit ?
38 #endif
39 
40 // NB. some variables such as Lvol may overflow
41 // ex. Lvol = 256^3 x 128 = 2147483648 (max_int = 2147483647)
42 
43 #endif // BRIDGE_LONG_INCLUDED