|
Blender V4.3
|
Classes | |
| struct | DoubleUIntType |
| struct | DoubleUIntType< uint16_t > |
| struct | DoubleUIntType< uint32_t > |
| struct | DoubleUIntType< uint64_t > |
| struct | DoubleUIntType< uint8_t > |
| struct | IntF |
| struct | UIntF |
Typedefs | |
| template<typename T > | |
| using | double_uint_type = typename DoubleUIntType<T>::type |
| using | UInt64_8 = UIntF<uint8_t, 8> |
| using | UInt64_16 = UIntF<uint16_t, 4> |
| using | UInt64_32 = UIntF<uint32_t, 2> |
| using | Int64_8 = IntF<uint8_t, 8> |
| using | Int64_16 = IntF<uint16_t, 4> |
| using | Int64_32 = IntF<uint32_t, 2> |
| using | UInt128_8 = UIntF<uint8_t, 16> |
| using | UInt128_16 = UIntF<uint16_t, 8> |
| using | UInt128_32 = UIntF<uint32_t, 4> |
| using | UInt128_64 = UIntF<uint64_t, 2> |
| using | UInt256_8 = UIntF<uint8_t, 32> |
| using | UInt256_16 = UIntF<uint16_t, 16> |
| using | UInt256_32 = UIntF<uint32_t, 8> |
| using | UInt256_64 = UIntF<uint64_t, 4> |
| using | Int128_8 = IntF<uint8_t, 16> |
| using | Int128_16 = IntF<uint16_t, 8> |
| using | Int128_32 = IntF<uint32_t, 4> |
| using | Int128_64 = IntF<uint64_t, 2> |
| using | Int256_8 = IntF<uint8_t, 32> |
| using | Int256_16 = IntF<uint16_t, 16> |
| using | Int256_32 = IntF<uint32_t, 8> |
| using | Int256_64 = IntF<uint64_t, 4> |
| using | UInt128 = UInt128_64 |
| using | UInt256 = UInt256_64 |
| using | Int128 = Int128_64 |
| using | Int256 = Int256_64 |
Functions | |
| template<typename T , typename T2 , int S> | |
| void | generic_add (T *__restrict dst, const T *a, const T *b) |
| template<typename T , typename T2 , int S> | |
| void | generic_sub (T *__restrict dst, const T *a, const T *b) |
| template<typename T , typename T2 , int S> | |
| void | generic_unsigned_mul (T *__restrict dst, const T *a, const T *b) |
| template<typename T , int Size, BLI_ENABLE_IF((!std::is_void_v< double_uint_type< T > >)) > | |
| UIntF< T, Size > | operator+ (const UIntF< T, Size > &a, const UIntF< T, Size > &b) |
| template<typename T , int Size, BLI_ENABLE_IF((!std::is_void_v< double_uint_type< T > >)) > | |
| IntF< T, Size > | operator+ (const IntF< T, Size > &a, const IntF< T, Size > &b) |
| template<typename T , int Size> | |
| UIntF< T, Size > | operator- (const UIntF< T, Size > &a, const UIntF< T, Size > &b) |
| template<typename T , int Size> | |
| IntF< T, Size > | operator- (const IntF< T, Size > &a, const IntF< T, Size > &b) |
| template<typename T , int Size, BLI_ENABLE_IF((!std::is_void_v< double_uint_type< T > >)) > | |
| UIntF< T, Size > | operator* (const UIntF< T, Size > &a, const UIntF< T, Size > &b) |
| template<typename T , int Size> | |
| bool | is_negative (const IntF< T, Size > &a) |
| template<typename T , int Size> | |
| bool | is_zero (const UIntF< T, Size > &a) |
| template<typename T , int Size> | |
| bool | is_zero (const IntF< T, Size > &a) |
| template<typename T , int Size, BLI_ENABLE_IF((!std::is_void_v< double_uint_type< T > >)) > | |
| IntF< T, Size > | operator* (const IntF< T, Size > &a, const IntF< T, Size > &b) |
| template<typename T , int Size> | |
| IntF< T, Size > | operator- (const IntF< T, Size > &a) |
| template<typename T , int Size> | |
| void | operator+= (UIntF< T, Size > &a, const UIntF< T, Size > &b) |
| template<typename T , int Size> | |
| void | operator+= (IntF< T, Size > &a, const IntF< T, Size > &b) |
| template<typename T , int Size> | |
| void | operator-= (UIntF< T, Size > &a, const UIntF< T, Size > &b) |
| template<typename T , int Size> | |
| void | operator-= (IntF< T, Size > &a, const IntF< T, Size > &b) |
| template<typename T , int Size> | |
| void | operator*= (UIntF< T, Size > &a, const UIntF< T, Size > &b) |
| template<typename T , int Size> | |
| void | operator*= (IntF< T, Size > &a, const IntF< T, Size > &b) |
| template<typename T , int Size> | |
| bool | operator== (const IntF< T, Size > &a, const IntF< T, Size > &b) |
| template<typename T , int Size> | |
| bool | operator== (const UIntF< T, Size > &a, const UIntF< T, Size > &b) |
| template<typename T , int Size> | |
| bool | operator!= (const IntF< T, Size > &a, const IntF< T, Size > &b) |
| template<typename T , int Size> | |
| bool | operator!= (const UIntF< T, Size > &a, const UIntF< T, Size > &b) |
| template<typename T , size_t Size> | |
| int | compare_reversed_order (const std::array< T, Size > &a, const std::array< T, Size > &b) |
| template<typename T , int Size> | |
| bool | operator< (const IntF< T, Size > &a, const IntF< T, Size > &b) |
| template<typename T , int Size> | |
| bool | operator<= (const IntF< T, Size > &a, const IntF< T, Size > &b) |
| template<typename T , int Size> | |
| bool | operator> (const IntF< T, Size > &a, const IntF< T, Size > &b) |
| template<typename T , int Size> | |
| bool | operator>= (const IntF< T, Size > &a, const IntF< T, Size > &b) |
| template<typename T , int Size> | |
| bool | operator< (const UIntF< T, Size > &a, const UIntF< T, Size > &b) |
| template<typename T , int Size> | |
| bool | operator<= (const UIntF< T, Size > &a, const UIntF< T, Size > &b) |
| template<typename T , int Size> | |
| bool | operator> (const UIntF< T, Size > &a, const UIntF< T, Size > &b) |
| template<typename T , int Size> | |
| bool | operator>= (const UIntF< T, Size > &a, const UIntF< T, Size > &b) |
| using blender::fixed_width_int::double_uint_type = typename DoubleUIntType<T>::type |
Maps unsigned integer types to a type that's twice the size. E.g. uint16_t to uint32_t.
Definition at line 123 of file BLI_fixed_width_int.hh.
Definition at line 161 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::Int128_16 = IntF<uint16_t, 8> |
Definition at line 144 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::Int128_32 = IntF<uint32_t, 4> |
Definition at line 145 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::Int128_64 = IntF<uint64_t, 2> |
Definition at line 146 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::Int128_8 = IntF<uint8_t, 16> |
Definition at line 143 of file BLI_fixed_width_int.hh.
Definition at line 162 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::Int256_16 = IntF<uint16_t, 16> |
Definition at line 149 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::Int256_32 = IntF<uint32_t, 8> |
Definition at line 150 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::Int256_64 = IntF<uint64_t, 4> |
Definition at line 151 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::Int256_8 = IntF<uint8_t, 32> |
Definition at line 148 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::Int64_16 = IntF<uint16_t, 4> |
Definition at line 130 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::Int64_32 = IntF<uint32_t, 2> |
Definition at line 131 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::Int64_8 = IntF<uint8_t, 8> |
Definition at line 129 of file BLI_fixed_width_int.hh.
Definition at line 159 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::UInt128_16 = UIntF<uint16_t, 8> |
Definition at line 134 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::UInt128_32 = UIntF<uint32_t, 4> |
Definition at line 135 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::UInt128_64 = UIntF<uint64_t, 2> |
Definition at line 136 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::UInt128_8 = UIntF<uint8_t, 16> |
Definition at line 133 of file BLI_fixed_width_int.hh.
Definition at line 160 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::UInt256_16 = UIntF<uint16_t, 16> |
Definition at line 139 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::UInt256_32 = UIntF<uint32_t, 8> |
Definition at line 140 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::UInt256_64 = UIntF<uint64_t, 4> |
Definition at line 141 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::UInt256_8 = UIntF<uint8_t, 32> |
Definition at line 138 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::UInt64_16 = UIntF<uint16_t, 4> |
Definition at line 126 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::UInt64_32 = UIntF<uint32_t, 2> |
Definition at line 127 of file BLI_fixed_width_int.hh.
| using blender::fixed_width_int::UInt64_8 = UIntF<uint8_t, 8> |
Definition at line 125 of file BLI_fixed_width_int.hh.
|
inline |
Definition at line 482 of file BLI_fixed_width_int.hh.
References b.
Referenced by operator<(), operator<(), operator<=(), operator<=(), operator>(), operator>(), operator>=(), and operator>=().
Adds two fixed-width-integer together using the standard addition with carry algorithm taught in schools. The main difference is that the digits here are not 0 to 9, but 0 to max(T).
Due to the design of two's-complement numbers, this works for signed and unsigned fixed-width-integer. The overflow behavior is wrap-around.
| T | Type for individual digits. |
| T2 | Integer type that is twice as large as T. |
| S | Number of digits of type T in each fixed-width-integer. |
Definition at line 279 of file BLI_fixed_width_int.hh.
References b, T, T2, and blender::unroll().
Referenced by operator+(), and operator+().
Similar to generic_add, but for subtraction.
Definition at line 296 of file BLI_fixed_width_int.hh.
References b, T, T2, and blender::unroll().
Referenced by operator-(), and operator-().
|
inline |
Similar to generic_add, but for unsigned multiplication.
Definition at line 310 of file BLI_fixed_width_int.hh.
Referenced by operator*().
Using this function is faster than using the comparison operator. Only a single bit has to be checked to determine if the value is negative.
Definition at line 378 of file BLI_fixed_width_int.hh.
Referenced by blender::fixed_width_int::IntF< T, S >::operator double(), operator*(), operator<(), operator<=(), operator>(), and operator>=().
Definition at line 390 of file BLI_fixed_width_int.hh.
References result, and blender::unroll().
Definition at line 383 of file BLI_fixed_width_int.hh.
References result, and blender::unroll().
|
inline |
Definition at line 470 of file BLI_fixed_width_int.hh.
References b.
|
inline |
Definition at line 476 of file BLI_fixed_width_int.hh.
References b.
|
inline |
Definition at line 398 of file BLI_fixed_width_int.hh.
References b, and is_negative().
|
inline |
Definition at line 367 of file BLI_fixed_width_int.hh.
References b, generic_unsigned_mul(), and result.
Definition at line 452 of file BLI_fixed_width_int.hh.
References b.
|
inline |
Definition at line 447 of file BLI_fixed_width_int.hh.
References b.
|
inline |
Definition at line 343 of file BLI_fixed_width_int.hh.
References b, generic_add(), and result.
|
inline |
Definition at line 335 of file BLI_fixed_width_int.hh.
References b, generic_add(), and result.
Definition at line 432 of file BLI_fixed_width_int.hh.
References b.
|
inline |
Definition at line 427 of file BLI_fixed_width_int.hh.
References b.
Definition at line 418 of file BLI_fixed_width_int.hh.
References result, and blender::fixed_width_int::IntF< T, S >::v.
|
inline |
Definition at line 359 of file BLI_fixed_width_int.hh.
References b, generic_sub(), and result.
|
inline |
Definition at line 351 of file BLI_fixed_width_int.hh.
References b, generic_sub(), and result.
Definition at line 442 of file BLI_fixed_width_int.hh.
References b.
|
inline |
Definition at line 437 of file BLI_fixed_width_int.hh.
References b.
|
inline |
Definition at line 496 of file BLI_fixed_width_int.hh.
References b, compare_reversed_order(), and is_negative().
|
inline |
Definition at line 540 of file BLI_fixed_width_int.hh.
References b, and compare_reversed_order().
|
inline |
Definition at line 507 of file BLI_fixed_width_int.hh.
References b, compare_reversed_order(), and is_negative().
|
inline |
Definition at line 546 of file BLI_fixed_width_int.hh.
References b, and compare_reversed_order().
|
inline |
Definition at line 458 of file BLI_fixed_width_int.hh.
References b.
|
inline |
Definition at line 464 of file BLI_fixed_width_int.hh.
References b.
|
inline |
Definition at line 518 of file BLI_fixed_width_int.hh.
References b, compare_reversed_order(), and is_negative().
|
inline |
Definition at line 552 of file BLI_fixed_width_int.hh.
References b, and compare_reversed_order().
|
inline |
Definition at line 529 of file BLI_fixed_width_int.hh.
References b, compare_reversed_order(), and is_negative().
|
inline |
Definition at line 558 of file BLI_fixed_width_int.hh.
References b, and compare_reversed_order().