1 /// @ref simd 2 /// @file glm/simd/platform.h 3 4 #pragma once 5 6 /////////////////////////////////////////////////////////////////////////////////// 7 // Platform 8 9 #define GLM_PLATFORM_UNKNOWN 0x00000000 10 #define GLM_PLATFORM_WINDOWS 0x00010000 11 #define GLM_PLATFORM_LINUX 0x00020000 12 #define GLM_PLATFORM_APPLE 0x00040000 13 //#define GLM_PLATFORM_IOS 0x00080000 14 #define GLM_PLATFORM_ANDROID 0x00100000 15 #define GLM_PLATFORM_CHROME_NACL 0x00200000 16 #define GLM_PLATFORM_UNIX 0x00400000 17 #define GLM_PLATFORM_QNXNTO 0x00800000 18 #define GLM_PLATFORM_WINCE 0x01000000 19 #define GLM_PLATFORM_CYGWIN 0x02000000 20 21 #ifdef GLM_FORCE_PLATFORM_UNKNOWN 22 # define GLM_PLATFORM GLM_PLATFORM_UNKNOWN 23 #elif defined(__CYGWIN__) 24 # define GLM_PLATFORM GLM_PLATFORM_CYGWIN 25 #elif defined(__QNXNTO__) 26 # define GLM_PLATFORM GLM_PLATFORM_QNXNTO 27 #elif defined(__APPLE__) 28 # define GLM_PLATFORM GLM_PLATFORM_APPLE 29 #elif defined(WINCE) 30 # define GLM_PLATFORM GLM_PLATFORM_WINCE 31 #elif defined(_WIN32) 32 # define GLM_PLATFORM GLM_PLATFORM_WINDOWS 33 #elif defined(__native_client__) 34 # define GLM_PLATFORM GLM_PLATFORM_CHROME_NACL 35 #elif defined(__ANDROID__) 36 # define GLM_PLATFORM GLM_PLATFORM_ANDROID 37 #elif defined(__linux) 38 # define GLM_PLATFORM GLM_PLATFORM_LINUX 39 #elif defined(__unix) 40 # define GLM_PLATFORM GLM_PLATFORM_UNIX 41 #else 42 # define GLM_PLATFORM GLM_PLATFORM_UNKNOWN 43 #endif// 44 45 // Report platform detection 46 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_PLATFORM_DISPLAYED) 47 # define GLM_MESSAGE_PLATFORM_DISPLAYED 48 # if(GLM_PLATFORM & GLM_PLATFORM_QNXNTO) 49 # pragma message("GLM: QNX platform detected") 50 //# elif(GLM_PLATFORM & GLM_PLATFORM_IOS) 51 //# pragma message("GLM: iOS platform detected") 52 # elif(GLM_PLATFORM & GLM_PLATFORM_APPLE) 53 # pragma message("GLM: Apple platform detected") 54 # elif(GLM_PLATFORM & GLM_PLATFORM_WINCE) 55 # pragma message("GLM: WinCE platform detected") 56 # elif(GLM_PLATFORM & GLM_PLATFORM_WINDOWS) 57 # pragma message("GLM: Windows platform detected") 58 # elif(GLM_PLATFORM & GLM_PLATFORM_CHROME_NACL) 59 # pragma message("GLM: Native Client detected") 60 # elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID) 61 # pragma message("GLM: Android platform detected") 62 # elif(GLM_PLATFORM & GLM_PLATFORM_LINUX) 63 # pragma message("GLM: Linux platform detected") 64 # elif(GLM_PLATFORM & GLM_PLATFORM_UNIX) 65 # pragma message("GLM: UNIX platform detected") 66 # elif(GLM_PLATFORM & GLM_PLATFORM_UNKNOWN) 67 # pragma message("GLM: platform unknown") 68 # else 69 # pragma message("GLM: platform not detected") 70 # endif 71 #endif//GLM_MESSAGES 72 73 /////////////////////////////////////////////////////////////////////////////////// 74 // Compiler 75 76 #define GLM_COMPILER_UNKNOWN 0x00000000 77 78 // Intel 79 #define GLM_COMPILER_INTEL 0x00100000 80 #define GLM_COMPILER_INTEL12 0x00100010 81 #define GLM_COMPILER_INTEL12_1 0x00100020 82 #define GLM_COMPILER_INTEL13 0x00100030 83 #define GLM_COMPILER_INTEL14 0x00100040 84 #define GLM_COMPILER_INTEL15 0x00100050 85 #define GLM_COMPILER_INTEL16 0x00100060 86 87 // Visual C++ defines 88 #define GLM_COMPILER_VC 0x01000000 89 #define GLM_COMPILER_VC10 0x01000090 90 #define GLM_COMPILER_VC11 0x010000A0 91 #define GLM_COMPILER_VC12 0x010000B0 92 #define GLM_COMPILER_VC14 0x010000C0 93 #define GLM_COMPILER_VC15 0x010000D0 94 95 // GCC defines 96 #define GLM_COMPILER_GCC 0x02000000 97 #define GLM_COMPILER_GCC44 0x020000B0 98 #define GLM_COMPILER_GCC45 0x020000C0 99 #define GLM_COMPILER_GCC46 0x020000D0 100 #define GLM_COMPILER_GCC47 0x020000E0 101 #define GLM_COMPILER_GCC48 0x020000F0 102 #define GLM_COMPILER_GCC49 0x02000100 103 #define GLM_COMPILER_GCC50 0x02000200 104 #define GLM_COMPILER_GCC51 0x02000300 105 #define GLM_COMPILER_GCC52 0x02000400 106 #define GLM_COMPILER_GCC53 0x02000500 107 #define GLM_COMPILER_GCC54 0x02000600 108 #define GLM_COMPILER_GCC60 0x02000700 109 #define GLM_COMPILER_GCC61 0x02000800 110 #define GLM_COMPILER_GCC62 0x02000900 111 #define GLM_COMPILER_GCC70 0x02000A00 112 #define GLM_COMPILER_GCC71 0x02000B00 113 #define GLM_COMPILER_GCC72 0x02000C00 114 #define GLM_COMPILER_GCC80 0x02000D00 115 116 // CUDA 117 #define GLM_COMPILER_CUDA 0x10000000 118 #define GLM_COMPILER_CUDA40 0x10000040 119 #define GLM_COMPILER_CUDA41 0x10000050 120 #define GLM_COMPILER_CUDA42 0x10000060 121 #define GLM_COMPILER_CUDA50 0x10000070 122 #define GLM_COMPILER_CUDA60 0x10000080 123 #define GLM_COMPILER_CUDA65 0x10000090 124 #define GLM_COMPILER_CUDA70 0x100000A0 125 #define GLM_COMPILER_CUDA75 0x100000B0 126 #define GLM_COMPILER_CUDA80 0x100000C0 127 128 // Clang 129 #define GLM_COMPILER_CLANG 0x20000000 130 #define GLM_COMPILER_CLANG32 0x20000030 131 #define GLM_COMPILER_CLANG33 0x20000040 132 #define GLM_COMPILER_CLANG34 0x20000050 133 #define GLM_COMPILER_CLANG35 0x20000060 134 #define GLM_COMPILER_CLANG36 0x20000070 135 #define GLM_COMPILER_CLANG37 0x20000080 136 #define GLM_COMPILER_CLANG38 0x20000090 137 #define GLM_COMPILER_CLANG39 0x200000A0 138 #define GLM_COMPILER_CLANG40 0x200000B0 139 #define GLM_COMPILER_CLANG41 0x200000C0 140 #define GLM_COMPILER_CLANG42 0x200000D0 141 142 // Build model 143 #define GLM_MODEL_32 0x00000010 144 #define GLM_MODEL_64 0x00000020 145 146 // Force generic C++ compiler 147 #ifdef GLM_FORCE_COMPILER_UNKNOWN 148 # define GLM_COMPILER GLM_COMPILER_UNKNOWN 149 150 #elif defined(__INTEL_COMPILER) 151 # if __INTEL_COMPILER == 1200 152 # define GLM_COMPILER GLM_COMPILER_INTEL12 153 # elif __INTEL_COMPILER == 1210 154 # define GLM_COMPILER GLM_COMPILER_INTEL12_1 155 # elif __INTEL_COMPILER == 1300 156 # define GLM_COMPILER GLM_COMPILER_INTEL13 157 # elif __INTEL_COMPILER == 1400 158 # define GLM_COMPILER GLM_COMPILER_INTEL14 159 # elif __INTEL_COMPILER == 1500 160 # define GLM_COMPILER GLM_COMPILER_INTEL15 161 # elif __INTEL_COMPILER >= 1600 162 # define GLM_COMPILER GLM_COMPILER_INTEL16 163 # else 164 # define GLM_COMPILER GLM_COMPILER_INTEL 165 # endif 166 167 // CUDA 168 #elif defined(__CUDACC__) 169 # if !defined(CUDA_VERSION) && !defined(GLM_FORCE_CUDA) 170 # include <cuda.h> // make sure version is defined since nvcc does not define it itself! 171 # endif 172 # if CUDA_VERSION < 3000 173 # error "GLM requires CUDA 3.0 or higher" 174 # else 175 # define GLM_COMPILER GLM_COMPILER_CUDA 176 # endif 177 178 // Clang 179 #elif defined(__clang__) 180 # if GLM_PLATFORM & GLM_PLATFORM_APPLE 181 # if __clang_major__ == 5 && __clang_minor__ == 0 182 # define GLM_COMPILER GLM_COMPILER_CLANG33 183 # elif __clang_major__ == 5 && __clang_minor__ == 1 184 # define GLM_COMPILER GLM_COMPILER_CLANG34 185 # elif __clang_major__ == 6 && __clang_minor__ == 0 186 # define GLM_COMPILER GLM_COMPILER_CLANG35 187 # elif __clang_major__ == 6 && __clang_minor__ >= 1 188 # define GLM_COMPILER GLM_COMPILER_CLANG36 189 # elif __clang_major__ >= 7 190 # define GLM_COMPILER GLM_COMPILER_CLANG37 191 # else 192 # define GLM_COMPILER GLM_COMPILER_CLANG 193 # endif 194 # else 195 # if __clang_major__ == 3 && __clang_minor__ == 0 196 # define GLM_COMPILER GLM_COMPILER_CLANG30 197 # elif __clang_major__ == 3 && __clang_minor__ == 1 198 # define GLM_COMPILER GLM_COMPILER_CLANG31 199 # elif __clang_major__ == 3 && __clang_minor__ == 2 200 # define GLM_COMPILER GLM_COMPILER_CLANG32 201 # elif __clang_major__ == 3 && __clang_minor__ == 3 202 # define GLM_COMPILER GLM_COMPILER_CLANG33 203 # elif __clang_major__ == 3 && __clang_minor__ == 4 204 # define GLM_COMPILER GLM_COMPILER_CLANG34 205 # elif __clang_major__ == 3 && __clang_minor__ == 5 206 # define GLM_COMPILER GLM_COMPILER_CLANG35 207 # elif __clang_major__ == 3 && __clang_minor__ == 6 208 # define GLM_COMPILER GLM_COMPILER_CLANG36 209 # elif __clang_major__ == 3 && __clang_minor__ == 7 210 # define GLM_COMPILER GLM_COMPILER_CLANG37 211 # elif __clang_major__ == 3 && __clang_minor__ == 8 212 # define GLM_COMPILER GLM_COMPILER_CLANG38 213 # elif __clang_major__ == 3 && __clang_minor__ >= 9 214 # define GLM_COMPILER GLM_COMPILER_CLANG39 215 # elif __clang_major__ == 4 && __clang_minor__ == 0 216 # define GLM_COMPILER GLM_COMPILER_CLANG40 217 # elif __clang_major__ == 4 && __clang_minor__ == 1 218 # define GLM_COMPILER GLM_COMPILER_CLANG41 219 # elif __clang_major__ == 4 && __clang_minor__ >= 2 220 # define GLM_COMPILER GLM_COMPILER_CLANG42 221 # elif __clang_major__ >= 4 222 # define GLM_COMPILER GLM_COMPILER_CLANG42 223 # else 224 # define GLM_COMPILER GLM_COMPILER_CLANG 225 # endif 226 # endif 227 228 // Visual C++ 229 #elif defined(_MSC_VER) 230 # if _MSC_VER < 1600 231 # error "GLM requires Visual C++ 10 - 2010 or higher" 232 # elif _MSC_VER == 1600 233 # define GLM_COMPILER GLM_COMPILER_VC11 234 # elif _MSC_VER == 1700 235 # define GLM_COMPILER GLM_COMPILER_VC11 236 # elif _MSC_VER == 1800 237 # define GLM_COMPILER GLM_COMPILER_VC12 238 # elif _MSC_VER == 1900 239 # define GLM_COMPILER GLM_COMPILER_VC14 240 # elif _MSC_VER >= 1910 241 # define GLM_COMPILER GLM_COMPILER_VC15 242 # else//_MSC_VER 243 # define GLM_COMPILER GLM_COMPILER_VC 244 # endif//_MSC_VER 245 246 // G++ 247 #elif defined(__GNUC__) || defined(__MINGW32__) 248 # if (__GNUC__ == 4) && (__GNUC_MINOR__ == 2) 249 # define GLM_COMPILER (GLM_COMPILER_GCC42) 250 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3) 251 # define GLM_COMPILER (GLM_COMPILER_GCC43) 252 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4) 253 # define GLM_COMPILER (GLM_COMPILER_GCC44) 254 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 5) 255 # define GLM_COMPILER (GLM_COMPILER_GCC45) 256 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 6) 257 # define GLM_COMPILER (GLM_COMPILER_GCC46) 258 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 7) 259 # define GLM_COMPILER (GLM_COMPILER_GCC47) 260 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) 261 # define GLM_COMPILER (GLM_COMPILER_GCC48) 262 # elif (__GNUC__ == 4) && (__GNUC_MINOR__ >= 9) 263 # define GLM_COMPILER (GLM_COMPILER_GCC49) 264 # elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 0) 265 # define GLM_COMPILER (GLM_COMPILER_GCC50) 266 # elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 1) 267 # define GLM_COMPILER (GLM_COMPILER_GCC51) 268 # elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 2) 269 # define GLM_COMPILER (GLM_COMPILER_GCC52) 270 # elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 3) 271 # define GLM_COMPILER (GLM_COMPILER_GCC53) 272 # elif (__GNUC__ == 5) && (__GNUC_MINOR__ >= 4) 273 # define GLM_COMPILER (GLM_COMPILER_GCC54) 274 # elif (__GNUC__ == 6) && (__GNUC_MINOR__ == 0) 275 # define GLM_COMPILER (GLM_COMPILER_GCC60) 276 # elif (__GNUC__ == 6) && (__GNUC_MINOR__ == 1) 277 # define GLM_COMPILER (GLM_COMPILER_GCC61) 278 # elif (__GNUC__ == 6) && (__GNUC_MINOR__ >= 2) 279 # define GLM_COMPILER (GLM_COMPILER_GCC62) 280 # elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 0) 281 # define GLM_COMPILER (GLM_COMPILER_GCC70) 282 # elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 1) 283 # define GLM_COMPILER (GLM_COMPILER_GCC71) 284 # elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 2) 285 # define GLM_COMPILER (GLM_COMPILER_GCC72) 286 # elif (__GNUC__ >= 8) 287 # define GLM_COMPILER (GLM_COMPILER_GCC80) 288 # else 289 # define GLM_COMPILER (GLM_COMPILER_GCC) 290 # endif 291 292 #else 293 # define GLM_COMPILER GLM_COMPILER_UNKNOWN 294 #endif 295 296 #ifndef GLM_COMPILER 297 # error "GLM_COMPILER undefined, your compiler may not be supported by GLM. Add #define GLM_COMPILER 0 to ignore this message." 298 #endif//GLM_COMPILER 299 300 /////////////////////////////////////////////////////////////////////////////////// 301 // Instruction sets 302 303 // User defines: GLM_FORCE_PURE GLM_FORCE_SSE2 GLM_FORCE_SSE3 GLM_FORCE_AVX GLM_FORCE_AVX2 GLM_FORCE_AVX2 304 305 #define GLM_ARCH_X86_BIT 0x00000001 306 #define GLM_ARCH_SSE2_BIT 0x00000002 307 #define GLM_ARCH_SSE3_BIT 0x00000004 308 #define GLM_ARCH_SSSE3_BIT 0x00000008 309 #define GLM_ARCH_SSE41_BIT 0x00000010 310 #define GLM_ARCH_SSE42_BIT 0x00000020 311 #define GLM_ARCH_AVX_BIT 0x00000040 312 #define GLM_ARCH_AVX2_BIT 0x00000080 313 #define GLM_ARCH_AVX512_BIT 0x00000100 // Skylake subset 314 #define GLM_ARCH_ARM_BIT 0x00000100 315 #define GLM_ARCH_NEON_BIT 0x00000200 316 #define GLM_ARCH_MIPS_BIT 0x00010000 317 #define GLM_ARCH_PPC_BIT 0x01000000 318 319 #define GLM_ARCH_PURE (0x00000000) 320 #define GLM_ARCH_X86 (GLM_ARCH_X86_BIT) 321 #define GLM_ARCH_SSE2 (GLM_ARCH_SSE2_BIT | GLM_ARCH_X86) 322 #define GLM_ARCH_SSE3 (GLM_ARCH_SSE3_BIT | GLM_ARCH_SSE2) 323 #define GLM_ARCH_SSSE3 (GLM_ARCH_SSSE3_BIT | GLM_ARCH_SSE3) 324 #define GLM_ARCH_SSE41 (GLM_ARCH_SSE41_BIT | GLM_ARCH_SSSE3) 325 #define GLM_ARCH_SSE42 (GLM_ARCH_SSE42_BIT | GLM_ARCH_SSE41) 326 #define GLM_ARCH_AVX (GLM_ARCH_AVX_BIT | GLM_ARCH_SSE42) 327 #define GLM_ARCH_AVX2 (GLM_ARCH_AVX2_BIT | GLM_ARCH_AVX) 328 #define GLM_ARCH_AVX512 (GLM_ARCH_AVX512_BIT | GLM_ARCH_AVX2) // Skylake subset 329 #define GLM_ARCH_ARM (GLM_ARCH_ARM_BIT) 330 #define GLM_ARCH_NEON (GLM_ARCH_NEON_BIT | GLM_ARCH_ARM) 331 #define GLM_ARCH_MIPS (GLM_ARCH_MIPS_BIT) 332 #define GLM_ARCH_PPC (GLM_ARCH_PPC_BIT) 333 334 #if defined(GLM_FORCE_PURE) 335 # define GLM_ARCH GLM_ARCH_PURE 336 #elif defined(GLM_FORCE_MIPS) 337 # define GLM_ARCH (GLM_ARCH_MIPS) 338 #elif defined(GLM_FORCE_PPC) 339 # define GLM_ARCH (GLM_ARCH_PPC) 340 #elif defined(GLM_FORCE_NEON) 341 # define GLM_ARCH (GLM_ARCH_NEON) 342 #elif defined(GLM_FORCE_AVX512) 343 # define GLM_ARCH (GLM_ARCH_AVX512) 344 #elif defined(GLM_FORCE_AVX2) 345 # define GLM_ARCH (GLM_ARCH_AVX2) 346 #elif defined(GLM_FORCE_AVX) 347 # define GLM_ARCH (GLM_ARCH_AVX) 348 #elif defined(GLM_FORCE_SSE42) 349 # define GLM_ARCH (GLM_ARCH_SSE42) 350 #elif defined(GLM_FORCE_SSE41) 351 # define GLM_ARCH (GLM_ARCH_SSE41) 352 #elif defined(GLM_FORCE_SSSE3) 353 # define GLM_ARCH (GLM_ARCH_SSSE3) 354 #elif defined(GLM_FORCE_SSE3) 355 # define GLM_ARCH (GLM_ARCH_SSE3) 356 #elif defined(GLM_FORCE_SSE2) 357 # define GLM_ARCH (GLM_ARCH_SSE2) 358 #elif (GLM_COMPILER & (GLM_COMPILER_CLANG | GLM_COMPILER_GCC)) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_LINUX)) 359 // This is Skylake set of instruction set 360 # if defined(__AVX512BW__) && defined(__AVX512F__) && defined(__AVX512CD__) && defined(__AVX512VL__) && defined(__AVX512DQ__) 361 # define GLM_ARCH (GLM_ARCH_AVX512) 362 # elif defined(__AVX2__) 363 # define GLM_ARCH (GLM_ARCH_AVX2) 364 # elif defined(__AVX__) 365 # define GLM_ARCH (GLM_ARCH_AVX) 366 # elif defined(__SSE4_2__) 367 # define GLM_ARCH (GLM_ARCH_SSE42) 368 # elif defined(__SSE4_1__) 369 # define GLM_ARCH (GLM_ARCH_SSE41) 370 # elif defined(__SSSE3__) 371 # define GLM_ARCH (GLM_ARCH_SSSE3) 372 # elif defined(__SSE3__) 373 # define GLM_ARCH (GLM_ARCH_SSE3) 374 # elif defined(__SSE2__) 375 # define GLM_ARCH (GLM_ARCH_SSE2) 376 # elif defined(__i386__) || defined(__x86_64__) 377 # define GLM_ARCH (GLM_ARCH_X86) 378 # elif defined(__ARM_NEON) 379 # define GLM_ARCH (GLM_ARCH_ARM | GLM_ARCH_NEON) 380 # elif defined(__arm__ ) 381 # define GLM_ARCH (GLM_ARCH_ARM) 382 # elif defined(__mips__ ) 383 # define GLM_ARCH (GLM_ARCH_MIPS) 384 # elif defined(__powerpc__ ) 385 # define GLM_ARCH (GLM_ARCH_PPC) 386 # else 387 # define GLM_ARCH (GLM_ARCH_PURE) 388 # endif 389 #elif (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)) 390 # if defined(_M_ARM) 391 # define GLM_ARCH (GLM_ARCH_ARM) 392 # elif defined(__AVX2__) 393 # define GLM_ARCH (GLM_ARCH_AVX2) 394 # elif defined(__AVX__) 395 # define GLM_ARCH (GLM_ARCH_AVX) 396 # elif defined(_M_X64) 397 # define GLM_ARCH (GLM_ARCH_SSE2) 398 # elif defined(_M_IX86_FP) 399 # if _M_IX86_FP >= 2 400 # define GLM_ARCH (GLM_ARCH_SSE2) 401 # else 402 # define GLM_ARCH (GLM_ARCH_PURE) 403 # endif 404 # elif defined(_M_PPC) 405 # define GLM_ARCH (GLM_ARCH_PPC) 406 # else 407 # define GLM_ARCH (GLM_ARCH_PURE) 408 # endif 409 #else 410 # define GLM_ARCH GLM_ARCH_PURE 411 #endif 412 413 // With MinGW-W64, including intrinsic headers before intrin.h will produce some errors. The problem is 414 // that windows.h (and maybe other headers) will silently include intrin.h, which of course causes problems. 415 // To fix, we just explicitly include intrin.h here. 416 #if defined(__MINGW64__) && (GLM_ARCH != GLM_ARCH_PURE) 417 # include <intrin.h> 418 #endif 419 420 #if GLM_ARCH & GLM_ARCH_AVX2_BIT 421 # include <immintrin.h> 422 #elif GLM_ARCH & GLM_ARCH_AVX_BIT 423 # include <immintrin.h> 424 #elif GLM_ARCH & GLM_ARCH_SSE42_BIT 425 # if GLM_COMPILER & GLM_COMPILER_CLANG 426 # include <popcntintrin.h> 427 # endif 428 # include <nmmintrin.h> 429 #elif GLM_ARCH & GLM_ARCH_SSE41_BIT 430 # include <smmintrin.h> 431 #elif GLM_ARCH & GLM_ARCH_SSSE3_BIT 432 # include <tmmintrin.h> 433 #elif GLM_ARCH & GLM_ARCH_SSE3_BIT 434 # include <pmmintrin.h> 435 #elif GLM_ARCH & GLM_ARCH_SSE2_BIT 436 # include <emmintrin.h> 437 #endif//GLM_ARCH 438 439 #if GLM_ARCH & GLM_ARCH_SSE2_BIT 440 typedef __m128 glm_vec4; 441 typedef __m128i glm_ivec4; 442 typedef __m128i glm_uvec4; 443 #endif 444 445 #if GLM_ARCH & GLM_ARCH_AVX_BIT 446 typedef __m256d glm_dvec4; 447 #endif 448 449 #if GLM_ARCH & GLM_ARCH_AVX2_BIT 450 typedef __m256i glm_i64vec4; 451 typedef __m256i glm_u64vec4; 452 #endif 453