setup.hpp
00001 
00002 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
00004 // Created : 2006-11-13
00005 // Updated : 2011-01-26
00006 // Licence : This source is under MIT License
00007 // File    : glm/setup.hpp
00009 
00010 #ifndef glm_setup
00011 #define glm_setup
00012 
00014 // Version
00015 
00016 #define GLM_VERSION                                     92
00017 #define GLM_VERSION_MAJOR                       0
00018 #define GLM_VERSION_MINOR                       9
00019 #define GLM_VERSION_PATCH                       2
00020 #define GLM_VERSION_REVISION            1
00021 
00022 
00024 // Compiler
00025 
00026 // User defines: GLM_FORCE_COMPILER_UNKNOWN
00027 // TODO ? __llvm__ 
00028 
00029 #define GLM_COMPILER_UNKNOWN            0x00000000
00030 
00031 // Visual C++ defines
00032 #define GLM_COMPILER_VC                         0x01000000
00033 #define GLM_COMPILER_VC2                        0x01000010
00034 #define GLM_COMPILER_VC4                        0x01000020
00035 #define GLM_COMPILER_VC5                        0x01000030
00036 #define GLM_COMPILER_VC6                        0x01000040
00037 #define GLM_COMPILER_VC2002                     0x01000050
00038 #define GLM_COMPILER_VC2003                     0x01000060
00039 #define GLM_COMPILER_VC2005                     0x01000070
00040 #define GLM_COMPILER_VC2008                     0x01000080
00041 #define GLM_COMPILER_VC2010                     0x01000090
00042 #define GLM_COMPILER_VC2011                     0x010000A0
00043 
00044 // GCC defines
00045 #define GLM_COMPILER_GCC            0x02000000
00046 #define GLM_COMPILER_GCC_LLVM       0x02000000
00047 #define GLM_COMPILER_GCC_CLANG      0x02000000
00048 #define GLM_COMPILER_GCC30                      0x02000010
00049 #define GLM_COMPILER_GCC31                      0x02000020
00050 #define GLM_COMPILER_GCC32                      0x02000030
00051 #define GLM_COMPILER_GCC33                      0x02000040
00052 #define GLM_COMPILER_GCC34                      0x02000050
00053 #define GLM_COMPILER_GCC35                      0x02000060
00054 #define GLM_COMPILER_GCC40                      0x02000070
00055 #define GLM_COMPILER_GCC41                      0x02000080
00056 #define GLM_COMPILER_GCC42                      0x02000090
00057 #define GLM_COMPILER_GCC43                      0x020000A0
00058 #define GLM_COMPILER_GCC44                      0x020000B0
00059 #define GLM_COMPILER_GCC45                      0x020000C0
00060 #define GLM_COMPILER_GCC46                      0x020000D0
00061 #define GLM_COMPILER_GCC47                      0x020000E0
00062 #define GLM_COMPILER_GCC48                      0x020000F0
00063 #define GLM_COMPILER_GCC49                      0x02000100
00064 #define GLM_COMPILER_GCC50                      0x02000200
00065 
00066 // G++ command line to display defined
00067 // echo "" | g++ -E -dM -x c++ - | sort
00068 
00069 // Borland C++ defines. How to identify BC?
00070 #define GLM_COMPILER_BC                         0x04000000
00071 #define GLM_COMPILER_BCB4                       0x04000100
00072 #define GLM_COMPILER_BCB5                       0x04000200
00073 #define GLM_COMPILER_BCB6                       0x04000300
00074 //#define GLM_COMPILER_BCBX                     0x04000400 // What's the version value?
00075 #define GLM_COMPILER_BCB2009            0x04000500
00076 
00077 // CodeWarrior
00078 #define GLM_COMPILER_CODEWARRIOR        0x08000000
00079 
00080 // CUDA
00081 #define GLM_COMPILER_CUDA           0x10000000
00082 #define GLM_COMPILER_CUDA30                     0x10000010
00083 #define GLM_COMPILER_CUDA31                     0x10000020
00084 #define GLM_COMPILER_CUDA32                     0x10000030
00085 #define GLM_COMPILER_CUDA40                     0x10000040
00086 
00087 // Clang
00088 #define GLM_COMPILER_CLANG          0x20000000
00089 #define GLM_COMPILER_CLANG26            0x20000010
00090 #define GLM_COMPILER_CLANG27            0x20000020
00091 #define GLM_COMPILER_CLANG28            0x20000030
00092 #define GLM_COMPILER_CLANG29            0x20000040
00093 
00094 // LLVM GCC
00095 #define GLM_COMPILER_LLVM_GCC           0x40000000
00096 
00097 // Build model
00098 #define GLM_MODEL_32                            0x00000010
00099 #define GLM_MODEL_64                            0x00000020
00100 
00101 // Force generic C++ compiler
00102 #ifdef GLM_FORCE_COMPILER_UNKNOWN
00103 #               define GLM_COMPILER GLM_COMPILER_UNKNOWN
00104 
00105 // CUDA
00106 #elif defined(__CUDACC__)
00107 #       define GLM_COMPILER GLM_COMPILER_CUDA
00108 
00109 // Visual C++
00110 #elif defined(_MSC_VER)
00111 #       if _MSC_VER == 900
00112 #               define GLM_COMPILER GLM_COMPILER_VC2
00113 #       elif _MSC_VER == 1000
00114 #               define GLM_COMPILER GLM_COMPILER_VC4
00115 #       elif _MSC_VER == 1100
00116 #               define GLM_COMPILER GLM_COMPILER_VC5
00117 #       elif _MSC_VER == 1200
00118 #               define GLM_COMPILER GLM_COMPILER_VC6
00119 #       elif _MSC_VER == 1300
00120 #               define GLM_COMPILER GLM_COMPILER_VC2002
00121 #       elif _MSC_VER == 1310
00122 #               define GLM_COMPILER GLM_COMPILER_VC2003
00123 #       elif _MSC_VER == 1400
00124 #               define GLM_COMPILER GLM_COMPILER_VC2005
00125 #       elif _MSC_VER == 1500
00126 #               define GLM_COMPILER GLM_COMPILER_VC2008
00127 #       elif _MSC_VER == 1600
00128 #               define GLM_COMPILER GLM_COMPILER_VC2010
00129 #       elif _MSC_VER == 1700
00130 #               define GLM_COMPILER GLM_COMPILER_VC2011
00131 #       else//_MSC_VER
00132 #               define GLM_COMPILER GLM_COMPILER_VC
00133 #       endif//_MSC_VER
00134 
00135 // G++
00136 #elif defined(__GNUC__) || defined(__llvm__) || defined(__clang__)
00137 #   if defined (__llvm__)
00138 #       pragma message("LLVM")
00139 #       define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_LLVM
00140 #   elif defined (__clang__)
00141 #       pragma message("CLANG")
00142 #       define GLM_COMPILER_GCC_EXTRA GLM_COMPILER_GCC_CLANG
00143 #   else
00144 #       pragma message("GCC")
00145 #       define GLM_COMPILER_GCC_EXTRA 0
00146 #   endif
00147 #
00148 #       if   (__GNUC__ == 3) && (__GNUC_MINOR__ == 2)
00149 #               define GLM_COMPILER GLM_COMPILER_GCC32
00150 #       elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 3)
00151 #               define GLM_COMPILER GLM_COMPILER_GCC33
00152 #       elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)
00153 #               define GLM_COMPILER GLM_COMPILER_GCC34
00154 #       elif (__GNUC__ == 3) && (__GNUC_MINOR__ == 5)
00155 #               define GLM_COMPILER GLM_COMPILER_GCC35
00156 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 0)
00157 #               define GLM_COMPILER (GLM_COMPILER_GCC40 | GLM_COMPILER_GCC_EXTRA)
00158 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 1)
00159 #               define GLM_COMPILER (GLM_COMPILER_GCC41 | GLM_COMPILER_GCC_EXTRA)
00160 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)
00161 #               define GLM_COMPILER (GLM_COMPILER_GCC42 | GLM_COMPILER_GCC_EXTRA)
00162 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)
00163 #               define GLM_COMPILER (GLM_COMPILER_GCC43 | GLM_COMPILER_GCC_EXTRA)
00164 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4)
00165 #               define GLM_COMPILER (GLM_COMPILER_GCC44 | GLM_COMPILER_GCC_EXTRA)
00166 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 5)
00167 #               define GLM_COMPILER (GLM_COMPILER_GCC45 | GLM_COMPILER_GCC_EXTRA)
00168 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)
00169 #               define GLM_COMPILER (GLM_COMPILER_GCC46 | GLM_COMPILER_GCC_EXTRA)
00170 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 7)
00171 #               define GLM_COMPILER (GLM_COMPILER_GCC47 | GLM_COMPILER_GCC_EXTRA)
00172 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
00173 #               define GLM_COMPILER (GLM_COMPILER_GCC48 | GLM_COMPILER_GCC_EXTRA)
00174 #       elif (__GNUC__ == 4) && (__GNUC_MINOR__ == 9)
00175 #               define GLM_COMPILER (GLM_COMPILER_GCC49 | GLM_COMPILER_GCC_EXTRA)
00176 #       elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 0)
00177 #               define GLM_COMPILER (GLM_COMPILER_GCC50 | GLM_COMPILER_GCC_EXTRA)
00178 #       else
00179 #               define GLM_COMPILER (GLM_COMPILER_GCC | GLM_COMPILER_GCC_EXTRA)
00180 #       endif
00181 
00182 // Borland C++
00183 #elif defined(_BORLANDC_)
00184 #       if defined(VER125)
00185 #               define GLM_COMPILER GLM_COMPILER_BCB4
00186 #       elif defined(VER130)
00187 #               define GLM_COMPILER GLM_COMPILER_BCB5
00188 #       elif defined(VER140)
00189 #               define GLM_COMPILER GLM_COMPILER_BCB6
00190 #       elif defined(VER200)
00191 #               define GLM_COMPILER GLM_COMPILER_BCB2009
00192 #       else
00193 #               define GLM_COMPILER GLM_COMPILER_BC
00194 #       endif
00195 
00196 // Codewarrior
00197 #elif defined(__MWERKS__)
00198 #       define GLM_COMPILER GLM_COMPILER_CODEWARRIOR
00199 
00200 #else
00201 #       define GLM_COMPILER GLM_COMPILER_UNKNOWN
00202 #endif
00203 
00204 #ifndef GLM_COMPILER
00205 #error "GLM_COMPILER undefined, your compiler may not be supported by GLM. Add #define GLM_COMPILER 0 to ignore this message."
00206 #endif//GLM_COMPILER
00207 
00208 // Report compiler detection
00209 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPILER_DISPLAYED))
00210 #       define GLM_MESSAGE_COMPILER_DISPLAYED
00211 #       if(GLM_COMPILER & GLM_COMPILER_CUDA)
00212 #               pragma message("GLM: CUDA compiler detected")
00213 #       elif(GLM_COMPILER & GLM_COMPILER_VC)
00214 #               pragma message("GLM: Visual C++ compiler detected")
00215 #       elif(GLM_COMPILER & GLM_COMPILER_CLANG)
00216 #               pragma message("GLM: Clang compiler detected")
00217 #       elif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC)
00218 #               pragma message("GLM: LLVM GCC compiler detected")
00219 #       elif(GLM_COMPILER & GLM_COMPILER_GCC)
00220 #       if(GLM_COMPILER & GLM_COMPILER_GCC_LLVM)
00221 #           pragma message("GLM: LLVM GCC compiler detected")
00222 #       elif(GLM_COMPILER & GLM_COMPILER_GCC_CLANG)
00223 #           pragma message("GLM: CLANG compiler detected")
00224 #       else
00225 #           pragma message("GLM: GCC compiler detected")
00226 #       endif
00227 #       elif(GLM_COMPILER & GLM_COMPILER_BC)
00228 #               pragma message("GLM: Borland compiler detected but not supported")
00229 #       elif(GLM_COMPILER & GLM_COMPILER_CODEWARRIOR)
00230 #               pragma message("GLM: Codewarrior compiler detected but not supported")
00231 #       else
00232 #               pragma message("GLM: Compiler not detected")
00233 #       endif
00234 #endif//GLM_MESSAGE
00235 
00237 // Build model //
00238 
00239 #if(GLM_COMPILER & GLM_COMPILER_VC)
00240 #       if defined(_M_X64)
00241 #               define GLM_MODEL        GLM_MODEL_64
00242 #       else
00243 #               define GLM_MODEL        GLM_MODEL_32
00244 #       endif//_M_X64
00245 #elif(GLM_COMPILER & GLM_COMPILER_GCC)
00246 #       if(defined(__WORDSIZE) && (__WORDSIZE == 64)) || defined(__arch64__) || defined(__LP64__) || defined(__x86_64__)
00247 #               define GLM_MODEL        GLM_MODEL_64
00248 #       else
00249 #               define GLM_MODEL        GLM_MODEL_32
00250 #       endif//
00251 #else
00252 #       define GLM_MODEL        GLM_MODEL_32
00253 #endif//
00254 
00255 #if(!defined(GLM_MODEL) && GLM_COMPILER != 0)
00256 #error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message."
00257 #endif//GLM_MODEL
00258 
00259 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_MODEL_DISPLAYED))
00260 #       define GLM_MESSAGE_MODEL_DISPLAYED
00261 #       if(GLM_MODEL == GLM_MODEL_64)
00262 #               pragma message("GLM: 64 bits model")
00263 #       elif(GLM_MODEL == GLM_MODEL_32)
00264 #               pragma message("GLM: 32 bits model")
00265 #       endif//GLM_MODEL
00266 #endif//GLM_MESSAGE
00267 
00269 // C++ Version //
00270 
00271 // User defines: GLM_FORCE_CXX98
00272 
00273 #define GLM_LANG_CXX                    0
00274 #define GLM_LANG_CXX98                  1
00275 #define GLM_LANG_CXX0X                  2
00276 #define GLM_LANG_CXXMS                  3
00277 #define GLM_LANG_CXXGNU                 4
00278 
00279 #if(defined(GLM_FORCE_CXX98))
00280 #       define GLM_LANG GLM_LANG_CXX98
00281 #elif(((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) && defined(__GXX_EXPERIMENTAL_CXX0X__)) // -std=c++0x or -std=gnu++0x
00282 #       define GLM_LANG GLM_LANG_CXX0X
00283 #elif(GLM_COMPILER == GLM_COMPILER_VC2010) //_MSC_EXTENSIONS for MS language extensions
00284 #       define GLM_LANG GLM_LANG_CXX0X
00285 #elif(((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC) && defined(__STRICT_ANSI__))
00286 #       define GLM_LANG GLM_LANG_CXX98
00287 #elif(((GLM_COMPILER & GLM_COMPILER_VC) == GLM_COMPILER_VC) && !defined(_MSC_EXTENSIONS))
00288 #       define GLM_LANG GLM_LANG_CXX98
00289 #else
00290 #       define GLM_LANG GLM_LANG_CXX
00291 #endif
00292 
00293 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_LANG_DISPLAYED))
00294 #       define GLM_MESSAGE_LANG_DISPLAYED
00295 #       if(GLM_LANG == GLM_LANG_CXX98)
00296 #               pragma message("GLM: C++98")
00297 #       elif(GLM_LANG == GLM_LANG_CXX0X)
00298 #               pragma message("GLM: C++0x")
00299 #       endif//GLM_MODEL
00300 #endif//GLM_MESSAGE
00301 
00303 // Platform 
00304 
00305 // User defines: GLM_FORCE_PURE GLM_FORCE_SSE2 GLM_FORCE_AVX
00306 
00307 #define GLM_ARCH_PURE           0x0000 //(0x0000)
00308 #define GLM_ARCH_SSE2           0x0001 //(0x0001)
00309 #define GLM_ARCH_SSE3           0x0003 //(0x0002 | GLM_ARCH_SSE2)
00310 #define GLM_ARCH_AVX            0x0007 //(0x0004 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
00311 
00312 #if(defined(GLM_FORCE_PURE))
00313 #       define GLM_ARCH GLM_ARCH_PURE
00314 #elif(defined(GLM_FORCE_AVX))
00315 #       define GLM_ARCH GLM_ARCH_AVX
00316 #elif(defined(GLM_FORCE_SSE3))
00317 #       define GLM_ARCH GLM_ARCH_SSE3
00318 #elif(defined(GLM_FORCE_SSE2))
00319 #       define GLM_ARCH GLM_ARCH_SSE2
00320 #elif((GLM_COMPILER & GLM_COMPILER_VC) && (defined(_M_IX86) || defined(_M_X64)))
00321 #       if(defined(_M_CEE_PURE))
00322 #               define GLM_ARCH GLM_ARCH_PURE
00323 #       elif(GLM_COMPILER >= GLM_COMPILER_VC2010)
00324 #               if(_MSC_FULL_VER >= 160031118) //160031118: VC2010 SP1 beta full version
00325 #                       define GLM_ARCH GLM_ARCH_AVX //GLM_ARCH_AVX (Require SP1)
00326 #               else
00327 #                       define GLM_ARCH GLM_ARCH_SSE3
00328 #               endif
00329 #       elif(GLM_COMPILER >= GLM_COMPILER_VC2008) 
00330 #               define GLM_ARCH GLM_ARCH_SSE3
00331 #       elif(GLM_COMPILER >= GLM_COMPILER_VC2005)
00332 #               define GLM_ARCH GLM_ARCH_SSE2
00333 #       else
00334 #               define GLM_ARCH GLM_ARCH_PURE
00335 #       endif
00336 #elif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC)
00337 #       if(defined(__AVX__))
00338 #               define GLM_ARCH GLM_ARCH_AVX
00339 #       elif(defined(__SSE3__))
00340 #               define GLM_ARCH GLM_ARCH_SSE3
00341 #       elif(defined(__SSE2__))
00342 #               define GLM_ARCH GLM_ARCH_SSE2
00343 #       else
00344 #               define GLM_ARCH GLM_ARCH_PURE
00345 #       endif
00346 #elif((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__)))
00347 #       if(defined(__AVX__))
00348 #               define GLM_ARCH GLM_ARCH_AVX
00349 #       elif(defined(__SSE3__))
00350 #               define GLM_ARCH GLM_ARCH_SSE3
00351 #       elif(defined(__SSE2__))
00352 #               define GLM_ARCH GLM_ARCH_SSE2
00353 #       else
00354 #               define GLM_ARCH GLM_ARCH_PURE
00355 #       endif
00356 #else
00357 #       define GLM_ARCH GLM_ARCH_PURE
00358 #endif
00359 
00360 #if(GLM_ARCH != GLM_ARCH_PURE)
00361 #if((GLM_ARCH & GLM_ARCH_AVX) == GLM_ARCH_AVX)
00362 #       include <immintrin.h>
00363 #endif//GLM_ARCH
00364 #if((GLM_ARCH & GLM_ARCH_SSE3) == GLM_ARCH_SSE3)
00365 #       include <pmmintrin.h>
00366 #endif//GLM_ARCH
00367 #if((GLM_ARCH & GLM_ARCH_SSE2) == GLM_ARCH_SSE2)
00368 #       include <emmintrin.h>
00369 #endif//GLM_ARCH
00370 #endif//(GLM_ARCH != GLM_ARCH_PURE)
00371 
00372 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED))
00373 #       define GLM_MESSAGE_ARCH_DISPLAYED
00374 #       if(GLM_ARCH == GLM_ARCH_PURE)
00375 #               pragma message("GLM: Platform independent")
00376 #       elif(GLM_ARCH == GLM_ARCH_SSE2)
00377 #               pragma message("GLM: SSE2 build platform")
00378 #       elif(GLM_ARCH == GLM_ARCH_SSE3)
00379 #               pragma message("GLM: SSE3 build platform")
00380 #       elif(GLM_ARCH == GLM_ARCH_AVX)
00381 #               pragma message("GLM: AVX build platform")
00382 #       endif//GLM_ARCH
00383 #endif//GLM_MESSAGE
00384 
00386 // Components
00387 
00388 //#define GLM_FORCE_ONLY_XYZW
00389 #define GLM_COMPONENT_GLSL_NAMES                        0 
00390 #define GLM_COMPONENT_ONLY_XYZW                         1 // To disable multiple vector component names access.
00391 #define GLM_COMPONENT_MS_EXT                            2 // To use anonymous union to provide multiple component names access for class valType. Visual C++ only.
00392 
00393 #ifndef GLM_FORCE_ONLY_XYZW
00394 #       if((GLM_COMPILER & GLM_COMPILER_VC) && defined(_MSC_EXTENSIONS))
00395 #               define GLM_COMPONENT GLM_COMPONENT_MS_EXT
00396 #       else
00397 #               define GLM_COMPONENT GLM_COMPONENT_GLSL_NAMES
00398 #       endif
00399 #else
00400 #       define GLM_COMPONENT GLM_COMPONENT_ONLY_XYZW
00401 #endif
00402 
00403 #if((GLM_COMPONENT == GLM_COMPONENT_MS_EXT) && !(GLM_COMPILER & GLM_COMPILER_VC))
00404 #       error "GLM_COMPONENT value is GLM_COMPONENT_MS_EXT but this is not allowed with the current compiler."
00405 #endif
00406 
00407 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPONENT_DISPLAYED))
00408 #       define GLM_MESSAGE_COMPONENT_DISPLAYED
00409 #       if(GLM_COMPONENT == GLM_COMPONENT_GLSL_NAMES)
00410 #               pragma message("GLM: GLSL multiple vector component names")
00411 #       elif(GLM_COMPONENT == GLM_COMPONENT_ONLY_XYZW)
00412 #               pragma message("GLM: x,y,z,w vector component names only")
00413 #       elif(GLM_COMPONENT == GLM_COMPONENT_MS_EXT)
00414 #               pragma message("GLM: Multiple vector component names through Visual C++ language extensions")
00415 #       else
00416 #               error "GLM_COMPONENT value unknown"
00417 #       endif//GLM_MESSAGE_COMPONENT_DISPLAYED
00418 #endif//GLM_MESSAGE
00419 
00421 // Static assert
00422 
00423 #if(GLM_LANG == GLM_LANG_CXX0X)
00424 #       define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
00425 #elif(defined(BOOST_STATIC_ASSERT))
00426 #       define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)
00427 #elif(GLM_COMPILER & GLM_COMPILER_VC)
00428 #       define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
00429 #else
00430 #       define GLM_STATIC_ASSERT(x, message)
00431 #       define GLM_STATIC_ASSERT_NULL
00432 #endif//GLM_LANG
00433 
00435 // Qualifiers 
00436 
00437 // User defines: GLM_FORCE_INLINE GLM_FORCE_CUDA
00438 
00439 #if(defined(GLM_FORCE_CUDA) || (GLM_COMPILER & GLM_COMPILER_CUDA))
00440 #   define GLM_CUDA_FUNC_DEF __device__ __host__ 
00441 #       define GLM_CUDA_FUNC_DECL __device__ __host__ 
00442 #else
00443 #   define GLM_CUDA_FUNC_DEF
00444 #       define GLM_CUDA_FUNC_DECL
00445 #endif
00446 
00447 #if(defined(GLM_FORCE_INLINE))
00448 #   if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2005))
00449 #       define GLM_INLINE __forceinline
00450 #   elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC34))
00451 #       define GLM_INLINE __attribute__((always_inline))
00452 #   else
00453 #       define GLM_INLINE inline
00454 #   endif//GLM_COMPILER
00455 #else
00456 #   define GLM_INLINE inline
00457 #endif//defined(GLM_FORCE_INLINE)
00458 
00459 #define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL
00460 #define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE
00461 
00463 // Swizzle operators
00464 
00465 // User defines: GLM_SWIZZLE_XYZW GLM_SWIZZLE_RGBA GLM_SWIZZLE_STQP GLM_SWIZZLE
00466 
00467 #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED))
00468 #       define GLM_MESSAGE_SWIZZLE_DISPLAYED
00469 #       if(defined(GLM_SWIZZLE))
00470 #               pragma message("GLM: Full swizzling operator enabled")
00471 #       elif(!defined(GLM_SWIZZLE_XYZW) && !defined(GLM_SWIZZLE_RGBA) && !defined(GLM_SWIZZLE_STQP) && !defined(GLM_SWIZZLE))
00472 #               pragma message("GLM: No swizzling operator enabled")
00473 #       else
00474 #               pragma message("GLM: Partial swizzling operator enabled")
00475 #       endif
00476 #endif//GLM_MESSAGE
00477 
00478 #endif//glm_setup