type_int.hpp
Go to the documentation of this file.
1 
29 #pragma once
30 
31 #include "setup.hpp"
32 
33 #if GLM_HAS_EXTENDED_INTEGER_TYPE
34 # include <cstdint>
35 #endif
36 
37 namespace glm{
38 namespace detail
39 {
40 # if GLM_HAS_EXTENDED_INTEGER_TYPE
41  typedef std::int8_t int8;
42  typedef std::int16_t int16;
43  typedef std::int32_t int32;
44  typedef std::int64_t int64;
45 
46  typedef std::uint8_t uint8;
47  typedef std::uint16_t uint16;
48  typedef std::uint32_t uint32;
49  typedef std::uint64_t uint64;
50 # else
51 # if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available
52  typedef int64_t sint64;
53  typedef uint64_t uint64;
54 # elif(GLM_COMPILER & GLM_COMPILER_VC)
55  typedef signed __int64 sint64;
56  typedef unsigned __int64 uint64;
57 # elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC | GLM_COMPILER_CLANG))
58  __extension__ typedef signed long long sint64;
59  __extension__ typedef unsigned long long uint64;
60 # elif(GLM_COMPILER & GLM_COMPILER_BC)
61  typedef Int64 sint64;
62  typedef Uint64 uint64;
63 # else//unknown compiler
64  typedef signed long long sint64;
65  typedef unsigned long long uint64;
66 # endif//GLM_COMPILER
67 
68  typedef signed char int8;
69  typedef signed short int16;
70  typedef signed int int32;
71  typedef sint64 int64;
72 
73  typedef unsigned char uint8;
74  typedef unsigned short uint16;
75  typedef unsigned int uint32;
76  typedef uint64 uint64;
77 #endif//
78 
79  typedef signed int lowp_int_t;
80  typedef signed int mediump_int_t;
81  typedef signed int highp_int_t;
82 
83  typedef unsigned int lowp_uint_t;
84  typedef unsigned int mediump_uint_t;
85  typedef unsigned int highp_uint_t;
86 }//namespace detail
87 
88  typedef detail::int8 int8;
92 
97 
100 
107 
114 
121 
128 
135 
142 
143 #if(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
144  typedef mediump_int int_t;
145 #elif(defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
146  typedef highp_int int_t;
147 #elif(!defined(GLM_PRECISION_HIGHP_INT) && defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))
148  typedef mediump_int int_t;
149 #elif(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && defined(GLM_PRECISION_LOWP_INT))
150  typedef lowp_int int_t;
151 #else
152 # error "GLM error: multiple default precision requested for signed interger types"
153 #endif
154 
155 #if(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))
156  typedef mediump_uint uint_t;
157 #elif(defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))
158  typedef highp_uint uint_t;
159 #elif(!defined(GLM_PRECISION_HIGHP_UINT) && defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))
160  typedef mediump_uint uint_t;
161 #elif(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && defined(GLM_PRECISION_LOWP_UINT))
162  typedef lowp_uint uint_t;
163 #else
164 # error "GLM error: multiple default precision requested for unsigned interger types"
165 #endif
166 
170  typedef unsigned int uint;
171 
173 
175 // check type sizes
176 #ifndef GLM_STATIC_ASSERT_NULL
177  GLM_STATIC_ASSERT(sizeof(glm::int8) == 1, "int8 size isn't 1 byte on this platform");
178  GLM_STATIC_ASSERT(sizeof(glm::int16) == 2, "int16 size isn't 2 bytes on this platform");
179  GLM_STATIC_ASSERT(sizeof(glm::int32) == 4, "int32 size isn't 4 bytes on this platform");
180  GLM_STATIC_ASSERT(sizeof(glm::int64) == 8, "int64 size isn't 8 bytes on this platform");
181 
182  GLM_STATIC_ASSERT(sizeof(glm::uint8) == 1, "uint8 size isn't 1 byte on this platform");
183  GLM_STATIC_ASSERT(sizeof(glm::uint16) == 2, "uint16 size isn't 2 bytes on this platform");
184  GLM_STATIC_ASSERT(sizeof(glm::uint32) == 4, "uint32 size isn't 4 bytes on this platform");
185  GLM_STATIC_ASSERT(sizeof(glm::uint64) == 8, "uint64 size isn't 8 bytes on this platform");
186 #endif//GLM_STATIC_ASSERT_NULL
187 
188 }//namespace glm
signed int highp_int_t
Definition: type_int.hpp:81
detail::uint8 uint8
Definition: type_int.hpp:93
detail::lowp_uint_t lowp_uint
Definition: type_int.hpp:127
mediump_uint uint_t
Definition: type_int.hpp:156
detail::uint32 uint32
Definition: type_int.hpp:95
signed int mediump_int_t
Definition: type_int.hpp:80
signed long long sint64
Definition: type_int.hpp:64
detail::int64 int64_t
Definition: fwd.hpp:311
detail::mediump_int_t mediump_int
Definition: type_int.hpp:113
detail::int8 int8
Definition: type_int.hpp:88
signed short int16
Definition: type_int.hpp:69
unsigned int uint
Definition: type_int.hpp:170
unsigned int mediump_uint_t
Definition: type_int.hpp:84
detail::lowp_int_t lowp_int
Definition: type_int.hpp:106
#define GLM_STATIC_ASSERT(x, message)
Definition: setup.hpp:691
detail::highp_uint_t highp_uint
Definition: type_int.hpp:141
unsigned int uint32
Definition: type_int.hpp:75
signed int int32
Definition: type_int.hpp:70
detail::uint16 uint16_t
Definition: fwd.hpp:912
unsigned int highp_uint_t
Definition: type_int.hpp:85
unsigned short uint16
Definition: type_int.hpp:74
unsigned char uint8
Definition: type_int.hpp:73
detail::uint8 uint8_t
Definition: fwd.hpp:908
detail::int16 int16
Definition: type_int.hpp:89
detail::uint16 uint16
Definition: type_int.hpp:94
detail::uint64 uint64_t
Definition: fwd.hpp:920
detail::int16 int16_t
Definition: fwd.hpp:303
signed int lowp_int_t
Definition: type_int.hpp:79
detail::int8 int8_t
Definition: fwd.hpp:299
detail::uint32 uint32_t
Definition: fwd.hpp:916
detail::highp_int_t highp_int
Definition: type_int.hpp:120
detail::uint64 uint64
Definition: type_int.hpp:96
unsigned long long uint64
Definition: type_int.hpp:65
detail::int32 int32_t
Definition: fwd.hpp:307
detail::int32 int32
Definition: type_int.hpp:90
detail::mediump_uint_t mediump_uint
Definition: type_int.hpp:134
unsigned int lowp_uint_t
Definition: type_int.hpp:83
sint64 int64
Definition: type_int.hpp:71
mediump_int int_t
Definition: type_int.hpp:144
signed char int8
Definition: type_int.hpp:68
detail::int64 int64
Definition: type_int.hpp:91


rtabmap
Author(s): Mathieu Labbe
autogenerated on Wed Jun 5 2019 22:43:40