MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / vfloat8

Class vfloat8

Source/astcenc_vecmathlib_sve_8.h:53–117  ·  view source on GitHub ↗

* @brief Data type for 8-wide floats. */

Source from the content-addressed store, hash-verified

51 * @brief Data type for 8-wide floats.
52 */
53struct vfloat8
54{
55 /**
56 * @brief Construct from zero-initialized value.
57 */
58 ASTCENC_SIMD_INLINE vfloat8() = default;
59
60 /**
61 * @brief Construct from 8 values loaded from an unaligned address.
62 *
63 * Consider using loada() which is better with vectors if data is aligned
64 * to vector length.
65 */
66 ASTCENC_SIMD_INLINE explicit vfloat8(const float *p)
67 {
68 m = svld1_f32(svptrue_b32(), p);
69 }
70
71 /**
72 * @brief Construct from 1 scalar value replicated across all lanes.
73 *
74 * Consider using zero() for constexpr zeros.
75 */
76 ASTCENC_SIMD_INLINE explicit vfloat8(float a)
77 {
78 m = svdup_f32(a);
79 }
80
81 /**
82 * @brief Construct from an existing SIMD register.
83 */
84 ASTCENC_SIMD_INLINE explicit vfloat8(svfloat32_8_t a)
85 {
86 m = a;
87 }
88
89 /**
90 * @brief Factory that returns a vector of zeros.
91 */
92 static ASTCENC_SIMD_INLINE vfloat8 zero()
93 {
94 return vfloat8(0.0f);
95 }
96
97 /**
98 * @brief Factory that returns a replicated scalar loaded from memory.
99 */
100 static ASTCENC_SIMD_INLINE vfloat8 load1(const float* p)
101 {
102 return vfloat8(*p);
103 }
104
105 /**
106 * @brief Factory that returns a vector loaded from 32B aligned memory.
107 */
108 static ASTCENC_SIMD_INLINE vfloat8 loada(const float* p)
109 {
110 return vfloat8(p);

Callers 15

zeroMethod · 0.70
load1Method · 0.70
loadaMethod · 0.70
operator+Function · 0.70
operator-Function · 0.70
operator*Function · 0.70
operator/Function · 0.70
minFunction · 0.70
maxFunction · 0.70
absFunction · 0.70
roundFunction · 0.70
hminFunction · 0.70

Calls

no outgoing calls

Tested by 1

vfloat8_litFunction · 0.40