FastLED 3.10.8
Loading...
Searching...
No Matches

◆ benchSimd4()

template<typename Op>
int64_t autoresearch::simd_check::benchSimd4 ( int iters,
Op op )
inline

Definition at line 1170 of file AutoResearchSimd.h.

1170 {
1172 set_u32_4(as_u32(fl::s16x16(1.5f).raw()), as_u32(fl::s16x16(2.3f).raw()),
1173 as_u32(fl::s16x16(0.7f).raw()), as_u32(fl::s16x16(3.1f).raw())));
1175 set_u32_4(as_u32(fl::s16x16(0.5f).raw()), as_u32(fl::s16x16(1.2f).raw()),
1176 as_u32(fl::s16x16(2.0f).raw()), as_u32(fl::s16x16(0.9f).raw())));
1178 uint32_t t0 = micros();
1179 for (int i = 0; i < iters; i++) {
1180 a = op(a, b);
1181 b = a + bump;
1182 }
1183 uint32_t t1 = micros();
1184 simdBenchmarkState().sink = extract_u32_4(a.raw, 0);
1185 return static_cast<int64_t>(t1 - t0);
1186}
static constexpr FASTLED_FORCE_INLINE s16x16 from_raw(i32 raw) FL_NO_EXCEPT
Definition s16x16.h:56
uint32_t as_u32(int32_t v)
SimdBenchmarkState & simdBenchmarkState()
fl::u32 uint32_t
Definition stdint.h:218
static FASTLED_FORCE_INLINE s16x16x4 from_raw(simd::simd_u32x4 r)
Definition s16x16x4.h:28
simd::simd_u32x4 raw
Definition s16x16x4.h:24
static FASTLED_FORCE_INLINE s16x16x4 set1(s16x16 value)
Definition s16x16x4.h:45
4-wide s16x16 vector (general fixed-point) Backed by 128-bit SIMD register (4× i32 in Q16 format)
Definition s16x16x4.h:23

References as_u32(), fl::s16x16::from_raw(), fl::s16x16x4::from_raw(), fl::micros(), fl::s16x16x4::raw, fl::s16x16x4::set1(), simdBenchmarkState(), and autoresearch::simd_check::SimdBenchmarkState::sink.

Referenced by runMultiplyBenchmark().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: