0.9.9 API documentation
setup.hpp
1 #ifndef GLM_SETUP_INCLUDED
2 
3 #include <cassert>
4 #include <cstddef>
5 
6 #define GLM_VERSION_MAJOR 0
7 #define GLM_VERSION_MINOR 9
8 #define GLM_VERSION_PATCH 9
9 #define GLM_VERSION_REVISION 6
10 #define GLM_VERSION 996
11 #define GLM_VERSION_MESSAGE "GLM: version 0.9.9.6"
12 
13 #define GLM_SETUP_INCLUDED GLM_VERSION
14 
16 // Active states
17 
18 #define GLM_DISABLE 0
19 #define GLM_ENABLE 1
20 
22 // Messages
23 
24 #if defined(GLM_FORCE_MESSAGES)
25 # define GLM_MESSAGES GLM_ENABLE
26 #else
27 # define GLM_MESSAGES GLM_DISABLE
28 #endif
29 
31 // Detect the platform
32 
33 #include "../simd/platform.h"
34 
36 // Build model
37 
38 #if defined(__arch64__) || defined(__LP64__) || defined(_M_X64) || defined(__ppc64__) || defined(__x86_64__)
39 # define GLM_MODEL GLM_MODEL_64
40 #elif defined(__i386__) || defined(__ppc__)
41 # define GLM_MODEL GLM_MODEL_32
42 #else
43 # define GLM_MODEL GLM_MODEL_32
44 #endif//
45 
46 #if !defined(GLM_MODEL) && GLM_COMPILER != 0
47 # error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message."
48 #endif//GLM_MODEL
49 
51 // C++ Version
52 
53 // User defines: GLM_FORCE_CXX98, GLM_FORCE_CXX03, GLM_FORCE_CXX11, GLM_FORCE_CXX14, GLM_FORCE_CXX17, GLM_FORCE_CXX2A
54 
55 #define GLM_LANG_CXX98_FLAG (1 << 1)
56 #define GLM_LANG_CXX03_FLAG (1 << 2)
57 #define GLM_LANG_CXX0X_FLAG (1 << 3)
58 #define GLM_LANG_CXX11_FLAG (1 << 4)
59 #define GLM_LANG_CXX14_FLAG (1 << 5)
60 #define GLM_LANG_CXX17_FLAG (1 << 6)
61 #define GLM_LANG_CXX2A_FLAG (1 << 7)
62 #define GLM_LANG_CXXMS_FLAG (1 << 8)
63 #define GLM_LANG_CXXGNU_FLAG (1 << 9)
64 
65 #define GLM_LANG_CXX98 GLM_LANG_CXX98_FLAG
66 #define GLM_LANG_CXX03 (GLM_LANG_CXX98 | GLM_LANG_CXX03_FLAG)
67 #define GLM_LANG_CXX0X (GLM_LANG_CXX03 | GLM_LANG_CXX0X_FLAG)
68 #define GLM_LANG_CXX11 (GLM_LANG_CXX0X | GLM_LANG_CXX11_FLAG)
69 #define GLM_LANG_CXX14 (GLM_LANG_CXX11 | GLM_LANG_CXX14_FLAG)
70 #define GLM_LANG_CXX17 (GLM_LANG_CXX14 | GLM_LANG_CXX17_FLAG)
71 #define GLM_LANG_CXX2A (GLM_LANG_CXX17 | GLM_LANG_CXX2A_FLAG)
72 #define GLM_LANG_CXXMS GLM_LANG_CXXMS_FLAG
73 #define GLM_LANG_CXXGNU GLM_LANG_CXXGNU_FLAG
74 
75 #if (defined(_MSC_EXTENSIONS))
76 # define GLM_LANG_EXT GLM_LANG_CXXMS_FLAG
77 #elif ((GLM_COMPILER & (GLM_COMPILER_CLANG | GLM_COMPILER_GCC)) && (GLM_ARCH & GLM_ARCH_SIMD_BIT))
78 # define GLM_LANG_EXT GLM_LANG_CXXMS_FLAG
79 #else
80 # define GLM_LANG_EXT 0
81 #endif
82 
83 #if (defined(GLM_FORCE_CXX_UNKNOWN))
84 # define GLM_LANG 0
85 #elif defined(GLM_FORCE_CXX2A)
86 # define GLM_LANG (GLM_LANG_CXX2A | GLM_LANG_EXT)
87 # define GLM_LANG_STL11_FORCED
88 #elif defined(GLM_FORCE_CXX17)
89 # define GLM_LANG (GLM_LANG_CXX17 | GLM_LANG_EXT)
90 # define GLM_LANG_STL11_FORCED
91 #elif defined(GLM_FORCE_CXX14)
92 # define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_EXT)
93 # define GLM_LANG_STL11_FORCED
94 #elif defined(GLM_FORCE_CXX11)
95 # define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_EXT)
96 # define GLM_LANG_STL11_FORCED
97 #elif defined(GLM_FORCE_CXX03)
98 # define GLM_LANG (GLM_LANG_CXX03 | GLM_LANG_EXT)
99 #elif defined(GLM_FORCE_CXX98)
100 # define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_EXT)
101 #else
102 # if GLM_COMPILER & GLM_COMPILER_VC && defined(_MSVC_LANG)
103 # if GLM_COMPILER >= GLM_COMPILER_VC15_7
104 # define GLM_LANG_PLATFORM _MSVC_LANG
105 # elif GLM_COMPILER >= GLM_COMPILER_VC15
106 # if _MSVC_LANG > 201402L
107 # define GLM_LANG_PLATFORM 201402L
108 # else
109 # define GLM_LANG_PLATFORM _MSVC_LANG
110 # endif
111 # else
112 # define GLM_LANG_PLATFORM 0
113 # endif
114 # else
115 # define GLM_LANG_PLATFORM 0
116 # endif
117 
118 # if __cplusplus > 201703L || GLM_LANG_PLATFORM > 201703L
119 # define GLM_LANG (GLM_LANG_CXX2A | GLM_LANG_EXT)
120 # elif __cplusplus == 201703L || GLM_LANG_PLATFORM == 201703L
121 # define GLM_LANG (GLM_LANG_CXX17 | GLM_LANG_EXT)
122 # elif __cplusplus == 201402L || __cplusplus == 201500L || GLM_LANG_PLATFORM == 201402L
123 # define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_EXT)
124 # elif __cplusplus == 201103L || GLM_LANG_PLATFORM == 201103L
125 # define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_EXT)
126 # elif defined(__INTEL_CXX11_MODE__) || defined(_MSC_VER) || defined(__GXX_EXPERIMENTAL_CXX0X__)
127 # define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_EXT)
128 # elif __cplusplus == 199711L
129 # define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_EXT)
130 # else
131 # define GLM_LANG (0 | GLM_LANG_EXT)
132 # endif
133 #endif
134 
136 // Has of C++ features
137 
138 // http://clang.llvm.org/cxx_status.html
139 // http://gcc.gnu.org/projects/cxx0x.html
140 // http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx
141 
142 // Android has multiple STLs but C++11 STL detection doesn't always work #284 #564
143 #if GLM_PLATFORM == GLM_PLATFORM_ANDROID && !defined(GLM_LANG_STL11_FORCED)
144 # define GLM_HAS_CXX11_STL 0
145 #elif GLM_COMPILER & GLM_COMPILER_CLANG
146 # if (defined(_LIBCPP_VERSION) || (GLM_LANG & GLM_LANG_CXX11_FLAG) || defined(GLM_LANG_STL11_FORCED))
147 # define GLM_HAS_CXX11_STL 1
148 # else
149 # define GLM_HAS_CXX11_STL 0
150 # endif
151 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
152 # define GLM_HAS_CXX11_STL 1
153 #else
154 # define GLM_HAS_CXX11_STL ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
155  ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \
156  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
157  ((GLM_PLATFORM != GLM_PLATFORM_WINDOWS) && (GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15))))
158 #endif
159 
160 // N1720
161 #if GLM_COMPILER & GLM_COMPILER_CLANG
162 # define GLM_HAS_STATIC_ASSERT __has_feature(cxx_static_assert)
163 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
164 # define GLM_HAS_STATIC_ASSERT 1
165 #else
166 # define GLM_HAS_STATIC_ASSERT ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
167  ((GLM_COMPILER & GLM_COMPILER_CUDA)) || \
168  ((GLM_COMPILER & GLM_COMPILER_VC))))
169 #endif
170 
171 // N1988
172 #if GLM_LANG & GLM_LANG_CXX11_FLAG
173 # define GLM_HAS_EXTENDED_INTEGER_TYPE 1
174 #else
175 # define GLM_HAS_EXTENDED_INTEGER_TYPE (\
176  ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC)) || \
177  ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CUDA)) || \
178  ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CLANG)))
179 #endif
180 
181 // N2672 Initializer lists http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm
182 #if GLM_COMPILER & GLM_COMPILER_CLANG
183 # define GLM_HAS_INITIALIZER_LISTS __has_feature(cxx_generalized_initializers)
184 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
185 # define GLM_HAS_INITIALIZER_LISTS 1
186 #else
187 # define GLM_HAS_INITIALIZER_LISTS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
188  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15)) || \
189  ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \
190  ((GLM_COMPILER & GLM_COMPILER_CUDA))))
191 #endif
192 
193 // N2544 Unrestricted unions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf
194 #if GLM_COMPILER & GLM_COMPILER_CLANG
195 # define GLM_HAS_UNRESTRICTED_UNIONS __has_feature(cxx_unrestricted_unions)
196 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
197 # define GLM_HAS_UNRESTRICTED_UNIONS 1
198 #else
199 # define GLM_HAS_UNRESTRICTED_UNIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
200  (GLM_COMPILER & GLM_COMPILER_VC) || \
201  ((GLM_COMPILER & GLM_COMPILER_CUDA)))
202 #endif
203 
204 // N2346
205 #if GLM_COMPILER & GLM_COMPILER_CLANG
206 # define GLM_HAS_DEFAULTED_FUNCTIONS __has_feature(cxx_defaulted_functions)
207 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
208 # define GLM_HAS_DEFAULTED_FUNCTIONS 1
209 #else
210 # define GLM_HAS_DEFAULTED_FUNCTIONS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
211  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
212  ((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
213  (GLM_COMPILER & GLM_COMPILER_CUDA)))
214 #endif
215 
216 // N2118
217 #if GLM_COMPILER & GLM_COMPILER_CLANG
218 # define GLM_HAS_RVALUE_REFERENCES __has_feature(cxx_rvalue_references)
219 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
220 # define GLM_HAS_RVALUE_REFERENCES 1
221 #else
222 # define GLM_HAS_RVALUE_REFERENCES ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
223  ((GLM_COMPILER & GLM_COMPILER_VC)) || \
224  ((GLM_COMPILER & GLM_COMPILER_CUDA))))
225 #endif
226 
227 // N2437 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf
228 #if GLM_COMPILER & GLM_COMPILER_CLANG
229 # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS __has_feature(cxx_explicit_conversions)
230 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
231 # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS 1
232 #else
233 # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
234  ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \
235  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
236  ((GLM_COMPILER & GLM_COMPILER_CUDA))))
237 #endif
238 
239 // N2258 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf
240 #if GLM_COMPILER & GLM_COMPILER_CLANG
241 # define GLM_HAS_TEMPLATE_ALIASES __has_feature(cxx_alias_templates)
242 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
243 # define GLM_HAS_TEMPLATE_ALIASES 1
244 #else
245 # define GLM_HAS_TEMPLATE_ALIASES ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
246  ((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
247  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
248  ((GLM_COMPILER & GLM_COMPILER_CUDA))))
249 #endif
250 
251 // N2930 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2930.html
252 #if GLM_COMPILER & GLM_COMPILER_CLANG
253 # define GLM_HAS_RANGE_FOR __has_feature(cxx_range_for)
254 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
255 # define GLM_HAS_RANGE_FOR 1
256 #else
257 # define GLM_HAS_RANGE_FOR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
258  ((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
259  ((GLM_COMPILER & GLM_COMPILER_VC)) || \
260  ((GLM_COMPILER & GLM_COMPILER_CUDA))))
261 #endif
262 
263 // N2341 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf
264 #if GLM_COMPILER & GLM_COMPILER_CLANG
265 # define GLM_HAS_ALIGNOF __has_feature(cxx_alignas)
266 #elif GLM_LANG & GLM_LANG_CXX11_FLAG
267 # define GLM_HAS_ALIGNOF 1
268 #else
269 # define GLM_HAS_ALIGNOF ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
270  ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15)) || \
271  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14)) || \
272  ((GLM_COMPILER & GLM_COMPILER_CUDA))))
273 #endif
274 
275 // N2235 Generalized Constant Expressions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf
276 // N3652 Extended Constant Expressions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3652.html
277 #if (GLM_ARCH & GLM_ARCH_SIMD_BIT) // Compiler SIMD intrinsics don't support constexpr...
278 # define GLM_HAS_CONSTEXPR 0
279 #elif (GLM_COMPILER & GLM_COMPILER_CLANG)
280 # define GLM_HAS_CONSTEXPR __has_feature(cxx_relaxed_constexpr)
281 #elif (GLM_LANG & GLM_LANG_CXX14_FLAG)
282 # define GLM_HAS_CONSTEXPR 1
283 #else
284 # define GLM_HAS_CONSTEXPR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && GLM_HAS_INITIALIZER_LISTS && (\
285  ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL17)) || \
286  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15))))
287 #endif
288 
289 #if GLM_HAS_CONSTEXPR
290 # define GLM_CONSTEXPR constexpr
291 #else
292 # define GLM_CONSTEXPR
293 #endif
294 
295 //
296 #if GLM_HAS_CONSTEXPR
297 # if (GLM_COMPILER & GLM_COMPILER_CLANG)
298 # if __has_feature(cxx_if_constexpr)
299 # define GLM_HAS_IF_CONSTEXPR 1
300 # else
301 # define GLM_HAS_IF_CONSTEXPR 0
302 # endif
303 # elif (GLM_LANG & GLM_LANG_CXX17_FLAG)
304 # define GLM_HAS_IF_CONSTEXPR 1
305 # else
306 # define GLM_HAS_IF_CONSTEXPR 0
307 # endif
308 #else
309 # define GLM_HAS_IF_CONSTEXPR 0
310 #endif
311 
312 #if GLM_HAS_IF_CONSTEXPR
313 # define GLM_IF_CONSTEXPR if constexpr
314 #else
315 # define GLM_IF_CONSTEXPR if
316 #endif
317 
318 //
319 #if GLM_LANG & GLM_LANG_CXX11_FLAG
320 # define GLM_HAS_ASSIGNABLE 1
321 #else
322 # define GLM_HAS_ASSIGNABLE ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
323  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC15)) || \
324  ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC49))))
325 #endif
326 
327 //
328 #define GLM_HAS_TRIVIAL_QUERIES 0
329 
330 //
331 #if GLM_LANG & GLM_LANG_CXX11_FLAG
332 # define GLM_HAS_MAKE_SIGNED 1
333 #else
334 # define GLM_HAS_MAKE_SIGNED ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
335  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12)) || \
336  ((GLM_COMPILER & GLM_COMPILER_CUDA))))
337 #endif
338 
339 //
340 #if defined(GLM_FORCE_INTRINSICS)
341 # define GLM_HAS_BITSCAN_WINDOWS ((GLM_PLATFORM & GLM_PLATFORM_WINDOWS) && (\
342  ((GLM_COMPILER & GLM_COMPILER_INTEL)) || \
343  ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC14) && (GLM_ARCH & GLM_ARCH_X86_BIT))))
344 #else
345 # define GLM_HAS_BITSCAN_WINDOWS 0
346 #endif
347 
349 // OpenMP
350 #ifdef _OPENMP
351 # if GLM_COMPILER & GLM_COMPILER_GCC
352 # if GLM_COMPILER >= GLM_COMPILER_GCC61
353 # define GLM_HAS_OPENMP 45
354 # elif GLM_COMPILER >= GLM_COMPILER_GCC49
355 # define GLM_HAS_OPENMP 40
356 # elif GLM_COMPILER >= GLM_COMPILER_GCC47
357 # define GLM_HAS_OPENMP 31
358 # else
359 # define GLM_HAS_OPENMP 0
360 # endif
361 # elif GLM_COMPILER & GLM_COMPILER_CLANG
362 # if GLM_COMPILER >= GLM_COMPILER_CLANG38
363 # define GLM_HAS_OPENMP 31
364 # else
365 # define GLM_HAS_OPENMP 0
366 # endif
367 # elif GLM_COMPILER & GLM_COMPILER_VC
368 # define GLM_HAS_OPENMP 20
369 # elif GLM_COMPILER & GLM_COMPILER_INTEL
370 # if GLM_COMPILER >= GLM_COMPILER_INTEL16
371 # define GLM_HAS_OPENMP 40
372 # else
373 # define GLM_HAS_OPENMP 0
374 # endif
375 # else
376 # define GLM_HAS_OPENMP 0
377 # endif
378 #else
379 # define GLM_HAS_OPENMP 0
380 #endif
381 
383 // nullptr
384 
385 #if GLM_LANG & GLM_LANG_CXX0X_FLAG
386 # define GLM_CONFIG_NULLPTR GLM_ENABLE
387 #else
388 # define GLM_CONFIG_NULLPTR GLM_DISABLE
389 #endif
390 
391 #if GLM_CONFIG_NULLPTR == GLM_ENABLE
392 # define GLM_NULLPTR nullptr
393 #else
394 # define GLM_NULLPTR 0
395 #endif
396 
398 // Static assert
399 
400 #if GLM_HAS_STATIC_ASSERT
401 # define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
402 #elif GLM_COMPILER & GLM_COMPILER_VC
403 # define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
404 #else
405 # define GLM_STATIC_ASSERT(x, message) assert(x)
406 #endif//GLM_LANG
407 
409 // Qualifiers
410 
411 #if GLM_COMPILER & GLM_COMPILER_CUDA
412 # define GLM_CUDA_FUNC_DEF __device__ __host__
413 # define GLM_CUDA_FUNC_DECL __device__ __host__
414 #else
415 # define GLM_CUDA_FUNC_DEF
416 # define GLM_CUDA_FUNC_DECL
417 #endif
418 
419 #if defined(GLM_FORCE_INLINE)
420 # if GLM_COMPILER & GLM_COMPILER_VC
421 # define GLM_INLINE __forceinline
422 # define GLM_NEVER_INLINE __declspec((noinline))
423 # elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG)
424 # define GLM_INLINE inline __attribute__((__always_inline__))
425 # define GLM_NEVER_INLINE __attribute__((__noinline__))
426 # elif GLM_COMPILER & GLM_COMPILER_CUDA
427 # define GLM_INLINE __forceinline__
428 # define GLM_NEVER_INLINE __noinline__
429 # else
430 # define GLM_INLINE inline
431 # define GLM_NEVER_INLINE
432 # endif//GLM_COMPILER
433 #else
434 # define GLM_INLINE inline
435 # define GLM_NEVER_INLINE
436 #endif//defined(GLM_FORCE_INLINE)
437 
438 #define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL
439 #define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE
440 
442 // Swizzle operators
443 
444 // User defines: GLM_FORCE_SWIZZLE
445 
446 #define GLM_SWIZZLE_DISABLED 0
447 #define GLM_SWIZZLE_OPERATOR 1
448 #define GLM_SWIZZLE_FUNCTION 2
449 
450 #if defined(GLM_FORCE_XYZW_ONLY)
451 # undef GLM_FORCE_SWIZZLE
452 #endif
453 
454 #if defined(GLM_SWIZZLE)
455 # pragma message("GLM: GLM_SWIZZLE is deprecated, use GLM_FORCE_SWIZZLE instead.")
456 # define GLM_FORCE_SWIZZLE
457 #endif
458 
459 #if defined(GLM_FORCE_SWIZZLE) && (GLM_LANG & GLM_LANG_CXXMS_FLAG)
460 # define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_OPERATOR
461 #elif defined(GLM_FORCE_SWIZZLE)
462 # define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_FUNCTION
463 #else
464 # define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_DISABLED
465 #endif
466 
468 // Allows using not basic types as genType
469 
470 // #define GLM_FORCE_UNRESTRICTED_GENTYPE
471 
472 #ifdef GLM_FORCE_UNRESTRICTED_GENTYPE
473 # define GLM_CONFIG_UNRESTRICTED_GENTYPE GLM_ENABLE
474 #else
475 # define GLM_CONFIG_UNRESTRICTED_GENTYPE GLM_DISABLE
476 #endif
477 
479 // Clip control, define GLM_FORCE_DEPTH_ZERO_TO_ONE before including GLM
480 // to use a clip space between 0 to 1.
481 // Coordinate system, define GLM_FORCE_LEFT_HANDED before including GLM
482 // to use left handed coordinate system by default.
483 
484 #define GLM_CLIP_CONTROL_ZO_BIT (1 << 0) // ZERO_TO_ONE
485 #define GLM_CLIP_CONTROL_NO_BIT (1 << 1) // NEGATIVE_ONE_TO_ONE
486 #define GLM_CLIP_CONTROL_LH_BIT (1 << 2) // LEFT_HANDED, For DirectX, Metal, Vulkan
487 #define GLM_CLIP_CONTROL_RH_BIT (1 << 3) // RIGHT_HANDED, For OpenGL, default in GLM
488 
489 #define GLM_CLIP_CONTROL_LH_ZO (GLM_CLIP_CONTROL_LH_BIT | GLM_CLIP_CONTROL_ZO_BIT)
490 #define GLM_CLIP_CONTROL_LH_NO (GLM_CLIP_CONTROL_LH_BIT | GLM_CLIP_CONTROL_NO_BIT)
491 #define GLM_CLIP_CONTROL_RH_ZO (GLM_CLIP_CONTROL_RH_BIT | GLM_CLIP_CONTROL_ZO_BIT)
492 #define GLM_CLIP_CONTROL_RH_NO (GLM_CLIP_CONTROL_RH_BIT | GLM_CLIP_CONTROL_NO_BIT)
493 
494 #ifdef GLM_FORCE_DEPTH_ZERO_TO_ONE
495 # ifdef GLM_FORCE_LEFT_HANDED
496 # define GLM_CONFIG_CLIP_CONTROL GLM_CLIP_CONTROL_LH_ZO
497 # else
498 # define GLM_CONFIG_CLIP_CONTROL GLM_CLIP_CONTROL_RH_ZO
499 # endif
500 #else
501 # ifdef GLM_FORCE_LEFT_HANDED
502 # define GLM_CONFIG_CLIP_CONTROL GLM_CLIP_CONTROL_LH_NO
503 # else
504 # define GLM_CONFIG_CLIP_CONTROL GLM_CLIP_CONTROL_RH_NO
505 # endif
506 #endif
507 
509 // Qualifiers
510 
511 #if (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))
512 # define GLM_DEPRECATED __declspec(deprecated)
513 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef __declspec(align(alignment)) type name
514 #elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG | GLM_COMPILER_INTEL)
515 # define GLM_DEPRECATED __attribute__((__deprecated__))
516 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __attribute__((aligned(alignment)))
517 #elif GLM_COMPILER & GLM_COMPILER_CUDA
518 # define GLM_DEPRECATED
519 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __align__(x)
520 #else
521 # define GLM_DEPRECATED
522 # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name
523 #endif
524 
526 
527 #ifdef GLM_FORCE_EXPLICIT_CTOR
528 # define GLM_EXPLICIT explicit
529 #else
530 # define GLM_EXPLICIT
531 #endif
532 
534 // SYCL
535 
536 #if GLM_COMPILER==GLM_COMPILER_SYCL
537 
538 #include <CL/sycl.hpp>
539 #include <limits>
540 
541 namespace glm {
542 namespace std {
543  // Import SYCL's functions into the namespace glm::std to force their usages.
544  // It's important to use the math built-in function (sin, exp, ...)
545  // of SYCL instead the std ones.
546  using namespace cl::sycl;
547 
549  // Import some "harmless" std's stuffs used by glm into
550  // the new glm::std namespace.
551  template<typename T>
552  using numeric_limits = ::std::numeric_limits<T>;
553 
554  using ::std::size_t;
555 
560 
565 
566  using ::std::make_unsigned;
568 } //namespace std
569 } //namespace glm
570 
571 #endif
572 
574 
576 // Length type: all length functions returns a length_t type.
577 // When GLM_FORCE_SIZE_T_LENGTH is defined, length_t is a typedef of size_t otherwise
578 // length_t is a typedef of int like GLSL defines it.
579 
580 #define GLM_LENGTH_INT 1
581 #define GLM_LENGTH_SIZE_T 2
582 
583 #ifdef GLM_FORCE_SIZE_T_LENGTH
584 # define GLM_CONFIG_LENGTH_TYPE GLM_LENGTH_SIZE_T
585 #else
586 # define GLM_CONFIG_LENGTH_TYPE GLM_LENGTH_INT
587 #endif
588 
589 namespace glm
590 {
591  using std::size_t;
592 # if GLM_CONFIG_LENGTH_TYPE == GLM_LENGTH_SIZE_T
593  typedef size_t length_t;
594 # else
595  typedef int length_t;
596 # endif
597 }//namespace glm
598 
600 // constexpr
601 
602 #if GLM_HAS_CONSTEXPR
603 # define GLM_CONFIG_CONSTEXP GLM_ENABLE
604 
605  namespace glm
606  {
607  template<typename T, std::size_t N>
608  constexpr std::size_t countof(T const (&)[N])
609  {
610  return N;
611  }
612  }//namespace glm
613 # define GLM_COUNTOF(arr) glm::countof(arr)
614 #elif defined(_MSC_VER)
615 # define GLM_CONFIG_CONSTEXP GLM_DISABLE
616 
617 # define GLM_COUNTOF(arr) _countof(arr)
618 #else
619 # define GLM_CONFIG_CONSTEXP GLM_DISABLE
620 
621 # define GLM_COUNTOF(arr) sizeof(arr) / sizeof(arr[0])
622 #endif
623 
625 // uint
626 
627 namespace glm{
628 namespace detail
629 {
630  template<typename T>
631  struct is_int
632  {
633  enum test {value = 0};
634  };
635 
636  template<>
637  struct is_int<unsigned int>
638  {
639  enum test {value = ~0};
640  };
641 
642  template<>
643  struct is_int<signed int>
644  {
645  enum test {value = ~0};
646  };
647 }//namespace detail
648 
649  typedef unsigned int uint;
650 }//namespace glm
651 
653 // 64-bit int
654 
655 #if GLM_HAS_EXTENDED_INTEGER_TYPE
656 # include <cstdint>
657 #endif
658 
659 namespace glm{
660 namespace detail
661 {
662 # if GLM_HAS_EXTENDED_INTEGER_TYPE
663  typedef std::uint64_t uint64;
664  typedef std::int64_t int64;
665 # elif (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available
666  typedef uint64_t uint64;
667  typedef int64_t int64;
668 # elif GLM_COMPILER & GLM_COMPILER_VC
669  typedef unsigned __int64 uint64;
670  typedef signed __int64 int64;
671 # elif GLM_COMPILER & GLM_COMPILER_GCC
672 # pragma GCC diagnostic ignored "-Wlong-long"
673  __extension__ typedef unsigned long long uint64;
674  __extension__ typedef signed long long int64;
675 # elif (GLM_COMPILER & GLM_COMPILER_CLANG)
676 # pragma clang diagnostic ignored "-Wc++11-long-long"
677  typedef unsigned long long uint64;
678  typedef signed long long int64;
679 # else//unknown compiler
680  typedef unsigned long long uint64;
681  typedef signed long long int64;
682 # endif
683 }//namespace detail
684 }//namespace glm
685 
687 // make_unsigned
688 
689 #if GLM_HAS_MAKE_SIGNED
690 # include <type_traits>
691 
692 namespace glm{
693 namespace detail
694 {
695  using std::make_unsigned;
696 }//namespace detail
697 }//namespace glm
698 
699 #else
700 
701 namespace glm{
702 namespace detail
703 {
704  template<typename genType>
705  struct make_unsigned
706  {};
707 
708  template<>
709  struct make_unsigned<char>
710  {
711  typedef unsigned char type;
712  };
713 
714  template<>
715  struct make_unsigned<signed char>
716  {
717  typedef unsigned char type;
718  };
719 
720  template<>
721  struct make_unsigned<short>
722  {
723  typedef unsigned short type;
724  };
725 
726  template<>
727  struct make_unsigned<int>
728  {
729  typedef unsigned int type;
730  };
731 
732  template<>
733  struct make_unsigned<long>
734  {
735  typedef unsigned long type;
736  };
737 
738  template<>
739  struct make_unsigned<int64>
740  {
741  typedef uint64 type;
742  };
743 
744  template<>
745  struct make_unsigned<unsigned char>
746  {
747  typedef unsigned char type;
748  };
749 
750  template<>
751  struct make_unsigned<unsigned short>
752  {
753  typedef unsigned short type;
754  };
755 
756  template<>
757  struct make_unsigned<unsigned int>
758  {
759  typedef unsigned int type;
760  };
761 
762  template<>
763  struct make_unsigned<unsigned long>
764  {
765  typedef unsigned long type;
766  };
767 
768  template<>
769  struct make_unsigned<uint64>
770  {
771  typedef uint64 type;
772  };
773 }//namespace detail
774 }//namespace glm
775 #endif
776 
778 // Only use x, y, z, w as vector type components
779 
780 #ifdef GLM_FORCE_XYZW_ONLY
781 # define GLM_CONFIG_XYZW_ONLY GLM_ENABLE
782 #else
783 # define GLM_CONFIG_XYZW_ONLY GLM_DISABLE
784 #endif
785 
787 // Configure the use of defaulted initialized types
788 
789 #define GLM_CTOR_INIT_DISABLE 0
790 #define GLM_CTOR_INITIALIZER_LIST 1
791 #define GLM_CTOR_INITIALISATION 2
792 
793 #if defined(GLM_FORCE_CTOR_INIT) && GLM_HAS_INITIALIZER_LISTS
794 # define GLM_CONFIG_CTOR_INIT GLM_CTOR_INITIALIZER_LIST
795 #elif defined(GLM_FORCE_CTOR_INIT) && !GLM_HAS_INITIALIZER_LISTS
796 # define GLM_CONFIG_CTOR_INIT GLM_CTOR_INITIALISATION
797 #else
798 # define GLM_CONFIG_CTOR_INIT GLM_CTOR_INIT_DISABLE
799 #endif
800 
802 // Use SIMD instruction sets
803 
804 #if GLM_HAS_ALIGNOF && (GLM_LANG & GLM_LANG_CXXMS_FLAG) && (GLM_ARCH & GLM_ARCH_SIMD_BIT)
805 # define GLM_CONFIG_SIMD GLM_ENABLE
806 #else
807 # define GLM_CONFIG_SIMD GLM_DISABLE
808 #endif
809 
811 // Configure the use of defaulted function
812 
813 #if GLM_HAS_DEFAULTED_FUNCTIONS && GLM_CONFIG_CTOR_INIT == GLM_CTOR_INIT_DISABLE
814 # define GLM_CONFIG_DEFAULTED_FUNCTIONS GLM_ENABLE
815 # define GLM_DEFAULT = default
816 #else
817 # define GLM_CONFIG_DEFAULTED_FUNCTIONS GLM_DISABLE
818 # define GLM_DEFAULT
819 #endif
820 
822 // Configure the use of aligned gentypes
823 
824 #ifdef GLM_FORCE_ALIGNED // Legacy define
825 # define GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
826 #endif
827 
828 #ifdef GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
829 # define GLM_FORCE_ALIGNED_GENTYPES
830 #endif
831 
832 #if GLM_HAS_ALIGNOF && (GLM_LANG & GLM_LANG_CXXMS_FLAG) && (defined(GLM_FORCE_ALIGNED_GENTYPES) || (GLM_CONFIG_SIMD == GLM_ENABLE))
833 # define GLM_CONFIG_ALIGNED_GENTYPES GLM_ENABLE
834 #else
835 # define GLM_CONFIG_ALIGNED_GENTYPES GLM_DISABLE
836 #endif
837 
839 // Configure the use of anonymous structure as implementation detail
840 
841 #if ((GLM_CONFIG_SIMD == GLM_ENABLE) || (GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR) || (GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE))
842 # define GLM_CONFIG_ANONYMOUS_STRUCT GLM_ENABLE
843 #else
844 # define GLM_CONFIG_ANONYMOUS_STRUCT GLM_DISABLE
845 #endif
846 
848 // Silent warnings
849 
850 #ifdef GLM_FORCE_SILENT_WARNINGS
851 # define GLM_SILENT_WARNINGS GLM_ENABLE
852 #else
853 # define GLM_SILENT_WARNINGS GLM_DISABLE
854 #endif
855 
857 // Precision
858 
859 #define GLM_HIGHP 1
860 #define GLM_MEDIUMP 2
861 #define GLM_LOWP 3
862 
863 #if defined(GLM_FORCE_PRECISION_HIGHP_BOOL) || defined(GLM_PRECISION_HIGHP_BOOL)
864 # define GLM_CONFIG_PRECISION_BOOL GLM_HIGHP
865 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_BOOL) || defined(GLM_PRECISION_MEDIUMP_BOOL)
866 # define GLM_CONFIG_PRECISION_BOOL GLM_MEDIUMP
867 #elif defined(GLM_FORCE_PRECISION_LOWP_BOOL) || defined(GLM_PRECISION_LOWP_BOOL)
868 # define GLM_CONFIG_PRECISION_BOOL GLM_LOWP
869 #else
870 # define GLM_CONFIG_PRECISION_BOOL GLM_HIGHP
871 #endif
872 
873 #if defined(GLM_FORCE_PRECISION_HIGHP_INT) || defined(GLM_PRECISION_HIGHP_INT)
874 # define GLM_CONFIG_PRECISION_INT GLM_HIGHP
875 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_INT) || defined(GLM_PRECISION_MEDIUMP_INT)
876 # define GLM_CONFIG_PRECISION_INT GLM_MEDIUMP
877 #elif defined(GLM_FORCE_PRECISION_LOWP_INT) || defined(GLM_PRECISION_LOWP_INT)
878 # define GLM_CONFIG_PRECISION_INT GLM_LOWP
879 #else
880 # define GLM_CONFIG_PRECISION_INT GLM_HIGHP
881 #endif
882 
883 #if defined(GLM_FORCE_PRECISION_HIGHP_UINT) || defined(GLM_PRECISION_HIGHP_UINT)
884 # define GLM_CONFIG_PRECISION_UINT GLM_HIGHP
885 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_UINT) || defined(GLM_PRECISION_MEDIUMP_UINT)
886 # define GLM_CONFIG_PRECISION_UINT GLM_MEDIUMP
887 #elif defined(GLM_FORCE_PRECISION_LOWP_UINT) || defined(GLM_PRECISION_LOWP_UINT)
888 # define GLM_CONFIG_PRECISION_UINT GLM_LOWP
889 #else
890 # define GLM_CONFIG_PRECISION_UINT GLM_HIGHP
891 #endif
892 
893 #if defined(GLM_FORCE_PRECISION_HIGHP_FLOAT) || defined(GLM_PRECISION_HIGHP_FLOAT)
894 # define GLM_CONFIG_PRECISION_FLOAT GLM_HIGHP
895 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_FLOAT) || defined(GLM_PRECISION_MEDIUMP_FLOAT)
896 # define GLM_CONFIG_PRECISION_FLOAT GLM_MEDIUMP
897 #elif defined(GLM_FORCE_PRECISION_LOWP_FLOAT) || defined(GLM_PRECISION_LOWP_FLOAT)
898 # define GLM_CONFIG_PRECISION_FLOAT GLM_LOWP
899 #else
900 # define GLM_CONFIG_PRECISION_FLOAT GLM_HIGHP
901 #endif
902 
903 #if defined(GLM_FORCE_PRECISION_HIGHP_DOUBLE) || defined(GLM_PRECISION_HIGHP_DOUBLE)
904 # define GLM_CONFIG_PRECISION_DOUBLE GLM_HIGHP
905 #elif defined(GLM_FORCE_PRECISION_MEDIUMP_DOUBLE) || defined(GLM_PRECISION_MEDIUMP_DOUBLE)
906 # define GLM_CONFIG_PRECISION_DOUBLE GLM_MEDIUMP
907 #elif defined(GLM_FORCE_PRECISION_LOWP_DOUBLE) || defined(GLM_PRECISION_LOWP_DOUBLE)
908 # define GLM_CONFIG_PRECISION_DOUBLE GLM_LOWP
909 #else
910 # define GLM_CONFIG_PRECISION_DOUBLE GLM_HIGHP
911 #endif
912 
914 // Check inclusions of different versions of GLM
915 
916 #elif ((GLM_SETUP_INCLUDED != GLM_VERSION) && !defined(GLM_FORCE_IGNORE_VERSION))
917 # error "GLM error: A different version of GLM is already included. Define GLM_FORCE_IGNORE_VERSION before including GLM headers to ignore this error."
918 #elif GLM_SETUP_INCLUDED == GLM_VERSION
919 
921 // Messages
922 
923 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_MESSAGE_DISPLAYED)
924 # define GLM_MESSAGE_DISPLAYED
925 # define GLM_STR_HELPER(x) #x
926 # define GLM_STR(x) GLM_STR_HELPER(x)
927 
928  // Report GLM version
929 # pragma message (GLM_STR(GLM_VERSION_MESSAGE))
930 
931  // Report C++ language
932 # if (GLM_LANG & GLM_LANG_CXX2A_FLAG) && (GLM_LANG & GLM_LANG_EXT)
933 # pragma message("GLM: C++ 2A with extensions")
934 # elif (GLM_LANG & GLM_LANG_CXX2A_FLAG)
935 # pragma message("GLM: C++ 2A")
936 # elif (GLM_LANG & GLM_LANG_CXX17_FLAG) && (GLM_LANG & GLM_LANG_EXT)
937 # pragma message("GLM: C++ 17 with extensions")
938 # elif (GLM_LANG & GLM_LANG_CXX17_FLAG)
939 # pragma message("GLM: C++ 17")
940 # elif (GLM_LANG & GLM_LANG_CXX14_FLAG) && (GLM_LANG & GLM_LANG_EXT)
941 # pragma message("GLM: C++ 14 with extensions")
942 # elif (GLM_LANG & GLM_LANG_CXX14_FLAG)
943 # pragma message("GLM: C++ 14")
944 # elif (GLM_LANG & GLM_LANG_CXX11_FLAG) && (GLM_LANG & GLM_LANG_EXT)
945 # pragma message("GLM: C++ 11 with extensions")
946 # elif (GLM_LANG & GLM_LANG_CXX11_FLAG)
947 # pragma message("GLM: C++ 11")
948 # elif (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_LANG & GLM_LANG_EXT)
949 # pragma message("GLM: C++ 0x with extensions")
950 # elif (GLM_LANG & GLM_LANG_CXX0X_FLAG)
951 # pragma message("GLM: C++ 0x")
952 # elif (GLM_LANG & GLM_LANG_CXX03_FLAG) && (GLM_LANG & GLM_LANG_EXT)
953 # pragma message("GLM: C++ 03 with extensions")
954 # elif (GLM_LANG & GLM_LANG_CXX03_FLAG)
955 # pragma message("GLM: C++ 03")
956 # elif (GLM_LANG & GLM_LANG_CXX98_FLAG) && (GLM_LANG & GLM_LANG_EXT)
957 # pragma message("GLM: C++ 98 with extensions")
958 # elif (GLM_LANG & GLM_LANG_CXX98_FLAG)
959 # pragma message("GLM: C++ 98")
960 # else
961 # pragma message("GLM: C++ language undetected")
962 # endif//GLM_LANG
963 
964  // Report compiler detection
965 # if GLM_COMPILER & GLM_COMPILER_CUDA
966 # pragma message("GLM: CUDA compiler detected")
967 # elif GLM_COMPILER & GLM_COMPILER_VC
968 # pragma message("GLM: Visual C++ compiler detected")
969 # elif GLM_COMPILER & GLM_COMPILER_CLANG
970 # pragma message("GLM: Clang compiler detected")
971 # elif GLM_COMPILER & GLM_COMPILER_INTEL
972 # pragma message("GLM: Intel Compiler detected")
973 # elif GLM_COMPILER & GLM_COMPILER_GCC
974 # pragma message("GLM: GCC compiler detected")
975 # else
976 # pragma message("GLM: Compiler not detected")
977 # endif
978 
979  // Report build target
980 # if (GLM_ARCH & GLM_ARCH_AVX2_BIT) && (GLM_MODEL == GLM_MODEL_64)
981 # pragma message("GLM: x86 64 bits with AVX2 instruction set build target")
982 # elif (GLM_ARCH & GLM_ARCH_AVX2_BIT) && (GLM_MODEL == GLM_MODEL_32)
983 # pragma message("GLM: x86 32 bits with AVX2 instruction set build target")
984 
985 # elif (GLM_ARCH & GLM_ARCH_AVX_BIT) && (GLM_MODEL == GLM_MODEL_64)
986 # pragma message("GLM: x86 64 bits with AVX instruction set build target")
987 # elif (GLM_ARCH & GLM_ARCH_AVX_BIT) && (GLM_MODEL == GLM_MODEL_32)
988 # pragma message("GLM: x86 32 bits with AVX instruction set build target")
989 
990 # elif (GLM_ARCH & GLM_ARCH_SSE42_BIT) && (GLM_MODEL == GLM_MODEL_64)
991 # pragma message("GLM: x86 64 bits with SSE4.2 instruction set build target")
992 # elif (GLM_ARCH & GLM_ARCH_SSE42_BIT) && (GLM_MODEL == GLM_MODEL_32)
993 # pragma message("GLM: x86 32 bits with SSE4.2 instruction set build target")
994 
995 # elif (GLM_ARCH & GLM_ARCH_SSE41_BIT) && (GLM_MODEL == GLM_MODEL_64)
996 # pragma message("GLM: x86 64 bits with SSE4.1 instruction set build target")
997 # elif (GLM_ARCH & GLM_ARCH_SSE41_BIT) && (GLM_MODEL == GLM_MODEL_32)
998 # pragma message("GLM: x86 32 bits with SSE4.1 instruction set build target")
999 
1000 # elif (GLM_ARCH & GLM_ARCH_SSSE3_BIT) && (GLM_MODEL == GLM_MODEL_64)
1001 # pragma message("GLM: x86 64 bits with SSSE3 instruction set build target")
1002 # elif (GLM_ARCH & GLM_ARCH_SSSE3_BIT) && (GLM_MODEL == GLM_MODEL_32)
1003 # pragma message("GLM: x86 32 bits with SSSE3 instruction set build target")
1004 
1005 # elif (GLM_ARCH & GLM_ARCH_SSE3_BIT) && (GLM_MODEL == GLM_MODEL_64)
1006 # pragma message("GLM: x86 64 bits with SSE3 instruction set build target")
1007 # elif (GLM_ARCH & GLM_ARCH_SSE3_BIT) && (GLM_MODEL == GLM_MODEL_32)
1008 # pragma message("GLM: x86 32 bits with SSE3 instruction set build target")
1009 
1010 # elif (GLM_ARCH & GLM_ARCH_SSE2_BIT) && (GLM_MODEL == GLM_MODEL_64)
1011 # pragma message("GLM: x86 64 bits with SSE2 instruction set build target")
1012 # elif (GLM_ARCH & GLM_ARCH_SSE2_BIT) && (GLM_MODEL == GLM_MODEL_32)
1013 # pragma message("GLM: x86 32 bits with SSE2 instruction set build target")
1014 
1015 # elif (GLM_ARCH & GLM_ARCH_X86_BIT) && (GLM_MODEL == GLM_MODEL_64)
1016 # pragma message("GLM: x86 64 bits build target")
1017 # elif (GLM_ARCH & GLM_ARCH_X86_BIT) && (GLM_MODEL == GLM_MODEL_32)
1018 # pragma message("GLM: x86 32 bits build target")
1019 
1020 # elif (GLM_ARCH & GLM_ARCH_NEON_BIT) && (GLM_MODEL == GLM_MODEL_64)
1021 # pragma message("GLM: ARM 64 bits with Neon instruction set build target")
1022 # elif (GLM_ARCH & GLM_ARCH_NEON_BIT) && (GLM_MODEL == GLM_MODEL_32)
1023 # pragma message("GLM: ARM 32 bits with Neon instruction set build target")
1024 
1025 # elif (GLM_ARCH & GLM_ARCH_ARM_BIT) && (GLM_MODEL == GLM_MODEL_64)
1026 # pragma message("GLM: ARM 64 bits build target")
1027 # elif (GLM_ARCH & GLM_ARCH_ARM_BIT) && (GLM_MODEL == GLM_MODEL_32)
1028 # pragma message("GLM: ARM 32 bits build target")
1029 
1030 # elif (GLM_ARCH & GLM_ARCH_MIPS_BIT) && (GLM_MODEL == GLM_MODEL_64)
1031 # pragma message("GLM: MIPS 64 bits build target")
1032 # elif (GLM_ARCH & GLM_ARCH_MIPS_BIT) && (GLM_MODEL == GLM_MODEL_32)
1033 # pragma message("GLM: MIPS 32 bits build target")
1034 
1035 # elif (GLM_ARCH & GLM_ARCH_PPC_BIT) && (GLM_MODEL == GLM_MODEL_64)
1036 # pragma message("GLM: PowerPC 64 bits build target")
1037 # elif (GLM_ARCH & GLM_ARCH_PPC_BIT) && (GLM_MODEL == GLM_MODEL_32)
1038 # pragma message("GLM: PowerPC 32 bits build target")
1039 # else
1040 # pragma message("GLM: Unknown build target")
1041 # endif//GLM_ARCH
1042 
1043  // Report platform name
1044 # if(GLM_PLATFORM & GLM_PLATFORM_QNXNTO)
1045 # pragma message("GLM: QNX platform detected")
1046 //# elif(GLM_PLATFORM & GLM_PLATFORM_IOS)
1047 //# pragma message("GLM: iOS platform detected")
1048 # elif(GLM_PLATFORM & GLM_PLATFORM_APPLE)
1049 # pragma message("GLM: Apple platform detected")
1050 # elif(GLM_PLATFORM & GLM_PLATFORM_WINCE)
1051 # pragma message("GLM: WinCE platform detected")
1052 # elif(GLM_PLATFORM & GLM_PLATFORM_WINDOWS)
1053 # pragma message("GLM: Windows platform detected")
1054 # elif(GLM_PLATFORM & GLM_PLATFORM_CHROME_NACL)
1055 # pragma message("GLM: Native Client detected")
1056 # elif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
1057 # pragma message("GLM: Android platform detected")
1058 # elif(GLM_PLATFORM & GLM_PLATFORM_LINUX)
1059 # pragma message("GLM: Linux platform detected")
1060 # elif(GLM_PLATFORM & GLM_PLATFORM_UNIX)
1061 # pragma message("GLM: UNIX platform detected")
1062 # elif(GLM_PLATFORM & GLM_PLATFORM_UNKNOWN)
1063 # pragma message("GLM: platform unknown")
1064 # else
1065 # pragma message("GLM: platform not detected")
1066 # endif
1067 
1068  // Report whether only xyzw component are used
1069 # if defined GLM_FORCE_XYZW_ONLY
1070 # pragma message("GLM: GLM_FORCE_XYZW_ONLY is defined. Only x, y, z and w component are available in vector type. This define disables swizzle operators and SIMD instruction sets.")
1071 # endif
1072 
1073  // Report swizzle operator support
1074 # if GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_OPERATOR
1075 # pragma message("GLM: GLM_FORCE_SWIZZLE is defined, swizzling operators enabled.")
1076 # elif GLM_CONFIG_SWIZZLE == GLM_SWIZZLE_FUNCTION
1077 # pragma message("GLM: GLM_FORCE_SWIZZLE is defined, swizzling functions enabled. Enable compiler C++ language extensions to enable swizzle operators.")
1078 # else
1079 # pragma message("GLM: GLM_FORCE_SWIZZLE is undefined. swizzling functions or operators are disabled.")
1080 # endif
1081 
1082  // Report .length() type
1083 # if GLM_CONFIG_LENGTH_TYPE == GLM_LENGTH_SIZE_T
1084 # pragma message("GLM: GLM_FORCE_SIZE_T_LENGTH is defined. .length() returns a glm::length_t, a typedef of std::size_t.")
1085 # else
1086 # pragma message("GLM: GLM_FORCE_SIZE_T_LENGTH is undefined. .length() returns a glm::length_t, a typedef of int following GLSL.")
1087 # endif
1088 
1089 # if GLM_CONFIG_UNRESTRICTED_GENTYPE == GLM_ENABLE
1090 # pragma message("GLM: GLM_FORCE_UNRESTRICTED_GENTYPE is defined. Removes GLSL restrictions on valid function genTypes.")
1091 # else
1092 # pragma message("GLM: GLM_FORCE_UNRESTRICTED_GENTYPE is undefined. Follows strictly GLSL on valid function genTypes.")
1093 # endif
1094 
1095 # if GLM_SILENT_WARNINGS == GLM_ENABLE
1096 # pragma message("GLM: GLM_FORCE_SILENT_WARNINGS is defined. Ignores C++ warnings from using C++ language extensions.")
1097 # else
1098 # pragma message("GLM: GLM_FORCE_SILENT_WARNINGS is undefined. Shows C++ warnings from using C++ language extensions.")
1099 # endif
1100 
1101 # ifdef GLM_FORCE_SINGLE_ONLY
1102 # pragma message("GLM: GLM_FORCE_SINGLE_ONLY is defined. Using only single precision floating-point types.")
1103 # endif
1104 
1105 # if defined(GLM_FORCE_ALIGNED_GENTYPES) && (GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE)
1106 # undef GLM_FORCE_ALIGNED_GENTYPES
1107 # pragma message("GLM: GLM_FORCE_ALIGNED_GENTYPES is defined, allowing aligned types. This prevents the use of C++ constexpr.")
1108 # elif defined(GLM_FORCE_ALIGNED_GENTYPES) && (GLM_CONFIG_ALIGNED_GENTYPES == GLM_DISABLE)
1109 # undef GLM_FORCE_ALIGNED_GENTYPES
1110 # pragma message("GLM: GLM_FORCE_ALIGNED_GENTYPES is defined but is disabled. It requires C++11 and language extensions.")
1111 # endif
1112 
1113 # if defined(GLM_FORCE_DEFAULT_ALIGNED_GENTYPES)
1114 # if GLM_CONFIG_ALIGNED_GENTYPES == GLM_DISABLE
1115 # undef GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
1116 # pragma message("GLM: GLM_FORCE_DEFAULT_ALIGNED_GENTYPES is defined but is disabled. It requires C++11 and language extensions.")
1117 # elif GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
1118 # pragma message("GLM: GLM_FORCE_DEFAULT_ALIGNED_GENTYPES is defined. All gentypes (e.g. vec3) will be aligned and padded by default.")
1119 # endif
1120 # endif
1121 
1122 # if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_ZO_BIT
1123 # pragma message("GLM: GLM_FORCE_DEPTH_ZERO_TO_ONE is defined. Using zero to one depth clip space.")
1124 # else
1125 # pragma message("GLM: GLM_FORCE_DEPTH_ZERO_TO_ONE is undefined. Using negative one to one depth clip space.")
1126 # endif
1127 
1128 # if GLM_CONFIG_CLIP_CONTROL & GLM_CLIP_CONTROL_LH_BIT
1129 # pragma message("GLM: GLM_FORCE_LEFT_HANDED is defined. Using left handed coordinate system.")
1130 # else
1131 # pragma message("GLM: GLM_FORCE_LEFT_HANDED is undefined. Using right handed coordinate system.")
1132 # endif
1133 #endif//GLM_MESSAGES
1134 
1135 #endif//GLM_SETUP_INCLUDED
int64 int64_t
64 bit signed integer type.
Definition: fwd.hpp:85
int8 int8_t
8 bit signed integer type.
Definition: fwd.hpp:43
uint32 uint32_t
Default qualifier 32 bit unsigned integer type.
Definition: fwd.hpp:129
uint16 uint16_t
Default qualifier 16 bit unsigned integer type.
Definition: fwd.hpp:115
uint8 uint8_t
Default qualifier 8 bit unsigned integer type.
Definition: fwd.hpp:101
uint64 uint64_t
Default qualifier 64 bit unsigned integer type.
Definition: fwd.hpp:143
int16 int16_t
16 bit signed integer type.
Definition: fwd.hpp:57
Definition: hash.hpp:49
int32 int32_t
32 bit signed integer type.
Definition: fwd.hpp:71
detail::uint64 uint64
64 bit unsigned integer type.
detail::int64 int64
64 bit signed integer type.
Definition: common.hpp:20