Improved OpenMP support detection for Clang, GCC, ICC and VC

This commit is contained in:
Christophe Riccio 2016-05-04 18:04:44 +02:00
parent ca3abd6e93
commit 20da5a25db
2 changed files with 27 additions and 4 deletions

View File

@ -535,19 +535,41 @@
// OpenMP // OpenMP
#ifdef _OPENMP #ifdef _OPENMP
# if GLM_COMPILER & GLM_COMPILER_GCC # if GLM_COMPILER & GLM_COMPILER_GCC
# if GLM_COMPILER >= GLM_COMPILER_GCC47 # if GLM_COMPILER >= GLM_COMPILER_GCC61
# define GLM_HAS_OPENMP 45
# elif GLM_COMPILER >= GLM_COMPILER_GCC49
# define GLM_HAS_OPENMP 40
# elif GLM_COMPILER >= GLM_COMPILER_GCC47
# define GLM_HAS_OPENMP 31 # define GLM_HAS_OPENMP 31
# elif GLM_COMPILER >= GLM_COMPILER_GCC44 # elif GLM_COMPILER >= GLM_COMPILER_GCC44
# define GLM_HAS_OPENMP 30 # define GLM_HAS_OPENMP 30
# elif GLM_COMPILER >= GLM_COMPILER_GCC42 # elif GLM_COMPILER >= GLM_COMPILER_GCC42
# define GLM_HAS_OPENMP 25 # define GLM_HAS_OPENMP 25
# else
# define GLM_HAS_OPENMP 0
# endif # endif
# endif// GLM_COMPILER & GLM_COMPILER_GCC # elif GLM_COMPILER & GLM_COMPILER_LLVM
# if GLM_COMPILER >= GLM_COMPILER_LLVM38
# if GLM_COMPILER & GLM_COMPILER_VC # define GLM_HAS_OPENMP 31
# else
# define GLM_HAS_OPENMP 0
# endif
# elif GLM_COMPILER & GLM_COMPILER_VC
# if GLM_COMPILER >= GLM_COMPILER_VC2010 # if GLM_COMPILER >= GLM_COMPILER_VC2010
# define GLM_HAS_OPENMP 20 # define GLM_HAS_OPENMP 20
# else
# define GLM_HAS_OPENMP 0
# endif # endif
# elif GLM_COMPILER & GLM_COMPILER_INTEL
# if GLM_COMPILER >= GLM_COMPILER_INTEL16
# define GLM_HAS_OPENMP 40
# elif GLM_COMPILER >= GLM_COMPILER_INTEL12
# define GLM_HAS_OPENMP 31
# else
# define GLM_HAS_OPENMP 0
# endif
# else
# define GLM_HAS_OPENMP 0
# endif// GLM_COMPILER & GLM_COMPILER_VC # endif// GLM_COMPILER & GLM_COMPILER_VC
#endif #endif

View File

@ -67,6 +67,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
- Improved GTC_random linearRand documentation - Improved GTC_random linearRand documentation
- Improved GTC_reciprocal documentation - Improved GTC_reciprocal documentation
- Improved GLM_FORCE_EXPLICIT_CTOR coverage #481 - Improved GLM_FORCE_EXPLICIT_CTOR coverage #481
- Improved OpenMP support detection for Clang, GCC, ICC and VC
##### Fixes: ##### Fixes:
- Fixed GTX_extended_min_max filename typo #386 - Fixed GTX_extended_min_max filename typo #386