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))
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))
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
glm::detail::int16
signed short int16
Definition: type_int.hpp:69
Int64
TypeWithSize< 8 >::Int Int64
glm::detail::int8
signed char int8
Definition: type_int.hpp:68
glm::detail::mediump_uint_t
unsigned int mediump_uint_t
Definition: type_int.hpp:84
glm::detail::sint64
signed long long sint64
Definition: type_int.hpp:64
glm::detail::mediump_int_t
signed int mediump_int_t
Definition: type_int.hpp:80
glm::int64_t
detail::int64 int64_t
Definition: fwd.hpp:311
glm::int16
detail::int16 int16
Definition: type_int.hpp:89
glm::uint16
detail::uint16 uint16
Definition: type_int.hpp:94
glm::detail::int32
signed int int32
Definition: type_int.hpp:70
glm::detail::highp_int_t
signed int highp_int_t
Definition: type_int.hpp:81
glm::uint16_t
detail::uint16 uint16_t
Definition: fwd.hpp:912
glm::int8
detail::int8 int8
Definition: type_int.hpp:88
glm::uint32
detail::uint32 uint32
Definition: type_int.hpp:95
int64_t
::int64_t int64_t
detail
glm::uint64_t
detail::uint64 uint64_t
Definition: fwd.hpp:920
glm::int64
detail::int64 int64
Definition: type_int.hpp:91
glm::int16_t
detail::int16 int16_t
Definition: fwd.hpp:303
GLM_STATIC_ASSERT
#define GLM_STATIC_ASSERT(x, message)
Definition: setup.hpp:691
glm::detail::uint32
unsigned int uint32
Definition: type_int.hpp:75
glm::detail::uint16
unsigned short uint16
Definition: type_int.hpp:74
uint64_t
::uint64_t uint64_t
setup.hpp
glm::uint8
detail::uint8 uint8
Definition: type_int.hpp:93
glm::uint32_t
detail::uint32 uint32_t
Definition: fwd.hpp:916
glm::lowp_uint
detail::lowp_uint_t lowp_uint
Definition: type_int.hpp:127
glm::detail::uint8
unsigned char uint8
Definition: type_int.hpp:73
glm
Definition: _literals.hpp:31
glm::detail::highp_uint_t
unsigned int highp_uint_t
Definition: type_int.hpp:85
glm::lowp_int
detail::lowp_int_t lowp_int
Definition: type_int.hpp:106
glm::highp_uint
detail::highp_uint_t highp_uint
Definition: type_int.hpp:141
glm::highp_int
detail::highp_int_t highp_int
Definition: type_int.hpp:120
glm::uint8_t
detail::uint8 uint8_t
Definition: fwd.hpp:908
glm::detail::uint64
unsigned long long uint64
Definition: type_int.hpp:65
glm::detail::int64
sint64 int64
Definition: type_int.hpp:71
glm::int8_t
detail::int8 int8_t
Definition: fwd.hpp:299
glm::uint_t
mediump_uint uint_t
Definition: type_int.hpp:156
glm::detail::lowp_int_t
signed int lowp_int_t
Definition: type_int.hpp:79
glm::mediump_int
detail::mediump_int_t mediump_int
Definition: type_int.hpp:113
glm::uint64
detail::uint64 uint64
Definition: type_int.hpp:96
glm::mediump_uint
detail::mediump_uint_t mediump_uint
Definition: type_int.hpp:134
glm::uint
unsigned int uint
Definition: type_int.hpp:170
glm::int_t
mediump_int int_t
Definition: type_int.hpp:144
glm::int32_t
detail::int32 int32_t
Definition: fwd.hpp:307
glm::int32
detail::int32 int32
Definition: type_int.hpp:90
glm::detail::lowp_uint_t
unsigned int lowp_uint_t
Definition: type_int.hpp:83


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:22