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

◆ benchFloat4()

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

Definition at line 1126 of file AutoResearchSimd.h.

1126 {
1127 float a0 = 1.5f, a1 = 2.3f, a2 = 0.7f, a3 = 3.1f;
1128 float b0 = 0.5f, b1 = 1.2f, b2 = 2.0f, b3 = 0.9f;
1129 uint32_t t0 = micros();
1130 for (int i = 0; i < iters; i++) {
1131 a0 = op(a0, b0); a1 = op(a1, b1);
1132 a2 = op(a2, b2); a3 = op(a3, b3);
1133 b0 = a0 + 0.001f; b1 = a1 + 0.001f;
1134 b2 = a2 + 0.001f; b3 = a3 + 0.001f;
1135 }
1136 uint32_t t1 = micros();
1137 uint32_t tmp; fl::memcpy(&tmp, &a0, sizeof(tmp));
1138 g_bench_sink = tmp;
1139 return static_cast<int64_t>(t1 - t0);
1140}
static volatile uint32_t g_bench_sink
void * memcpy(void *dest, const void *src, size_t n) FL_NOEXCEPT

References g_bench_sink, fl::memcpy(), and fl::micros().

Referenced by runMultiplyBenchmark().

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