13 #ifndef __UT_Storage__
14 #define __UT_Storage__
91 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
92 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
101 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
102 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
111 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
112 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
121 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
122 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
131 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
132 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
141 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
142 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
151 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
152 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
161 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
162 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
171 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
172 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
183 template<UT_Storage STORAGE>
187 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
188 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
194 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
195 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
201 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
202 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
208 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
209 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
215 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
216 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
222 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
223 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
229 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
230 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
236 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
237 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
243 static constexpr
bool theIsFloat = SYS_IsFloatingPoint_v< Type >;
244 static constexpr
bool theIsInt = SYS_IsIntegral_v< Type >;
249 template<
typename T0,
typename T1>
255 template<
typename T0,
typename T1>
259 template<
typename T0,
typename T1>
264 template<
typename T0,
typename T1>
267 template<ex
int TSIZE,
typename DATA_T>
276 template<
typename DATA_T>
287 template<ex
int TSIZE>
295 int myTupleSizePlaceholder;
311 template<
typename TO,
typename FROM>
316 #define DECLARE_CONVERT_STORAGE_ROUND(T,F) \
319 T UTconvertStorage<T,F>(F from) \
320 { return T(from + ((from > 0) ? F(0.5) : F(-0.5))); } \
339 #undef DECLARE_CONVERT_STORAGE_ROUND
SYS_FORCE_INLINE UT_Storage getStorage() const
typename UT_StorageNum< T >::MathFloat UT_StorageMathFloat_t
SYS_FORCE_INLINE UT_Storage getStorage() const
SYS_FORCE_INLINE void setTupleSize(exint tuplesize)
This allows one to determine the type of T0+T1 at compile-time.
getFileOption("OpenEXR:storage") storage
static const UT_Storage theStorage
static constexpr bool theIsInt
SYS_FORCE_INLINE exint getTupleSize() const
SYS_FORCE_INLINE void setStorage(UT_Storage storage)
static constexpr bool theIsFloat
SYS_FORCE_INLINE constexpr bool UTisFloatStorage(UT_Storage storage)
Returns true iff the given storage type represents a floating-point number.
typename SYS_SelectType< typename UT_StorageNum< UT_StorageBetter_t< T0, T1 >>::AtLeast32Bit, T0, UT_StorageNum< UT_StorageBetter_t< T0, T1 >>::theStorage==UT_Storage::INVALID >::type type
static constexpr bool theIsInt
static const UT_Storage theStorage
SYS_FORCE_INLINE TO UTconvertStorage(FROM from)
SYS_FORCE_INLINE exint getTupleSize() const
#define DECLARE_CONVERT_STORAGE_ROUND(T, F)
SYS_FORCE_INLINE exint getTupleSize() const
SYS_FORCE_INLINE void setTupleSize(exint tuplesize)
typename UT_StorageAtLeast32Bit< T0, T1 >::type UT_StorageAtLeast32Bit_t
This allows one to determine the type of T0+T1 at compile-time.
static constexpr bool theIsFloat
typename UT_StorageBetter< T0, T1 >::type UT_StorageBetter_t
SYS_FORCE_INLINE exint getTupleSize() const
SYS_FORCE_INLINE void setStorage(UT_Storage storage)
typename SYS_SelectType< T0, T1,(int(UT_StorageNum< T0 >::theStorage)< int(UT_StorageNum< T1 >::theStorage))>::type type
SYS_FORCE_INLINE void setTupleSize(exint tuplesize)
SYS_FORCE_INLINE void setTupleSize(exint tuplesize)
SYS_FORCE_INLINE void setStorage(UT_Storage storage)
SYS_FORCE_INLINE UT_Storage getStorage() const
SYS_FORCE_INLINE void setStorage(UT_Storage storage)
SYS_FORCE_INLINE constexpr bool UTisIntStorage(UT_Storage storage)
Returns true iff the given storage type represents an integer.
SYS_FORCE_INLINE constexpr int UTstorageSize(UT_Storage storage)
Returns the number of bytes in the given storage type.
SYS_FORCE_INLINE UT_Storage getStorage() const