FastLED 3.10.9
Loading...
Searching...
No Matches

◆ benchS8x8_4()

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

Definition at line 1200 of file AutoResearchSimd.h.

1200 {
1201 fl::s8x8 a0(1.5f), a1(2.3f), a2(0.7f), a3(3.1f);
1202 fl::s8x8 b0(0.5f), b1(1.2f), b2(2.0f), b3(0.9f);
1203 fl::s8x8 bump = fl::s8x8::from_raw(1);
1204 uint32_t t0 = fl::micros();
1205 for (int i = 0; i < iters; i++) {
1206 a0 = op(a0, b0); a1 = op(a1, b1);
1207 a2 = op(a2, b2); a3 = op(a3, b3);
1208 b0 = a0 + bump; b1 = a1 + bump;
1209 b2 = a2 + bump; b3 = a3 + bump;
1210 }
1211 uint32_t t1 = fl::micros();
1212 simdBenchmarkState().sink = static_cast<uint32_t>(a0.raw());
1213 return static_cast<int64_t>(t1 - t0);
1214}
static constexpr FASTLED_FORCE_INLINE s8x8 from_raw(i16 raw) FL_NO_EXCEPT
Definition s8x8.h:53
SimdBenchmarkState & simdBenchmarkState()
fl::u32 micros() FL_NO_EXCEPT
Universal microsecond timer - returns microseconds since system startup.

References fl::s8x8::from_raw(), fl::micros(), 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: