FastLED 3.9.15
Loading...
Searching...
No Matches

◆ benchSimd4()

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

Definition at line 1162 of file AutoResearchSimd.h.

1162 {
1164 set_u32_4(as_u32(fl::s16x16(1.5f).raw()), as_u32(fl::s16x16(2.3f).raw()),
1165 as_u32(fl::s16x16(0.7f).raw()), as_u32(fl::s16x16(3.1f).raw())));
1167 set_u32_4(as_u32(fl::s16x16(0.5f).raw()), as_u32(fl::s16x16(1.2f).raw()),
1168 as_u32(fl::s16x16(2.0f).raw()), as_u32(fl::s16x16(0.9f).raw())));
1170 uint32_t t0 = micros();
1171 for (int i = 0; i < iters; i++) {
1172 a = op(a, b);
1173 b = a + bump;
1174 }
1175 uint32_t t1 = micros();
1176 g_bench_sink = extract_u32_4(a.raw, 0);
1177 return static_cast<int64_t>(t1 - t0);
1178}
static constexpr FASTLED_FORCE_INLINE s16x16 from_raw(i32 raw) FL_NOEXCEPT
Definition s16x16.h:54
uint32_t as_u32(int32_t v)
static volatile uint32_t g_bench_sink
static FASTLED_FORCE_INLINE s16x16x4 from_raw(simd::simd_u32x4 r)
Definition s16x16x4.h:24
simd::simd_u32x4 raw
Definition s16x16x4.h:20
static FASTLED_FORCE_INLINE s16x16x4 set1(s16x16 value)
Definition s16x16x4.h:41
4-wide s16x16 vector (general fixed-point) Backed by 128-bit SIMD register (4× i32 in Q16 format)
Definition s16x16x4.h:19

References as_u32(), fl::s16x16::from_raw(), fl::s16x16x4::from_raw(), g_bench_sink, fl::micros(), fl::s16x16x4::raw, and fl::s16x16x4::set1().

Referenced by runMultiplyBenchmark().

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