Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 #ifdef LIB_CPP11
30 
31 #include <cstdint>
32 
33 #if (__WORDSIZE == 64)
34 typedef int64_t long_t;
35 #elif (__WORDSIZE == 32)
36 #warning 32bit environment may overflow for int variables
37 typedef int32_t long_t;
38 #else
39 #error unknown environment, not 32bit nor 64bit ?
40 #endif
41 
42 #else
43 
44 // NB. some variables such as Lvol may overflow
45 // ex. Lvol = 256^3 x 128 = 2147483648 (max_int = 2147483647)
46 typedef long long_t;
47 
48 #endif
49 
50 
51 #endif // BRIDGE_LONG_INCLUDED
long long_t
definition of long for Bridge++
Definition: bridge_long.h:46