Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
staffpad::audio::simd::float_x4 Struct Reference

#include <SimdTypes_neon.h>

Public Member Functions

__finl float_x4 ()
 
__finl float_x4 (float val)
 enables math like: float_x4 a = 0.5f * float_x4{1.f, 2.f, 3.f, 4.f}; More...
 
__finl float_x4 (const float32x4_t &val)
 
__finl float_x4 (float v0, float v1, float v2, float v3)
 enables assignments like: float_x4 a = {1.f, 2.f, 3.f, 4.f}; More...
 
__finl float_x4 ()
 
__finl float_x4 (float val)
 enables math like: float_x4 a = 0.5f * float_x4{1.f, 2.f, 3.f, 4.f}; More...
 
__finl float_x4 (float v0, float v1, float v2, float v3)
 enables assignments like: float_x4 a = {1.f, 2.f, 3.f, 4.f}; More...
 
__finl float & operator[] (int n)
 
__finl const float & operator[] (int n) const
 
__finl float_x4 ()
 
__finl float_x4 (float val)
 enables math like: float_x4 a = 0.5f * float_x4{1.f, 2.f, 3.f, 4.f}; More...
 
__finl float_x4 (const __m128 &val)
 

Public Attributes

float32x4_t s
 
float v [4]
 
__m128 s
 

Detailed Description

Definition at line 21 of file SimdTypes_neon.h.

Constructor & Destructor Documentation

◆ float_x4() [1/10]

__finl staffpad::audio::simd::float_x4::float_x4 ( )
inline

Definition at line 25 of file SimdTypes_neon.h.

26 {
27 }

◆ float_x4() [2/10]

__finl staffpad::audio::simd::float_x4::float_x4 ( float  val)
inline

enables math like: float_x4 a = 0.5f * float_x4{1.f, 2.f, 3.f, 4.f};

Definition at line 30 of file SimdTypes_neon.h.

31 {
32 s = vdupq_n_f32(val);
33 }

References s.

◆ float_x4() [3/10]

__finl staffpad::audio::simd::float_x4::float_x4 ( const float32x4_t &  val)
inline

Definition at line 35 of file SimdTypes_neon.h.

35 : s(val)
36 {
37 }

◆ float_x4() [4/10]

__finl staffpad::audio::simd::float_x4::float_x4 ( float  v0,
float  v1,
float  v2,
float  v3 
)
inline

enables assignments like: float_x4 a = {1.f, 2.f, 3.f, 4.f};

Definition at line 40 of file SimdTypes_neon.h.

41 {
42#if _MSC_VER // aggregate initializer won't work unless we have {.n128_f32 = ..} in c++20
43 s.n128_f32[0] = v0;
44 s.n128_f32[1] = v1;
45 s.n128_f32[2] = v2;
46 s.n128_f32[3] = v3;
47#elif __clang__
48 s = {v0, v1, v2, v3};
49#else
50 float f[4] = {v0, v1, v2, v3};
51 s = vld1q_f32(f);
52#endif
53 }

References s.

◆ float_x4() [5/10]

__finl staffpad::audio::simd::float_x4::float_x4 ( )
inline

Definition at line 23 of file SimdTypes_scalar.h.

24 {
25 }

◆ float_x4() [6/10]

__finl staffpad::audio::simd::float_x4::float_x4 ( float  val)
inline

enables math like: float_x4 a = 0.5f * float_x4{1.f, 2.f, 3.f, 4.f};

Definition at line 28 of file SimdTypes_scalar.h.

29 {
30 v[0] = v[1] = v[2] = v[3] = val;
31 }

References v.

◆ float_x4() [7/10]

__finl staffpad::audio::simd::float_x4::float_x4 ( float  v0,
float  v1,
float  v2,
float  v3 
)
inline

enables assignments like: float_x4 a = {1.f, 2.f, 3.f, 4.f};

Definition at line 34 of file SimdTypes_scalar.h.

35 {
36 v[0] = v0;
37 v[1] = v1;
38 v[2] = v2;
39 v[3] = v3;
40 }

References v.

◆ float_x4() [8/10]

__finl staffpad::audio::simd::float_x4::float_x4 ( )
inline

Definition at line 28 of file SimdTypes_sse2.h.

29 {
30 }

◆ float_x4() [9/10]

__finl staffpad::audio::simd::float_x4::float_x4 ( float  val)
inline

enables math like: float_x4 a = 0.5f * float_x4{1.f, 2.f, 3.f, 4.f};

Definition at line 33 of file SimdTypes_sse2.h.

34 {
35 s = _mm_set1_ps(val);
36 }

References s.

◆ float_x4() [10/10]

__finl staffpad::audio::simd::float_x4::float_x4 ( const __m128 &  val)
inline

Definition at line 38 of file SimdTypes_sse2.h.

38 : s(val)
39 {
40 }

Member Function Documentation

◆ operator[]() [1/2]

__finl float & staffpad::audio::simd::float_x4::operator[] ( int  n)
inline

Definition at line 42 of file SimdTypes_scalar.h.

43 {
44 return v[n];
45 }

References v.

◆ operator[]() [2/2]

__finl const float & staffpad::audio::simd::float_x4::operator[] ( int  n) const
inline

Definition at line 47 of file SimdTypes_scalar.h.

48 {
49 return v[n];
50 }

References v.

Member Data Documentation

◆ s [1/2]

float32x4_t staffpad::audio::simd::float_x4::s

◆ s [2/2]

__m128 staffpad::audio::simd::float_x4::s

Definition at line 27 of file SimdTypes_sse2.h.

◆ v

float staffpad::audio::simd::float_x4::v[4]

Definition at line 21 of file SimdTypes_scalar.h.

Referenced by float_x4(), and operator[]().


The documentation for this struct was generated from the following files: