Plasma Engine  2.0
Loading...
Searching...
No Matches
SimdVec4u.h
1#pragma once
2
3#include <Foundation/SimdMath/SimdVec4i.h>
4
6class PL_FOUNDATION_DLL plSimdVec4u
7{
8public:
9 PL_DECLARE_POD_TYPE();
10
11 plSimdVec4u(); // [tested]
12
13 explicit plSimdVec4u(plUInt32 uiXyzw); // [tested]
14
15 plSimdVec4u(plUInt32 x, plUInt32 y, plUInt32 z, plUInt32 w = 1); // [tested]
16
17 plSimdVec4u(plInternal::QuadUInt v); // [tested]
18
20 [[nodiscard]] static plSimdVec4u MakeZero(); // [tested]
21
22 void Set(plUInt32 uiXyzw); // [tested]
23
24 void Set(plUInt32 x, plUInt32 y, plUInt32 z, plUInt32 w); // [tested]
25
26 void SetZero(); // [tested]
27
28public:
29 explicit plSimdVec4u(const plSimdVec4i& i); // [tested]
30
31public:
32 plSimdVec4f ToFloat() const; // [tested]
33
34 [[nodiscard]] static plSimdVec4u Truncate(const plSimdVec4f& f); // [tested]
35
36public:
37 template <int N>
38 plUInt32 GetComponent() const; // [tested]
39
40 plUInt32 x() const; // [tested]
41 plUInt32 y() const; // [tested]
42 plUInt32 z() const; // [tested]
43 plUInt32 w() const; // [tested]
44
45 template <plSwizzle::Enum s>
46 plSimdVec4u Get() const; // [tested]
47
48public:
49 [[nodiscard]] plSimdVec4u operator+(const plSimdVec4u& v) const; // [tested]
50 [[nodiscard]] plSimdVec4u operator-(const plSimdVec4u& v) const; // [tested]
51
52 [[nodiscard]] plSimdVec4u CompMul(const plSimdVec4u& v) const; // [tested]
53
54 [[nodiscard]] plSimdVec4u operator|(const plSimdVec4u& v) const; // [tested]
55 [[nodiscard]] plSimdVec4u operator&(const plSimdVec4u& v) const; // [tested]
56 [[nodiscard]] plSimdVec4u operator^(const plSimdVec4u& v) const; // [tested]
57 [[nodiscard]] plSimdVec4u operator~() const; // [tested]
58
59 [[nodiscard]] plSimdVec4u operator<<(plUInt32 uiShift) const; // [tested]
60 [[nodiscard]] plSimdVec4u operator>>(plUInt32 uiShift) const; // [tested]
61
62 plSimdVec4u& operator+=(const plSimdVec4u& v); // [tested]
63 plSimdVec4u& operator-=(const plSimdVec4u& v); // [tested]
64
65 plSimdVec4u& operator|=(const plSimdVec4u& v); // [tested]
66 plSimdVec4u& operator&=(const plSimdVec4u& v); // [tested]
67 plSimdVec4u& operator^=(const plSimdVec4u& v); // [tested]
68
69 plSimdVec4u& operator<<=(plUInt32 uiShift); // [tested]
70 plSimdVec4u& operator>>=(plUInt32 uiShift); // [tested]
71
72 [[nodiscard]] plSimdVec4u CompMin(const plSimdVec4u& v) const; // [tested]
73 [[nodiscard]] plSimdVec4u CompMax(const plSimdVec4u& v) const; // [tested]
74
75 plSimdVec4b operator==(const plSimdVec4u& v) const; // [tested]
76 plSimdVec4b operator!=(const plSimdVec4u& v) const; // [tested]
77 plSimdVec4b operator<=(const plSimdVec4u& v) const; // [tested]
78 plSimdVec4b operator<(const plSimdVec4u& v) const; // [tested]
79 plSimdVec4b operator>=(const plSimdVec4u& v) const; // [tested]
80 plSimdVec4b operator>(const plSimdVec4u& v) const; // [tested]
81
82public:
84};
85
86#if PL_SIMD_IMPLEMENTATION == PL_SIMD_IMPLEMENTATION_SSE
87# include <Foundation/SimdMath/Implementation/SSE/SSEVec4u_inl.h>
88#elif PL_SIMD_IMPLEMENTATION == PL_SIMD_IMPLEMENTATION_FPU
89# include <Foundation/SimdMath/Implementation/FPU/FPUVec4u_inl.h>
90#elif PL_SIMD_IMPLEMENTATION == PL_SIMD_IMPLEMENTATION_NEON
91# include <Foundation/SimdMath/Implementation/NEON/NEONVec4u_inl.h>
92#else
93# error "Unknown SIMD implementation."
94#endif
Definition SimdVec4b.h:7
A 4-component SIMD vector class.
Definition SimdVec4f.h:8
A SIMD 4-component vector class of signed 32b integers.
Definition SimdVec4i.h:9
A SIMD 4-component vector class of unsigned 32b integers.
Definition SimdVec4u.h:7
A 4-component vector class.
Definition Vec4.h:9