8 mValue(_mm256_insertf128_si256(_mm256_castsi128_si256(inLo.mValue), inHi.mValue, 1))
19 return _mm256_set1_epi32(
int(inV));
24 return _mm256_set1_epi32(inV.
GetX());
29 return _mm256_set1_epi32(inV.
GetY());
34 return _mm256_set1_epi32(inV.
GetZ());
48 return _mm256_castps_si256(_mm256_blendv_ps(_mm256_castsi256_ps(inV1.
mValue), _mm256_castsi256_ps(inV2.
mValue), _mm256_castsi256_ps(inControl.
mValue)));
53 return _mm256_castps_si256(_mm256_or_ps(_mm256_castsi256_ps(inV1.
mValue), _mm256_castsi256_ps(inV2.
mValue)));
58 return _mm256_castps_si256(_mm256_xor_ps(_mm256_castsi256_ps(inV1.
mValue), _mm256_castsi256_ps(inV2.
mValue)));
63 return _mm256_castps_si256(_mm256_and_ps(_mm256_castsi256_ps(inV1.
mValue), _mm256_castsi256_ps(inV2.
mValue)));
66template<u
int32 SwizzleX, u
int32 SwizzleY, u
int32 SwizzleZ, u
int32 SwizzleW>
69 static_assert(SwizzleX <= 3,
"SwizzleX template parameter out of range");
70 static_assert(SwizzleY <= 3,
"SwizzleY template parameter out of range");
71 static_assert(SwizzleZ <= 3,
"SwizzleZ template parameter out of range");
72 static_assert(SwizzleW <= 3,
"SwizzleW template parameter out of range");
74 return _mm256_castps_si256(_mm256_shuffle_ps(_mm256_castsi256_ps(
mValue), _mm256_castsi256_ps(
mValue), _MM_SHUFFLE(SwizzleW, SwizzleZ, SwizzleY, SwizzleX)));
79 return _mm256_movemask_ps(_mm256_castsi256_ps(
mValue)) != 0;
84 return _mm256_movemask_ps(_mm256_castsi256_ps(
mValue)) == 0xff;
89 return _mm256_castsi256_si128(
mValue);
94 return _mm_castps_si128(_mm256_extractf128_ps(_mm256_castsi256_ps(
mValue), 1));
99 return _mm256_cvtepi32_ps(
mValue);
102template <const u
int Count>
105 static_assert(Count <= 31,
"Invalid shift");
108 return _mm256_slli_epi32(
mValue, Count);
114template <const u
int Count>
117 static_assert(Count <= 31,
"Invalid shift");
120 return _mm256_srli_epi32(
mValue, Count);
126template <const u
int Count>
129 static_assert(Count <= 31,
"Invalid shift");
132 return _mm256_srai_epi32(
mValue, Count);
uint32_t uint32
Definition Core.h:312
#define JPH_NAMESPACE_END
Definition Core.h:240
#define JPH_NAMESPACE_BEGIN
Definition Core.h:234
JPH_INLINE uint32 GetZ() const
Definition UVec4.h:103
JPH_INLINE uint32 GetY() const
Definition UVec4.h:102
static JPH_INLINE UVec4 sEquals(UVec4Arg inV1, UVec4Arg inV2)
Equals (component wise)
Definition UVec4.inl:138
JPH_INLINE uint32 GetX() const
Get individual components.
Definition UVec4.h:101
JPH_OVERRIDE_NEW_DELETE UVec8()=default
Intentionally not initialized for performance reasons.
JPH_INLINE UVec4 UpperVec4() const
Fetch the higher 128 bit from a 256 bit variable.
Definition UVec8.inl:92
static JPH_INLINE UVec8 sEquals(UVec8Arg inV1, UVec8Arg inV2)
Equals (component wise)
Definition UVec8.inl:37
static JPH_INLINE UVec8 sSplatZ(UVec4Arg inV)
Replicate the Z component of inV to all components.
Definition UVec8.inl:32
JPH_INLINE UVec8 Swizzle() const
256 bit variant of Vec::Swizzle (no cross 128 bit lane swizzle)
JPH_INLINE bool TestAllTrue() const
Test if all components are true (true is when highest bit of component is set)
Definition UVec8.inl:82
JPH_INLINE bool operator==(UVec8Arg inV2) const
Comparison.
Definition UVec8.inl:12
JPH_INLINE UVec8 ArithmeticShiftRight() const
Shift all components by Count bits to the right (shifting in the value of the highest bit)
JPH_INLINE UVec8 LogicalShiftRight() const
Shift all components by Count bits to the right (filling with zeros from the right)
static JPH_INLINE UVec8 sAnd(UVec8Arg inV1, UVec8Arg inV2)
Logical and.
Definition UVec8.inl:61
JPH_INLINE bool TestAnyTrue() const
Test if any of the components are true (true is when highest bit of component is set)
Definition UVec8.inl:77
static JPH_INLINE UVec8 sSplatY(UVec4Arg inV)
Replicate the Y component of inV to all components.
Definition UVec8.inl:27
static JPH_INLINE UVec8 sSplatX(UVec4Arg inV)
Replicate the X component of inV to all components.
Definition UVec8.inl:22
static JPH_INLINE UVec8 sReplicate(uint32 inV)
Replicate int across all components.
Definition UVec8.inl:17
__m256i mValue
Definition UVec8.h:91
static JPH_INLINE UVec8 sOr(UVec8Arg inV1, UVec8Arg inV2)
Logical or.
Definition UVec8.inl:51
JPH_INLINE UVec4 LowerVec4() const
Fetch the lower 128 bit from a 256 bit variable.
Definition UVec8.inl:87
static JPH_INLINE UVec8 sXor(UVec8Arg inV1, UVec8Arg inV2)
Logical xor.
Definition UVec8.inl:56
JPH_INLINE Vec8 ToFloat() const
Converts int to float.
Definition UVec8.inl:97
JPH_INLINE UVec8 LogicalShiftLeft() const
Shift all components by Count bits to the left (filling with zeros from the left)
static JPH_INLINE UVec8 sSelect(UVec8Arg inV1, UVec8Arg inV2, UVec8Arg inControl)
Component wise select, returns inV1 when highest bit of inControl = 0 and inV2 when highest bit of in...
Definition UVec8.inl:46