12#if !PLATFORM_ENABLE_VECTORINTRINSICS_NEON && !(defined(__cplusplus_cli)) && PLATFORM_ENABLE_VECTORINTRINSICS
19#ifndef UE_PLATFORM_MATH_USE_SSE4_1
20#define UE_PLATFORM_MATH_USE_SSE4_1 PLATFORM_ALWAYS_HAS_SSE4_1
23#ifndef UE_PLATFORM_MATH_USE_AVX
24#define UE_PLATFORM_MATH_USE_AVX PLATFORM_ALWAYS_HAS_AVX
27#ifndef UE_PLATFORM_MATH_USE_AVX_2
28#define UE_PLATFORM_MATH_USE_AVX_2 (PLATFORM_ALWAYS_HAS_AVX_2 && UE_PLATFORM_MATH_USE_AVX)
31#ifndef UE_PLATFORM_MATH_USE_FMA3
32#define UE_PLATFORM_MATH_USE_FMA3 PLATFORM_ALWAYS_HAS_FMA3
35#ifndef UE_PLATFORM_MATH_USE_SVML
36 #if defined(_MSC_VER) && !defined(__clang__)
37 #define UE_PLATFORM_MATH_USE_SVML (_MSC_VER >= 1920)
39 #define UE_PLATFORM_MATH_USE_SVML 0
43#ifndef UE_PLATFORM_MATH_USE_SVML_AVX
44#define UE_PLATFORM_MATH_USE_SVML_AVX (UE_PLATFORM_MATH_USE_SVML && UE_PLATFORM_MATH_USE_AVX)
48#if UE_PLATFORM_MATH_USE_SSE4_1
53#if UE_PLATFORM_MATH_USE_AVX || UE_PLATFORM_MATH_USE_SVML
57#define UE_SSE_FLOAT_ALIGNMENT 16
59#if UE_PLATFORM_MATH_USE_AVX
60#define UE_SSE_DOUBLE_ALIGNMENT 32
62#define UE_SSE_DOUBLE_ALIGNMENT 16
114#if !UE_PLATFORM_MATH_USE_AVX
140#if UE_PLATFORM_MATH_USE_AVX
156#if !UE_PLATFORM_MATH_USE_AVX
167#if !UE_PLATFORM_MATH_USE_AVX
176#if UE_PLATFORM_MATH_USE_AVX
205#define VectorZeroVectorRegister() VectorZeroDouble()
206#define VectorOneVectorRegister() VectorOneDouble()
262#define DECLARE_VECTOR_REGISTER(X, Y, Z, W) MakeVectorRegister(X, Y, Z, W)
270#define SHUFFLEMASK(A0,A1,B2,B3) ( (A0) | ((A1)<<2) | ((B2)<<4) | ((B3)<<6) )
272#define SHUFFLEMASK2(A0,A1) ((A0) | ((A1)<<1))
343#if !UE_PLATFORM_MATH_USE_AVX
376#if !UE_PLATFORM_MATH_USE_AVX
403#if defined(PRAGMA_DISABLE_MISSING_BRACES_WARNINGS)
415#if !PLATFORM_LITTLE_ENDIAN
416#error Big-endian unimplemented
417#elif defined(_MSC_VER) && !defined(__clang__)
418 return {
static_cast<char>(
X >> 0),
static_cast<char>(
X >> 8),
static_cast<char>(
X >> 16),
static_cast<char>(
X >> 24),
419 static_cast<char>(
Y >> 0),
static_cast<char>(
Y >> 8),
static_cast<char>(
Y >> 16),
static_cast<char>(
Y >> 24),
420 static_cast<char>(
Z >> 0),
static_cast<char>(
Z >> 8),
static_cast<char>(
Z >> 16),
static_cast<char>(
Z >> 24),
421 static_cast<char>(W >> 0),
static_cast<char>(W >> 8),
static_cast<char>(W >> 16),
static_cast<char>(W >> 24)};
434#if defined(PRAGMA_ENABLE_MISSING_BRACES_WARNINGS)
467#if !UE_PLATFORM_MATH_USE_AVX
499template <u
int32 ComponentIndex>
502 return (((
float*)&(
Vec))[ComponentIndex]);
511template <u
int32 ComponentIndex>
514#if !UE_PLATFORM_MATH_USE_AVX
515 return (((
double*)&(
Vec.XY))[ComponentIndex]);
517 return (((
double*)&(
Vec.XYZW))[ComponentIndex]);
522#if UE_PLATFORM_MATH_USE_AVX
530#define VectorGetComponent(Vec, ComponentIndex) VectorGetComponentImpl<ComponentIndex>(Vec)
534 return (((
float*)&(
Vec))[ComponentIndex]);
539#if !UE_PLATFORM_MATH_USE_AVX
540 return (((
double*)&(
Vec.XY))[ComponentIndex]);
542 return (((
double*)&(
Vec.XYZW))[ComponentIndex]);
561#if !UE_PLATFORM_MATH_USE_AVX
594#if !UE_PLATFORM_MATH_USE_AVX_2
612#if !UE_PLATFORM_MATH_USE_AVX_2
640#if !UE_PLATFORM_MATH_USE_AVX
658#if !UE_PLATFORM_MATH_USE_AVX
668#if !UE_PLATFORM_MATH_USE_AVX
693 return _mm_setr_ps(Ptr[0], Ptr[1], Ptr[0], Ptr[1]);
699#if !UE_PLATFORM_MATH_USE_AVX
728#if !UE_PLATFORM_MATH_USE_AVX
751#if !UE_PLATFORM_MATH_USE_AVX
773#if !UE_PLATFORM_MATH_USE_AVX
808#if !UE_PLATFORM_MATH_USE_AVX
831#if !UE_PLATFORM_MATH_USE_AVX
856#if !UE_PLATFORM_MATH_USE_AVX
883#define InLane0(Index0, Index1) ((Index0) <= 1 && (Index1) <= 1)
884#define InLane1(Index0, Index1) ((Index0) >= 2 && (Index1) >= 2)
885#define InSameLane(Index0, Index1) (InLane0(Index0, Index1) || InLane1(Index0, Index1))
886#define OutOfLane(Index0, Index1) (!InSameLane(Index0, Index1))
895 template <
int Index0,
int Index1>
898 if constexpr (
Index0 <= 1)
900 if constexpr (Index1 <= 1)
913 if constexpr (Index1 <= 1)
929#if UE_PLATFORM_MATH_USE_SSE4_1
936#if UE_PLATFORM_MATH_USE_AVX
939 constexpr int PERMUTE_LANE_MASK(
int A,
int B) {
return (
A == 0 ? 0x00 : 0x01) | (
B == 0 ? (0x02 << 4) : (0x03 << 4)); }
941 template<
int Lane0,
int Lane1>
950#if !UE_PLATFORM_MATH_USE_AVX_2
962 constexpr int PERMUTE_MASK(
int A,
int B,
int C,
int D) {
return ((
A == 1 ? (1 << 0) : 0) | (
B == 1 ? (1 << 1) : 0) | (
C == 3 ? (1 << 2) : 0) | (
D == 3 ? (1 << 3) : 0)); }
964 template <
int Index0,
int Index1,
int Index2,
int Index3>
993#if UE_PLATFORM_MATH_USE_AVX_2
1016 template<
int Index0,
int Index1,
int Index2,
int Index3>
1021#if UE_PLATFORM_MATH_USE_AVX
1038 template <
int Index>
1046 template <
int Index>
1049 if constexpr (
Index <= 1)
1067 static_assert(
Index >= 0 &&
Index <= 3,
"Invalid Index");
1069#if UE_PLATFORM_MATH_USE_AVX_2
1080#if UE_PLATFORM_MATH_USE_AVX
1085 template<
int Lane0,
int Lane1>
1094#if !UE_PLATFORM_MATH_USE_AVX_2
1109 template <
int Index0,
int Index1,
int Index2,
int Index3>
1167 template<
int Index0,
int Index1,
int Index2,
int Index3>
1181 template<
int Index0,
int Index1,
int Index2,
int Index3>
1192 template<
int Index0,
int Index1,
int Index2,
int Index3>
1208#if UE_PLATFORM_MATH_USE_SSE4_1
1213#if UE_PLATFORM_MATH_USE_AVX_2
1222 static_assert(
Index >= 0 &&
Index <= 3,
"Invalid Index");
1228 template<
int Index0,
int Index1,
int Index2,
int Index3>
1253#define VectorReplicate(Vec, ElementIndex) SSEPermuteHelpers::VectorReplicateTemplate<ElementIndex>(Vec)
1265#define VectorSwizzle(Vec, X, Y, Z, W) SSEPermuteHelpers::VectorSwizzleTemplate<X,Y,Z,W>(Vec)
1278#define VectorShuffle(Vec1, Vec2, X, Y, Z, W) SSEPermuteHelpers::VectorShuffleTemplate<X,Y,Z,W>(Vec1, Vec2)
1295#if !UE_PLATFORM_MATH_USE_AVX
1319#if !UE_PLATFORM_MATH_USE_AVX
1344#if !UE_PLATFORM_MATH_USE_AVX
1368#if !UE_PLATFORM_MATH_USE_AVX
1392#if !UE_PLATFORM_MATH_USE_AVX
1413#if UE_PLATFORM_MATH_USE_FMA3
1422#if UE_PLATFORM_MATH_USE_FMA3 && UE_PLATFORM_MATH_USE_AVX
1424#elif UE_PLATFORM_MATH_USE_FMA3
1444#if UE_PLATFORM_MATH_USE_FMA3
1453#if UE_PLATFORM_MATH_USE_FMA3 && UE_PLATFORM_MATH_USE_AVX
1455#elif UE_PLATFORM_MATH_USE_FMA3
1481#if !UE_PLATFORM_MATH_USE_AVX
1534#if UE_PLATFORM_MATH_USE_FMA3
1566#if UE_PLATFORM_MATH_USE_AVX
1589#if UE_PLATFORM_MATH_USE_AVX
1619#if UE_PLATFORM_MATH_USE_AVX
1634#if UE_PLATFORM_MATH_USE_FMA3
1664#if !UE_PLATFORM_MATH_USE_AVX
1688#if !UE_PLATFORM_MATH_USE_AVX
1714#if !UE_PLATFORM_MATH_USE_AVX
1738#if !UE_PLATFORM_MATH_USE_AVX
1762#if !UE_PLATFORM_MATH_USE_AVX
1786#if !UE_PLATFORM_MATH_USE_AVX
1820#if !UE_PLATFORM_MATH_USE_AVX
1844#if !UE_PLATFORM_MATH_USE_AVX
1868#if !UE_PLATFORM_MATH_USE_AVX
1892#if !UE_PLATFORM_MATH_USE_AVX
1943#if UE_PLATFORM_MATH_USE_SVML
1947 return SSE::exp_ps(
_mm_mul_ps(SSE::log_ps(Base), Exponent));
1960#if UE_PLATFORM_MATH_USE_SVML_AVX
1962#elif UE_PLATFORM_MATH_USE_SVML
1968 Values[0] = FMath::Pow(Values[0],
Exponents[0]);
1969 Values[1] = FMath::Pow(Values[1],
Exponents[1]);
1970 Values[2] = FMath::Pow(Values[2],
Exponents[2]);
1971 Values[3] = FMath::Pow(Values[3],
Exponents[3]);
1972 return Values.ToVectorRegister();
1989#if UE_PLATFORM_MATH_USE_AVX
2016#if UE_PLATFORM_MATH_USE_SVML && 0
2063#if UE_PLATFORM_MATH_USE_AVX
2072#if UE_PLATFORM_MATH_USE_SVML_AVX
2074#elif UE_PLATFORM_MATH_USE_SVML
2211#if !UE_PLATFORM_MATH_USE_AVX
2234#if !UE_PLATFORM_MATH_USE_AVX
2388#if !UE_PLATFORM_MATH_USE_AVX
2412#if !UE_PLATFORM_MATH_USE_AVX
2490#if !UE_PLATFORM_MATH_USE_AVX
2507#define VectorLoadByte4(Ptr) _mm_cvtepi32_ps(_mm_cvtepu8_epi32(_mm_cvtsi32_si128(*(int32*)Ptr)))
2582 Tmp =
_mm_mul_ps(Tmp,
MakeVectorRegister(1.0f / 1023.0f, 1.0f / (1023.0f*1024.0f), 1.0f / (1023.0f*1024.0f*1024.0f), 1.0f / (3.0f*1024.0f*1024.0f*1024.0f)));
2621#define VectorLoadURGBA16N(Ptr) _mm_cvtepi32_ps(_mm_cvtepu16_epi32(_mm_loadl_epi64((const __m128i*)Ptr)))
2674#define VectorResetFloatRegisters()
2682#define VectorGetControlRegister() _mm_getcsr()
2684#if PLATFORM_SUPPORTS_VECTOR_CONTROL_REGISTERS
2690#define VectorSetControlRegister(ControlStatus) _mm_setcsr( ControlStatus )
2695#define VECTOR_ROUND_TOWARD_ZERO _MM_ROUND_TOWARD_ZERO
2700#define VECTOR_DENORMALS_FLUSH_TO_ZERO _MM_FLUSH_ZERO_ON
2703#define VectorSetControlRegister(...)
2704#define VECTOR_ROUND_TOWARD_ZERO
2705#define VECTOR_DENORMALS_FLUSH_TO_ZERO
2810#if !UE_PLATFORM_MATH_USE_AVX
2836#if UE_PLATFORM_MATH_USE_AVX
2855#if UE_PLATFORM_MATH_USE_AVX
2872#if UE_PLATFORM_MATH_USE_SVML
2893#if UE_PLATFORM_MATH_USE_SVML_AVX
2895#elif UE_PLATFORM_MATH_USE_SVML
2908 return DoubleResult;
2937#if UE_PLATFORM_MATH_USE_SVML
2940 return SSE::exp_ps(
X);
2946#if UE_PLATFORM_MATH_USE_SVML_AVX
2948#elif UE_PLATFORM_MATH_USE_SVML
2956 return Doubles.ToVectorRegister();
2962#if UE_PLATFORM_MATH_USE_SVML
2966 Floats[0] = FMath::Exp2(Floats[0]);
2967 Floats[1] = FMath::Exp2(Floats[1]);
2968 Floats[2] = FMath::Exp2(Floats[2]);
2969 Floats[3] = FMath::Exp2(Floats[3]);
2970 return Floats.ToVectorRegister();
2976#if UE_PLATFORM_MATH_USE_SVML_AVX
2978#elif UE_PLATFORM_MATH_USE_SVML
2986 return Doubles.ToVectorRegister();
2992#if UE_PLATFORM_MATH_USE_SVML
2995 return SSE::log_ps(
X);
3001#if UE_PLATFORM_MATH_USE_SVML_AVX
3003#elif UE_PLATFORM_MATH_USE_SVML
3011 return Doubles.ToVectorRegister();
3017#if UE_PLATFORM_MATH_USE_SVML
3025 return Floats.ToVectorRegister();
3031#if UE_PLATFORM_MATH_USE_SVML_AVX
3033#elif UE_PLATFORM_MATH_USE_SVML
3041 return Doubles.ToVectorRegister();
3054 static const float p = 0.225f;
3055 static const float a = 7.58946609f;
3056 static const float b = 1.63384342f;
3063#if UE_PLATFORM_MATH_USE_SVML
3066 return SSE::sin_ps(V);
3072#if UE_PLATFORM_MATH_USE_SVML_AVX
3074#elif UE_PLATFORM_MATH_USE_SVML
3082 return Doubles.ToVectorRegister();
3088#if UE_PLATFORM_MATH_USE_SVML
3091 return SSE::cos_ps(V);
3097#if UE_PLATFORM_MATH_USE_SVML_AVX
3099#elif UE_PLATFORM_MATH_USE_SVML
3107 return Doubles.ToVectorRegister();
3120#if UE_PLATFORM_MATH_USE_SVML
3176#if UE_PLATFORM_MATH_USE_SVML_AVX
3178#elif UE_PLATFORM_MATH_USE_SVML
3190#if UE_PLATFORM_MATH_USE_SVML
3195 Floats[0] = FMath::Tan(Floats[0]);
3196 Floats[1] = FMath::Tan(Floats[1]);
3197 Floats[2] = FMath::Tan(Floats[2]);
3198 Floats[3] = FMath::Tan(Floats[3]);
3199 return Floats.ToVectorRegister();
3205#if UE_PLATFORM_MATH_USE_SVML_AVX
3207#elif UE_PLATFORM_MATH_USE_SVML
3215 return Doubles.ToVectorRegister();
3221#if UE_PLATFORM_MATH_USE_SVML
3225 Floats[0] = FMath::Asin(Floats[0]);
3226 Floats[1] = FMath::Asin(Floats[1]);
3227 Floats[2] = FMath::Asin(Floats[2]);
3228 Floats[3] = FMath::Asin(Floats[3]);
3229 return Floats.ToVectorRegister();
3235#if UE_PLATFORM_MATH_USE_SVML_AVX
3237#elif UE_PLATFORM_MATH_USE_SVML
3245 return Doubles.ToVectorRegister();
3251#if UE_PLATFORM_MATH_USE_SVML
3255 Floats[0] = FMath::Acos(Floats[0]);
3256 Floats[1] = FMath::Acos(Floats[1]);
3257 Floats[2] = FMath::Acos(Floats[2]);
3258 Floats[3] = FMath::Acos(Floats[3]);
3259 return Floats.ToVectorRegister();
3265#if UE_PLATFORM_MATH_USE_SVML_AVX
3267#elif UE_PLATFORM_MATH_USE_SVML
3275 return Doubles.ToVectorRegister();
3281#if UE_PLATFORM_MATH_USE_SVML
3286 Floats[0] = FMath::Atan(Floats[0]);
3287 Floats[1] = FMath::Atan(Floats[1]);
3288 Floats[2] = FMath::Atan(Floats[2]);
3289 Floats[3] = FMath::Atan(Floats[3]);
3290 return Floats.ToVectorRegister();
3296#if UE_PLATFORM_MATH_USE_SVML_AVX
3298#elif UE_PLATFORM_MATH_USE_SVML
3306 return Doubles.ToVectorRegister();
3312#if UE_PLATFORM_MATH_USE_SVML
3322 return FloatsY.ToVectorRegister();
3328#if UE_PLATFORM_MATH_USE_SVML_AVX
3330#elif UE_PLATFORM_MATH_USE_SVML
3339 return DoublesY.ToVectorRegister();
3349#define VectorIntAnd(A, B) _mm_and_si128(A, B)
3351#define VectorIntOr(A, B) _mm_or_si128(A, B)
3353#define VectorIntXor(A, B) _mm_xor_si128(A, B)
3355#define VectorIntAndNot(A, B) _mm_andnot_si128(A, B)
3357#define VectorIntNot(A) _mm_xor_si128(A, GlobalVectorConstants::IntAllMask)
3360#define VectorIntCompareEQ(A, B) _mm_cmpeq_epi32(A,B)
3361#define VectorIntCompareNEQ(A, B) VectorIntNot(_mm_cmpeq_epi32(A,B))
3362#define VectorIntCompareGT(A, B) _mm_cmpgt_epi32(A,B)
3363#define VectorIntCompareLT(A, B) _mm_cmplt_epi32(A,B)
3364#define VectorIntCompareGE(A, B) VectorIntNot(VectorIntCompareLT(A,B))
3365#define VectorIntCompareLE(A, B) VectorIntNot(VectorIntCompareGT(A,B))
3375#define VectorIntAdd(A, B) _mm_add_epi32(A, B)
3376#define VectorIntSubtract(A, B) _mm_sub_epi32(A, B)
3383#define VectorIntNegate(A) VectorIntSubtract(GlobalVectorConstants::IntZero, A)
3405#define VectorIntSign(A) VectorIntSelect(VectorIntCompareGE(A, GlobalVectorConstants::IntZero), GlobalVectorConstants::IntOne, GlobalVectorConstants::IntMinusOne)
3407#define VectorIntToFloat(A) _mm_cvtepi32_ps(A)
3441#define VectorIntStore( Vec, Ptr ) _mm_storeu_si128( (VectorRegister4Int*)(Ptr), Vec )
3442#define VectorIntStore_16( Vec, Ptr ) _mm_storeu_si64( (VectorRegister4Int*)(Ptr), Vec )
3450#define VectorIntLoad( Ptr ) _mm_loadu_si128( (VectorRegister4Int*)(Ptr) )
3451#define VectorIntLoad_16( Ptr ) _mm_loadu_si64 ( (VectorRegister4Int*)(Ptr) )
3458#define VectorIntStoreAligned( Vec, Ptr ) _mm_store_si128( (VectorRegister4Int*)(Ptr), Vec )
3466#define VectorIntLoadAligned( Ptr ) _mm_load_si128( (VectorRegister4Int*)(Ptr) )
3474#define VectorIntLoad1(Ptr) _mm_set1_epi32(*(Ptr))
3475#define VectorIntLoad1_16(Ptr) _mm_set1_epi16(*(Ptr))
3476#define VectorSetZero() _mm_setzero_si128()
3477#define VectorSet1(F) _mm_set1_ps(F)
3478#define VectorIntSet1(F) _mm_set1_epi32(F)
3479#define VectorShiftLeftImm(Vec, ImmAmt) _mm_slli_epi32(Vec, ImmAmt)
3480#define VectorShiftRightImmArithmetic(Vec, ImmAmt) _mm_srai_epi32(Vec, ImmAmt)
3481#define VectorShiftRightImmLogical(Vec, ImmAmt) _mm_srli_epi32(Vec, ImmAmt)
3482#define VectorCastIntToFloat(Vec) _mm_castsi128_ps(Vec)
3483#define VectorCastFloatToInt(Vec) _mm_castps_si128(Vec)
3484#define VectorCastDoubleToInt(Vec) _mm_castpd_si128(Vec)
3485#define VectorCastIntToDouble(Vec) _mm_castsi128_pd(Vec)
3486#define VectorShuffleImmediate(Vec, I0, I1, I2, I3) _mm_shuffle_epi32(Vec, _MM_SHUFFLE(I0, I1, I2, I3))
3487#define VectorIntExpandLow16To32(V0) _mm_unpacklo_epi16(V0, _mm_setzero_si128())
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
FORCEINLINE VectorRegister4Int MakeVectorRegisterInt(int32 X, int32 Y, int32 Z, int32 W)
Definition UnrealMathFPU.h:282
FORCEINLINE VectorRegister4Float VectorTan(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:2039
FORCEINLINE VectorRegister4Float VectorSubtract(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:731
FORCEINLINE void VectorDeinterleave(VectorRegister4Float &RESTRICT OutEvens, VectorRegister4Float &RESTRICT OutOdds, const VectorRegister4Float &RESTRICT Lo, const VectorRegister4Float &RESTRICT Hi)
Definition UnrealMathFPU.h:1777
FORCEINLINE VectorRegister4Double VectorLoadFloat3(const double *Ptr)
Definition UnrealMathFPU.h:427
FORCEINLINE VectorRegister4Float VectorATan2(const VectorRegister4Float &Y, const VectorRegister4Float &X)
Definition UnrealMathFPU.h:2083
FORCEINLINE uint32 VectorAnyGreaterThan(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1917
FORCEINLINE VectorRegister4Float VectorSqrt(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:1263
FORCEINLINE VectorRegister4Int VectorIntAbs(const VectorRegister4Int &A)
Definition UnrealMathFPU.h:2471
FORCEINLINE VectorRegister4Float VectorReciprocalSqrt(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:1279
FORCEINLINE bool VectorMatrixInverse(FMatrix44d *DstMatrix, const FMatrix44d *SrcMatrix)
Definition UnrealMathFPU.h:1603
FORCEINLINE VectorRegister4Float VectorLoadSRGBA16N(void *Ptr)
Definition UnrealMathFPU.h:2268
FORCEINLINE VectorRegister4Int VectorIntMin(const VectorRegister4Int &A, const VectorRegister4Int &B)
Definition UnrealMathFPU.h:2453
FORCEINLINE VectorRegister4Float VectorDot3(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:880
FORCEINLINE VectorRegister4Float VectorMin(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1686
FORCEINLINE float VectorGetComponentImpl(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:364
FORCEINLINE VectorRegister4x4Float VectorLoad16(const float *Ptr)
Definition UnrealMathFPU.h:410
FORCEINLINE VectorRegister4Float VectorDot4(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:901
FORCEINLINE VectorRegister4Float MakeVectorRegister(uint32 X, uint32 Y, uint32 Z, uint32 W)
Definition UnrealMathFPU.h:195
FORCEINLINE void VectorSinCos(VectorRegister4Float *RESTRICT VSinAngles, VectorRegister4Float *RESTRICT VCosAngles, const VectorRegister4Float *RESTRICT VAngles)
Definition UnrealMathFPU.h:2109
FORCEINLINE VectorRegister4Float VectorLoadURGB10A2N(void *Ptr)
Definition UnrealMathFPU.h:1875
FORCEINLINE void VectorStoreSignedByte4(const VectorRegister4Float &Vec, void *Ptr)
Definition UnrealMathFPU.h:1858
FORCEINLINE VectorRegister4Float VectorSet_W1(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:1407
FORCEINLINE VectorRegister4Float VectorSetFloat1(float F)
Definition UnrealMathFPU.h:518
FORCEINLINE VectorRegister4Float VectorLog2(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:2004
FORCEINLINE void VectorQuaternionMultiply(VectorRegister4Float *RESTRICT Result, const VectorRegister4Float *RESTRICT Quat1, const VectorRegister4Float *RESTRICT Quat2)
Definition UnrealMathFPU.h:1431
#define VectorShuffle(Vec1, Vec2, X, Y, Z, W)
Definition UnrealMathFPU.h:652
VectorRegister4Double VectorRegister4d
Definition UnrealMathFPU.h:90
FORCEINLINE VectorRegister4Float VectorTruncate(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:2153
FORCEINLINE VectorRegister4Double VectorZeroDouble(void)
Definition UnrealMathFPU.h:336
FORCEINLINE VectorRegister4Float VectorDivide(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:834
FORCEINLINE VectorRegister4Float VectorMultiply(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:758
AlignedDouble4 AlignedRegister4
Definition UnrealMathFPU.h:150
FORCEINLINE VectorRegister4Float VectorMax(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1713
FORCEINLINE VectorRegister4Float VectorBitwiseAnd(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1165
FORCEINLINE VectorRegister4Float VectorLoadFloat1(const float *Ptr)
Definition UnrealMathFPU.h:468
FORCEINLINE VectorRegister4Float VectorReciprocalLen(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:1343
FORCEINLINE constexpr VectorRegister4Float MakeVectorRegisterFloatConstant(float X, float Y, float Z, float W)
Definition UnrealMathFPU.h:297
FORCEINLINE VectorRegister4Float VectorCos(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:2027
FORCEINLINE VectorRegister4Float VectorLoadFloat2(const float *Ptr)
Definition UnrealMathFPU.h:485
FORCEINLINE VectorRegister4Int VectorIntSelect(const VectorRegister4Int &Mask, const VectorRegister4Int &Vec1, const VectorRegister4Int &Vec2)
Definition UnrealMathFPU.h:2411
FORCEINLINE VectorRegister4Float VectorRound(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:2164
FORCEINLINE void VectorStoreByte4(const VectorRegister4Float &Vec, void *Ptr)
Definition UnrealMathFPU.h:1842
FORCEINLINE VectorRegister4Float VectorCombineLow(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1757
#define VectorGetComponent(Vec, ComponentIndex)
Definition UnrealMathFPU.h:385
VectorRegister4Double VectorRegister4
Definition UnrealMathFPU.h:94
FORCEINLINE void VectorStore16(const VectorRegister4x4Float &Vec, float *Dst)
Definition UnrealMathFPU.h:582
FORCEINLINE VectorRegister4Float VectorReciprocalSqrtEstimate(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:1295
FORCEINLINE VectorRegister4Double VectorLoadDouble1(const double *Ptr)
Definition UnrealMathFPU.h:473
FORCEINLINE void VectorMatrixMultiply(FMatrix44d *Result, const FMatrix44d *Matrix1, const FMatrix44d *Matrix2)
Definition UnrealMathFPU.h:1538
VectorRegister4Float VectorLoadAligned(const float *Ptr)
Definition UnrealMathFPU.h:451
FORCEINLINE VectorRegister4Float VectorMultiplyAdd(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2, const VectorRegister4Float &Vec3)
Definition UnrealMathFPU.h:786
VectorRegister4Int VectorRegister4i
Definition UnrealMathFPU.h:88
FORCEINLINE VectorRegister4Float VectorSelect(const VectorRegister4Float &Mask, const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1105
FORCEINLINE VectorRegister4Float VectorExp(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:1971
FORCEINLINE VectorRegister4Float VectorCompareGT(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:974
FORCEINLINE VectorRegister4Int VectorRoundToIntHalfToEven(const VectorRegister4Float &A)
Definition UnrealMathFPU.h:2175
FORCEINLINE VectorRegister4Double MakeVectorRegisterDoubleMask(uint64 X, uint64 Y, uint64 Z, uint64 W)
Definition UnrealMathFPU.h:206
FORCEINLINE VectorRegister4Float VectorExp2(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:1982
FORCEINLINE VectorRegister4Float VectorASin(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:2050
FORCEINLINE VectorRegister4Float VectorLoadTwoPairsFloat(const float *Ptr1, const float *Ptr2)
Definition UnrealMathFPU.h:503
FORCEINLINE VectorRegister4Double VectorOneDouble(void)
Definition UnrealMathFPU.h:351
FORCEINLINE VectorRegister4Float VectorReciprocalLenEstimate(const VectorRegister4Float &Vector)
Definition UnrealMathFPU.h:1375
FORCEINLINE void VectorStore(const VectorRegister4Float &Vec, float *Dst)
Definition UnrealMathFPU.h:566
FORCEINLINE VectorRegister4Float VectorTransformVector(const VectorRegister4Float &VecP, const FMatrix44f *MatrixM)
Definition UnrealMathFPU.h:1619
FORCEINLINE VectorRegister4Float VectorCompareGE(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1000
FORCEINLINE VectorRegister4Float VectorMod(const VectorRegister4Float &X, const VectorRegister4Float &Y)
Definition UnrealMathFPU.h:2185
FORCEINLINE VectorRegister4Int MakeVectorRegisterInt64(int64 X, int64 Y)
Definition UnrealMathFPU.h:307
FORCEINLINE VectorRegister4Float VectorCombineHigh(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1740
FORCEINLINE VectorRegister4Float VectorCompareLT(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1025
FORCEINLINE VectorRegister4Double MakeVectorRegisterDouble(uint64 X, uint64 Y, uint64 Z, uint64 W)
Definition UnrealMathFPU.h:185
VectorRegister4 VectorRegister
Definition UnrealMathFPU.h:95
FORCEINLINE void VectorStoreAlignedStreamed(const VectorRegister4Float &Vec, float *Dst)
Definition UnrealMathFPU.h:550
FORCEINLINE float VectorGetComponentDynamic(const VectorRegister4Float &Vec, uint32 ComponentIndex)
Definition UnrealMathFPU.h:369
FORCEINLINE VectorRegister4Float VectorLog(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:1993
FORCEINLINE VectorRegister4Float VectorSet_W0(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:1391
#define VectorLoadSignedByte4(Ptr)
Definition UnrealMathFPU.h:1823
FORCEINLINE constexpr VectorRegister4Int MakeVectorRegisterIntConstant(int32 X, int32 Y, int32 Z, int32 W)
Definition UnrealMathFPU.h:292
FORCEINLINE int32 VectorMaskBits(const VectorRegister4Float &Vec1)
Definition UnrealMathFPU.h:1075
FORCEINLINE VectorRegister4Float VectorNegate(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:687
FORCEINLINE VectorRegister4Float VectorNegateMultiplyAdd(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2, const VectorRegister4Float &Vec3)
Definition UnrealMathFPU.h:815
FORCEINLINE VectorRegister4Float VectorReciprocal(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:1311
FORCEINLINE VectorRegister4Float VectorSin(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:2015
FORCEINLINE constexpr VectorRegister2Double MakeVectorRegister2DoubleConstant(double X, double Y)
Definition UnrealMathFPU.h:302
FORCEINLINE void VectorStoreURGBA16N(const VectorRegister4Float &Vec, void *Ptr)
Definition UnrealMathFPU.h:2288
FORCEINLINE VectorRegister4Int VectorShuffleByte4(const VectorRegister4Int &Vec, const VectorRegister4Int &Mask)
Definition UnrealMathFPU.h:2515
FORCEINLINE VectorRegister4Float VectorAbs(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:661
FORCEINLINE VectorRegister4Float VectorACos(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:2061
FORCEINLINE VectorRegister4Float VectorAdd(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:704
FORCEINLINE VectorRegister4Int VectorDoubleToInt(const VectorRegister4Double &A)
Definition UnrealMathFPU.h:2510
FORCEINLINE VectorRegister4Float VectorFloor(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:2142
FORCEINLINE float VectorDot3Scalar(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:861
VectorRegister4Int VectorRegisterInt
Definition UnrealMathFPU.h:96
void VectorStoreAligned(const VectorRegister4Float &Vec, float *Ptr)
Definition UnrealMathFPU.h:534
FORCEINLINE VectorRegister4Float MakeVectorRegisterFloatMask(uint32 X, uint32 Y, uint32 Z, uint32 W)
Definition UnrealMathFPU.h:201
FORCEINLINE VectorRegister4Float VectorBitwiseXor(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1190
FORCEINLINE VectorRegister4Float VectorCeil(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:2131
FORCEINLINE VectorRegister4Double VectorLoadFloat3_W1(const double *Ptr)
Definition UnrealMathFPU.h:439
#define VectorSwizzle(Vec, X, Y, Z, W)
Definition UnrealMathFPU.h:639
FORCEINLINE VectorRegister4Float VectorQuaternionMultiply2(const VectorRegister4Float &Quat1, const VectorRegister4Float &Quat2)
Definition UnrealMathFPU.h:1517
FORCEINLINE VectorRegister4Int VectorIntMax(const VectorRegister4Int &A, const VectorRegister4Int &B)
Definition UnrealMathFPU.h:2462
FORCEINLINE VectorRegister4Float VectorOneFloat(void)
Definition UnrealMathFPU.h:346
#define VectorLoadByte4(Ptr)
Definition UnrealMathFPU.h:1814
FORCEINLINE VectorRegister4Float VectorZeroFloat(void)
Definition UnrealMathFPU.h:331
FORCEINLINE VectorRegister4Float VectorATan(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:2072
FORCEINLINE VectorRegister4Float VectorLoad(const float *Ptr)
Definition UnrealMathFPU.h:394
FORCEINLINE VectorRegister4Float VectorCross(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1216
FORCEINLINE VectorRegister4Float VectorBitwiseOr(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1140
FORCEINLINE VectorRegister4Int VectorFloatToInt(const VectorRegister4Float &A)
Definition UnrealMathFPU.h:2491
bool VectorContainsNaNOrInfinite(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:1960
FORCEINLINE VectorRegister4Float VectorStep(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:2223
VectorRegister4Float VectorRegister4f
Definition UnrealMathFPU.h:89
FORCEINLINE VectorRegister4Float VectorPow(const VectorRegister4Float &Base, const VectorRegister4Float &Exponent)
Definition UnrealMathFPU.h:1243
FORCEINLINE VectorRegister4Int VectorIntMultiply(const VectorRegister4Int &A, const VectorRegister4Int &B)
Definition UnrealMathFPU.h:2435
FORCEINLINE void VectorStoreFloat3(const VectorRegister4Float &Vec, float *Dst)
Definition UnrealMathFPU.h:594
FORCEINLINE VectorRegister4Float VectorReciprocalEstimate(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:1327
FORCEINLINE VectorRegister4Float VectorCompareLE(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:1050
FORCEINLINE VectorRegister4Float VectorCompareEQ(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:923
FORCEINLINE void VectorStoreFloat1(const VectorRegister4Float &Vec, float *Dst)
Definition UnrealMathFPU.h:610
FORCEINLINE VectorRegister4Float MakeVectorRegisterFloat(uint32 X, uint32 Y, uint32 Z, uint32 W)
Definition UnrealMathFPU.h:175
FORCEINLINE VectorRegister4Float MakeVectorRegisterFloatFromDouble(const VectorRegister4Double &Vec4d)
Definition UnrealMathFPU.h:262
FORCEINLINE VectorRegister2Double MakeVectorRegister2Double(double X, double Y)
Definition UnrealMathFPU.h:158
#define VectorReplicate(Vec, ElementIndex)
Definition UnrealMathFPU.h:627
VectorRegister2Double VectorRegister2d
Definition UnrealMathFPU.h:91
FORCEINLINE VectorRegister4Float VectorSign(const VectorRegister4Float &Vec)
Definition UnrealMathFPU.h:2204
#define VectorLoadByte4Reverse(Ptr)
Definition UnrealMathFPU.h:1833
FORCEINLINE VectorRegister4Float VectorCompareNE(const VectorRegister4Float &Vec1, const VectorRegister4Float &Vec2)
Definition UnrealMathFPU.h:948
FORCEINLINE VectorRegister4Float VectorMergeVecXYZ_VecW(const VectorRegister4Float &VecXYZ, const VectorRegister4Float &VecW)
Definition UnrealMathFPU.h:1797
FORCEINLINE void VectorStoreURGB10A2N(const VectorRegister4Float &Vec, void *Ptr)
Definition UnrealMathFPU.h:1895
VectorRegister4Float FloatInfinity()
Definition UnrealMathVectorConstants.h.inl:118
VectorRegister4Double DoubleSignMask()
Definition UnrealMathVectorConstants.h.inl:115
constexpr VectorRegister4Float FloatZero
Definition UnrealMathVectorConstants.h.inl:41
constexpr VectorRegister4Float FloatOne
Definition UnrealMathVectorConstants.h.inl:40
constexpr VectorRegister4Float FloatMinusOne
Definition UnrealMathVectorConstants.h.inl:42
constexpr VectorRegister4Float OneOverTwoPi
Definition UnrealMathVectorConstants.h.inl:126
constexpr VectorRegister4Float SmallNumber
Definition UnrealMathVectorConstants.h.inl:53
constexpr VectorRegister4Double DoubleMinusOne
Definition UnrealMathVectorConstants.h.inl:60
constexpr VectorRegister4Double DOUBLE_QMULTI_SIGN_MASK2
Definition UnrealMathVectorConstants.h.inl:91
constexpr VectorRegister4Float QMULTI_SIGN_MASK0
Definition UnrealMathVectorConstants.h.inl:86
constexpr VectorRegister4Float TwoPi
Definition UnrealMathVectorConstants.h.inl:122
constexpr VectorRegister4Float QMULTI_SIGN_MASK1
Definition UnrealMathVectorConstants.h.inl:87
constexpr VectorRegister4Double DoubleSmallNumber
Definition UnrealMathVectorConstants.h.inl:71
constexpr VectorRegister4Float PiByTwo
Definition UnrealMathVectorConstants.h.inl:123
constexpr VectorRegister4Double DOUBLE_QMULTI_SIGN_MASK0
Definition UnrealMathVectorConstants.h.inl:89
constexpr VectorRegister4Float Pi
Definition UnrealMathVectorConstants.h.inl:121
VectorRegister4Double DoubleXYZMask()
Definition UnrealMathVectorConstants.h.inl:102
constexpr VectorRegister4Float QMULTI_SIGN_MASK2
Definition UnrealMathVectorConstants.h.inl:88
VectorRegister4Float SignMask()
Definition UnrealMathVectorConstants.h.inl:106
constexpr VectorRegister2Double DoubleOne2d
Definition UnrealMathVectorConstants.h.inl:57
VectorRegister4Double DoubleInfinity()
Definition UnrealMathVectorConstants.h.inl:119
constexpr VectorRegister4Double DOUBLE_QMULTI_SIGN_MASK1
Definition UnrealMathVectorConstants.h.inl:90
VectorRegister4Float SignBit()
Definition UnrealMathVectorConstants.h.inl:105
constexpr VectorRegister4Double DoubleOne
Definition UnrealMathVectorConstants.h.inl:58
constexpr VectorRegister4Double DoubleZero
Definition UnrealMathVectorConstants.h.inl:59
constexpr UE::Math::TVector2< T > GetXY(const UE::Math::TVector< T > &V)
Definition VectorTypes.h:262
UE_STRING_CLASS Result(Forward< LhsType >(Lhs), RhsLen)
Definition String.cpp.inl:732
float v
Definition radaudio_mdct.cpp:62
U16 Index
Definition radfft.cpp:71
Definition UnrealMathFPU.h:133
Definition UnrealMathFPU.h:113
static CORE_API bool MatrixInverse(FMatrix44f *DstMatrix, const FMatrix44f *SrcMatrix)
Definition UnrealMath.cpp:928
static float Log2(float Value)
Definition UnrealMathUtility.h:722
Definition UnrealMathFPU.h:34
Definition UnrealMathFPU.h:42
VectorRegister2Double XY
Definition UnrealMathFPU.h:47
VectorRegister2Double ZW
Definition UnrealMathFPU.h:48
Definition UnrealMathFPU.h:20
Definition UnrealMathFPU.h:28
Definition UnrealMathFPU.h:99
Definition UnrealMathFPU.h:14