8#define __finl __forceinline
9#define __vecc __vectorcall
11#define __finl inline __attribute__((always_inline))
51 struct RegisterAccessWrapper
56 void operator=(
float x)
60 operator float() noexcept
69 RegisterAccessWrapper raw = {
s, n};
93 return _mm_set1_ps(x);
98 return _mm_load_ps(x);
103 _mm_store_ps(x, a.s);
108 return _mm_shuffle_ps(a.s, b.s, _MM_SHUFFLE(2, 0, 2, 0));
113 return _mm_shuffle_ps(a.s, b.s, _MM_SHUFFLE(3, 1, 3, 1));
118 return _mm_add_ps(a.s, b.s);
123 return _mm_sub_ps(a.s, b.s);
128 return _mm_mul_ps(a.s, b.s);
133 return _mm_sqrt_ps(a.s);
138 __m128i
A = _mm_cvtps_epi32(_mm_set_ss(x));
139 return _mm_cvtss_f32(_mm_cvtepi32_ps(
A));
144 __m128i
A = _mm_cvtps_epi32(a.s);
145 return _mm_cvtepi32_ps(
A);
__finl float_x4 __vecc float_x4_from_float(float x)
__finl float_x4 __vecc operator+(float_x4 a, float_x4 b)
__finl float_x4 __vecc operator-(float_x4 a, float_x4 b)
__finl float __vecc rint(float a)
__finl float_x4 __vecc unzip1(const float_x4 &a, const float_x4 &b)
__finl float_x4 __vecc float_x4_load_aligned(const float *x)
__finl void __vecc store_aligned(const float_x4 &a, float *x)
__finl float_x4 __vecc sqrt(const float_x4 &a)
__finl float_x4 __vecc operator*(float_x4 a, float_x4 b)
__finl float_x4 __vecc unzip2(const float_x4 &a, const float_x4 &b)
__finl float & operator[](int n)
__finl float_x4(const __m128 &val)
__finl float_x4(float val)
enables math like: float_x4 a = 0.5f * float_x4{1.f, 2.f, 3.f, 4.f};