48# pragma GCC diagnostic push
49# pragma GCC diagnostic ignored "-Wpedantic"
51# pragma clang diagnostic push
52# pragma clang diagnostic ignored "-Wgnu-anonymous-struct"
53# pragma clang diagnostic ignored "-Wnested-anon-types"
56# pragma warning(disable : 4201)
169# pragma GCC diagnostic pop
171# pragma clang diagnostic pop
180 BLI_STATIC_ASSERT(T::type_length <= 4,
"Longer types need to implement vector_hash themself.");
181 if constexpr (T::type_length == 1) {
184 else if constexpr (T::type_length == 2) {
187 else if constexpr (T::type_length == 3) {
190 else if constexpr (T::type_length == 4) {
200template<
typename T,
int Size>
204 "VecBase is not compatible with aligned type for now.");
213# pragma GCC diagnostic push
214# pragma GCC diagnostic ignored "-Wdeprecated-copy"
221# pragma GCC diagnostic pop
227 for (
int i = 0; i < Size; i++) {
234 requires(std::is_convertible_v<U, T>)
299 template<
typename U,
typename V>
332 template<
typename U,
int OtherSize>
334 requires(OtherSize < Size)
339 template<
typename U,
int OtherSize>
341 requires(OtherSize > Size)
343 for (
int i = 0; i < Size; i++) {
344 (*this)[i] =
T(other[i]);
354# pragma GCC diagnostic push
355# pragma GCC diagnostic ignored "-Warray-bounds"
365 requires(std::is_convertible_v<U, T>)
373# pragma GCC diagnostic pop
385 operator const T *()
const
387 return reinterpret_cast<const T *
>(
this);
392 return reinterpret_cast<T *
>(
this);
401 return reinterpret_cast<const T *
>(
this)[
index];
408 return reinterpret_cast<T *
>(
this)[
index];
495 for (
int i = 0; i < Size; i++) {
509 for (
int i = 0; i < Size; i++) {
523 for (
int i = 0; i < Size; i++) {
532 requires(std::is_integral_v<T>)
538 requires(std::is_integral_v<T>)
544 requires(std::is_integral_v<T>)
550 requires(std::is_integral_v<T>)
556 requires(std::is_integral_v<T>)
562 requires(std::is_integral_v<T>)
568 requires(std::is_integral_v<T>)
574 requires(std::is_integral_v<T>)
580 requires(std::is_integral_v<T>)
586 requires(std::is_integral_v<T>)
592 requires(std::is_integral_v<T>)
598 requires(std::is_integral_v<T>)
604 requires(std::is_integral_v<T>)
610 requires(std::is_integral_v<T>)
616 requires(std::is_integral_v<T>)
622 requires(std::is_integral_v<T>)
630 requires(std::is_integral_v<T>)
636 requires(std::is_integral_v<T>)
642 requires(std::is_integral_v<T>)
648 requires(std::is_integral_v<T>)
654 requires(std::is_integral_v<T>)
660 requires(std::is_integral_v<T>)
666 requires(std::is_integral_v<T>)
672 requires(std::is_integral_v<T>)
680 requires(std::is_integral_v<T>)
682 for (
int i = 0; i < Size; i++) {
689 requires(std::is_integral_v<T>)
696 requires(std::is_integral_v<T>)
698 for (
int i = 0; i < Size; i++) {
708 for (
int i = 0; i < Size; i++) {
731 const T &value = (*this)[i];
739 for (
int i = 0; i < Size; i++) {
756 for (
int i = 0; i < Size; i++) {
#define BLI_UNROLL_MATH_VEC_OP_INIT_INDEX(a)
#define BLI_UNROLL_MATH_VEC_OP_VEC_SCALAR(op, a, b)
#define BLI_UNROLL_MATH_VEC_OP_VEC(op, a)
#define BLI_UNROLL_MATH_VEC_OP_SCALAR_VEC(op, a, b)
#define BLI_UNROLL_MATH_VEC_OP_VEC_VEC(op, a, b)
#define BLI_UNROLL_MATH_VEC_OP_ASSIGN_SCALAR(op, b)
#define BLI_UNROLL_MATH_VEC_OP_INIT_VECTOR(a)
#define BLI_UNROLL_MATH_VEC_OP_ASSIGN_VEC(op, b)
#define BLI_assert_unreachable_static()
SIMD_FORCE_INLINE const btScalar & z() const
Return the z value.
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
constexpr uint64_t vector_hash(const T &vec)
VecBase< uint32_t, 2 > uint2
VecBase< int16_t, 3 > short3
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
VecBase< uint8_t, 4 > uchar4
unsigned __int64 uint64_t
BLI_STATIC_ASSERT(ARRAY_SIZE(data_mode_strings)==CTX_MODE_NUM+1, "Must have a string for each context mode") const char *CTX_data_mode_string(const bContext *C)
VecBase< float, 1 > float1
VecBase< int32_t, 4 > int4
VecBase< uint16_t, 3 > ushort3
VecBase< int8_t, 2 > char2
VecBase< uint32_t, 4 > uint4
VecBase< double, 2 > double2
constexpr bool value_is_zero_memory(const VecBase< T, Size > &v)
VecBase< uint32_t, 3 > uint3
ATTR_WARN_UNUSED_RESULT const BMVert * v
VecBase< int8_t, 4 > char4
VecBase< float, 4 > float4
VecBase< int16_t, 4 > short4
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
VecBase< int32_t, 3 > int3
VecBase< uint16_t, 2 > ushort2
VecBase< double, 3 > double3
VecBase< uint8_t, 2 > uchar2
VecBase< int16_t, 2 > short2
VecBase< int8_t, 3 > char3
VecBase< uint8_t, 3 > uchar3
VecBase< float, 3 > float3
VecBase< uint16_t, 4 > ushort4
void hash_unique_default(const T &value, UniqueHashBytes &hash)
constexpr uint64_t get_default_hash(const T &v, const Args &...args)
VecBase< double, 4 > double4
constexpr void unroll(Fn fn)
VecBase(const VecBase< U, OtherSize > &other)=delete
constexpr VecBase(T _x, T _y, T _z)
VecBase & operator&=(T b) &
constexpr VecBase(T _x, T _y, T _z, T _w)
friend VecBase operator|(T a, const VecBase &b)
friend VecBase operator&(T a, const VecBase &b)
friend VecBase operator<<(const VecBase &a, const VecBase &b)
VecBase(VecBase< U, 2 > xy, VecBase< V, 2 > zw)
friend std::ostream & operator<<(std::ostream &stream, const VecBase &v)
VecBase(VecBase< U, 2 > xy, T z, T w)
friend VecBase operator>>(const VecBase &a, T b)
constexpr uint64_t hash() const
VecBase & operator|=(const VecBase &b) &
friend VecBase operator>>(const VecBase &a, const VecBase &b)
VecBase(T x, VecBase< U, 2 > yz, T w)
friend VecBase operator^(const VecBase &a, const VecBase &b)
VecBase(const VecBase< U, OtherSize > &other)
VecBase & operator<<=(T b) &
friend VecBase operator<<(const VecBase &a, T b)
const T & operator[](int index) const
void hash_unique(UniqueHashBytes &hash) const
friend VecBase operator%(const VecBase &a, T b)
friend VecBase operator-(const T &a, const VecBase &b)
friend VecBase operator-(const VecBase &a, const VecBase &b)
BLI_STATIC_ASSERT(alignof(T)<=sizeof(T), "VecBase is not compatible with aligned type for now.")
friend VecBase operator/(const VecBase &a, T b)
friend VecBase operator^(T a, const VecBase &b)
friend VecBase operator|(const VecBase &a, T b)
constexpr VecBase(T _x, T _y)
VecBase & operator>>=(T b) &
friend VecBase operator*(const VecBase &a, FactorT b)
VecBase(T x, T y, VecBase< U, 2 > zw)
friend bool operator==(const VecBase &a, const VecBase &b)
VecBase & operator^=(T b) &
friend VecBase operator&(const VecBase &a, T b)
static constexpr int type_length
VecBase & operator-=(const T &b) &
VecBase & operator&=(const VecBase &b) &
friend VecBase operator*(const VecBase &a, const VecBase &b)
friend VecBase operator/(T a, const VecBase &b)
friend VecBase operator|(const VecBase &a, const VecBase &b)
friend VecBase operator/(const VecBase &a, const VecBase &b)
VecBase & operator=(const VecBase &) &=default
VecBase & operator^=(const VecBase &b) &
friend VecBase operator^(const VecBase &a, T b)
friend bool operator!=(const VecBase &a, const VecBase &b)
friend VecBase operator+(const VecBase &a, const VecBase &b)
constexpr VecBase(T x, const VecBase< U, 2 > &yz)
VecBase & operator<<=(const VecBase &b) &
VecBase & operator+=(const VecBase &b) &
VecBase & operator|=(T b) &
VecBase(const VecBase< U, Size > &vec)
T & operator[](int index)
VecBase(const T(*ptr)[Size])
friend VecBase operator~(const VecBase &a)
friend VecBase operator-(const VecBase &a)
friend VecBase operator%(const VecBase &a, const VecBase &b)
VecBase & operator/=(const VecBase &b) &
constexpr VecBase(const VecBase< U, 2 > &xy, T z)
friend VecBase operator+(const T &a, const VecBase &b)
VecBase & operator/=(T b) &
VecBase & operator>>=(const VecBase &b) &
friend VecBase operator+(const VecBase &a, const T &b)
friend VecBase operator&(const VecBase &a, const VecBase &b)
friend VecBase operator*(T a, const VecBase &b)
VecBase & operator-=(const VecBase &b) &
VecBase(T x, VecBase< U, 3 > yzw)
VecBase & operator+=(const T &b) &
VecBase(VecBase< U, 3 > xyz, T w)
friend VecBase operator%(T a, const VecBase &b)
friend VecBase operator-(const VecBase &a, const T &b)
VecBase & operator*=(const VecBase &b) &
VecBase & operator*=(T b) &
std::array< T, Size > values
std::array< T, 1 > debug_values_
std::array< T, 2 > debug_values_
std::array< T, 3 > debug_values_
std::array< T, 4 > debug_values_