10 mValue(_mm256_insertf128_ps(_mm256_castps128_ps256(inLo.mValue), inHi.mValue, 1))
16 return _mm256_setzero_ps();
21 return _mm256_set1_ps(inV);
26 return _mm256_set1_ps(inV.
GetX());
31 return _mm256_set1_ps(inV.
GetY());
36 return _mm256_set1_ps(inV.
GetZ());
50 return _mm256_blendv_ps(inV1.
mValue, inV2.
mValue, _mm256_castsi256_ps(inControl.
mValue));
65 return _mm256_castps_si256(_mm256_cmp_ps(inV1.
mValue, inV2.
mValue, _CMP_LT_OQ));
70 return _mm256_castps_si256(_mm256_cmp_ps(inV1.
mValue, inV2.
mValue, _CMP_GT_OQ));
75 return _mm256_loadu_ps(inV);
80 return _mm256_load_ps(inV);
90 return _mm256_mul_ps(
mValue, _mm256_set1_ps(inV2));
113template<u
int32 SwizzleX, u
int32 SwizzleY, u
int32 SwizzleZ, u
int32 SwizzleW>
116 static_assert(SwizzleX <= 3,
"SwizzleX template parameter out of range");
117 static_assert(SwizzleY <= 3,
"SwizzleY template parameter out of range");
118 static_assert(SwizzleZ <= 3,
"SwizzleZ template parameter out of range");
119 static_assert(SwizzleW <= 3,
"SwizzleW template parameter out of range");
121 return _mm256_shuffle_ps(
mValue,
mValue, _MM_SHUFFLE(SwizzleW, SwizzleZ, SwizzleY, SwizzleX));
126#if defined(JPH_USE_AVX512)
129 return _mm256_max_ps(_mm256_sub_ps(_mm256_setzero_ps(),
mValue),
mValue);
135 return _mm256_castps256_ps128(
mValue);
140 return _mm256_extractf128_ps(
mValue, 1);
#define JPH_NAMESPACE_END
Definition Core.h:240
#define JPH_NAMESPACE_BEGIN
Definition Core.h:234
__m256i mValue
Definition UVec8.h:91
static JPH_INLINE Vec4 sMin(Vec4Arg inV1, Vec4Arg inV2)
Return the minimum value of each of the components.
Definition Vec4.inl:138
JPH_INLINE float GetX() const
Get individual components.
Definition Vec4.h:112
JPH_INLINE float ReduceMin() const
Get the minimum of X, Y, Z and W.
Definition Vec4.inl:758
JPH_INLINE float GetZ() const
Definition Vec4.h:114
JPH_INLINE float GetY() const
Definition Vec4.h:113
static JPH_INLINE Vec8 sFusedMultiplyAdd(Vec8Arg inMul1, Vec8Arg inMul2, Vec8Arg inAdd)
Calculates inMul1 * inMul2 + inAdd.
Definition Vec8.inl:39
JPH_INLINE float ReduceMin() const
Get the minimum value of the 8 floats.
Definition Vec8.inl:143
JPH_INLINE Vec4 UpperVec4() const
Fetch the higher 128 bit from a 256 bit variable.
Definition Vec8.inl:138
static JPH_INLINE UVec8 sLess(Vec8Arg inV1, Vec8Arg inV2)
Less than.
Definition Vec8.inl:63
JPH_INLINE Vec8 Reciprocal() const
Reciprocal vector.
Definition Vec8.inl:108
static JPH_INLINE Vec8 sSplatX(Vec4Arg inV)
Replicate the X component of inV to all components.
Definition Vec8.inl:24
JPH_INLINE Vec8 operator-(Vec8Arg inV2) const
Subtract two float vectors.
Definition Vec8.inl:98
JPH_INLINE Vec8 Abs() const
Get absolute value of all components.
Definition Vec8.inl:124
static JPH_INLINE Vec8 sSplatY(Vec4Arg inV)
Replicate the Y component of inV to all components.
Definition Vec8.inl:29
static JPH_INLINE Vec8 sMax(Vec8Arg inV1, Vec8Arg inV2)
Component wise max.
Definition Vec8.inl:58
JPH_INLINE Vec8 operator/(Vec8Arg inV2) const
Divide.
Definition Vec8.inl:103
JPH_INLINE Vec8 operator*(Vec8Arg inV2) const
Multiply two float vectors.
Definition Vec8.inl:83
static JPH_INLINE Vec8 sLoadFloat8Aligned(const float *inV)
Load 8 floats from memory, 32 bytes aligned.
Definition Vec8.inl:78
static JPH_INLINE UVec8 sGreater(Vec8Arg inV1, Vec8Arg inV2)
Greater than.
Definition Vec8.inl:68
static JPH_INLINE Vec8 sZero()
Vector with all zeros.
Definition Vec8.inl:14
JPH_OVERRIDE_NEW_DELETE Vec8()=default
Constructor.
JPH_INLINE Vec4 LowerVec4() const
Fetch the lower 128 bit from a 256 bit variable.
Definition Vec8.inl:133
static JPH_INLINE Vec8 sSelect(Vec8Arg inV1, Vec8Arg inV2, UVec8Arg inControl)
Component wise select, returns inV1 when highest bit of inControl = 0 and inV2 when highest bit of in...
Definition Vec8.inl:48
static JPH_INLINE Vec8 sMin(Vec8Arg inV1, Vec8Arg inV2)
Component wise min.
Definition Vec8.inl:53
static JPH_INLINE Vec8 sSplatZ(Vec4Arg inV)
Replicate the Z component of inV to all components.
Definition Vec8.inl:34
__m256 mValue
Definition Vec8.h:103
JPH_INLINE Vec8 operator+(Vec8Arg inV2) const
Add two float vectors.
Definition Vec8.inl:93
static JPH_INLINE Vec8 sLoadFloat8(const float *inV)
Load from memory.
Definition Vec8.inl:73
JPH_INLINE Vec8 Swizzle() const
256 bit variant of Vec::Swizzle (no cross 128 bit lane swizzle)
static JPH_INLINE Vec8 sReplicate(float inV)
Replicate across all components.
Definition Vec8.inl:19