Plasma Engine
2.0
Loading...
Searching...
No Matches
SimdFloat.h
1
#pragma once
2
3
#include <Foundation/Math/Angle.h>
4
#include <Foundation/SimdMath/SimdTypes.h>
5
6
class
PL_FOUNDATION_DLL
plSimdFloat
7
{
8
public
:
9
PL_DECLARE_POD_TYPE();
10
12
plSimdFloat
();
// [tested]
13
15
plSimdFloat
(
float
f);
// [tested]
16
18
plSimdFloat
(plInt32 i);
// [tested]
19
21
plSimdFloat
(plUInt32 i);
// [tested]
22
24
plSimdFloat
(
plAngle
a);
// [tested]
25
27
plSimdFloat
(
plInternal::QuadFloat
v);
// [tested]
28
30
operator
float()
const
;
// [tested]
31
33
[[nodiscard]]
static
plSimdFloat
MakeZero();
// [tested]
34
36
[[nodiscard]]
static
plSimdFloat
MakeNaN();
// [tested]
37
38
public
:
39
plSimdFloat
operator+(
const
plSimdFloat
& f)
const
;
// [tested]
40
plSimdFloat
operator-(
const
plSimdFloat
& f)
const
;
// [tested]
41
plSimdFloat
operator*(
const
plSimdFloat
& f)
const
;
// [tested]
42
plSimdFloat
operator/(
const
plSimdFloat
& f)
const
;
// [tested]
43
44
plSimdFloat
& operator+=(
const
plSimdFloat
& f);
// [tested]
45
plSimdFloat
& operator-=(
const
plSimdFloat
& f);
// [tested]
46
plSimdFloat
& operator*=(
const
plSimdFloat
& f);
// [tested]
47
plSimdFloat
& operator/=(
const
plSimdFloat
& f);
// [tested]
48
49
bool
IsEqual(
const
plSimdFloat
& rhs,
const
plSimdFloat
& fEpsilon)
const
;
50
51
bool
operator==(
const
plSimdFloat
& f)
const
;
// [tested]
52
bool
operator!=(
const
plSimdFloat
& f)
const
;
// [tested]
53
bool
operator>(
const
plSimdFloat
& f)
const
;
// [tested]
54
bool
operator>=(
const
plSimdFloat
& f)
const
;
// [tested]
55
bool
operator<(
const
plSimdFloat
& f)
const
;
// [tested]
56
bool
operator<=(
const
plSimdFloat
& f)
const
;
// [tested]
57
58
bool
operator==(
float
f)
const
;
// [tested]
59
bool
operator!=(
float
f)
const
;
// [tested]
60
bool
operator>(
float
f)
const
;
// [tested]
61
bool
operator>=(
float
f)
const
;
// [tested]
62
bool
operator<(
float
f)
const
;
// [tested]
63
bool
operator<=(
float
f)
const
;
// [tested]
64
65
template
<plMathAcc::Enum acc = plMathAcc::FULL>
66
plSimdFloat
GetReciprocal()
const
;
// [tested]
67
68
template
<plMathAcc::Enum acc = plMathAcc::FULL>
69
plSimdFloat
GetSqrt()
const
;
// [tested]
70
71
template
<plMathAcc::Enum acc = plMathAcc::FULL>
72
plSimdFloat
GetInvSqrt()
const
;
// [tested]
73
74
[[nodiscard]]
plSimdFloat
Max(
const
plSimdFloat
& f)
const
;
// [tested]
75
[[nodiscard]]
plSimdFloat
Min(
const
plSimdFloat
& f)
const
;
// [tested]
76
[[nodiscard]]
plSimdFloat
Abs()
const
;
// [tested]
77
78
public
:
79
plInternal::QuadFloat
m_v;
80
};
81
82
#if PL_SIMD_IMPLEMENTATION == PL_SIMD_IMPLEMENTATION_SSE
83
# include <Foundation/SimdMath/Implementation/SSE/SSEFloat_inl.h>
84
#elif PL_SIMD_IMPLEMENTATION == PL_SIMD_IMPLEMENTATION_FPU
85
# include <Foundation/SimdMath/Implementation/FPU/FPUFloat_inl.h>
86
#elif PL_SIMD_IMPLEMENTATION == PL_SIMD_IMPLEMENTATION_NEON
87
# include <Foundation/SimdMath/Implementation/NEON/NEONFloat_inl.h>
88
#else
89
# error "Unknown SIMD implementation."
90
#endif
plAngle
Float wrapper struct for a safe usage and conversions of angles.
Definition
Angle.h:10
plSimdFloat
Definition
SimdFloat.h:7
plVec4Template< float >
Code
Engine
Foundation
SimdMath
SimdFloat.h
Generated by
1.11.0