Geant4 Cross Reference |
1 #ifndef CLHEP_ATOMIC_INT_H 1 #ifndef CLHEP_ATOMIC_INT_H 2 #define CLHEP_ATOMIC_INT_H 2 #define CLHEP_ATOMIC_INT_H 3 3 4 // =========================================== 4 // ====================================================================== 5 // 5 // 6 // Use std::atomic when the compiler declares 6 // Use std::atomic when the compiler declares it uses the C++11 standard 7 // 7 // 8 // =========================================== 8 // ====================================================================== 9 9 10 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_M << 10 #if (defined (G4MULTITHREADED) && defined (G4USE_STD11)) 11 #include <atomic> << 11 12 #define CLHEP_ATOMIC_INT_TYPE std::atomic<in << 12 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 7) >> 13 #include <atomic> >> 14 #define CLHEP_ATOMIC_INT_TYPE std::atomic<int> >> 15 #elif __clang__ >> 16 #if __has_feature(c_atomic) >> 17 #include <atomic> >> 18 #define CLHEP_ATOMIC_INT_TYPE std::atomic<int> >> 19 #else >> 20 #define CLHEP_ATOMIC_INT_TYPE int >> 21 #endif >> 22 #else >> 23 #define CLHEP_ATOMIC_INT_TYPE int >> 24 #endif >> 25 13 #else 26 #else 14 #define CLHEP_ATOMIC_INT_TYPE int 27 #define CLHEP_ATOMIC_INT_TYPE int 15 #endif 28 #endif 16 29 17 #endif 30 #endif 18 31