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