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

◆ benchFloat4()

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

Definition at line 1134 of file AutoResearchSimd.h.

1134 {
1135 float a0 = 1.5f, a1 = 2.3f, a2 = 0.7f, a3 = 3.1f;
1136 float b0 = 0.5f, b1 = 1.2f, b2 = 2.0f, b3 = 0.9f;
1137 uint32_t t0 = micros();
1138 for (int i = 0; i < iters; i++) {
1139 a0 = op(a0, b0); a1 = op(a1, b1);
1140 a2 = op(a2, b2); a3 = op(a3, b3);
1141 b0 = a0 + 0.001f; b1 = a1 + 0.001f;
1142 b2 = a2 + 0.001f; b3 = a3 + 0.001f;
1143 }
1144 uint32_t t1 = micros();
1145 uint32_t tmp; fl::memcpy(&tmp, &a0, sizeof(tmp));
1146 simdBenchmarkState().sink = tmp;
1147 return static_cast<int64_t>(t1 - t0);
1148}
SimdBenchmarkState & simdBenchmarkState()
FASTLED_FORCE_INLINE void * memcpy(void *dest, const void *src, size_t n) FL_NO_EXCEPT
Definition cstring.h:136

References fl::memcpy(), 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: