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

◆ test_sqrt_f32_4()

void simd_test::test_sqrt_f32_4 ( TestResult & result)

Definition at line 360 of file simd_tests.cpp.

360 {
361 float input[4] = {4.0f, 9.0f, 16.0f, 25.0f};
362 float expected[4] = {2.0f, 3.0f, 4.0f, 5.0f};
363 float output[4] = {0.0f};
364
365 simd_f32x4 v = load_f32_4(input);
366 simd_f32x4 result_v = sqrt_f32_4(v);
367 store_f32_4(output, result_v);
368
369 if (!compare_f32_arrays(expected, output, 4, 0.01f)) {
370 result.fail("Float sqrt operation produced incorrect results");
371 }
372}
platforms::simd_f32x4 simd_f32x4
Definition types.h:27
expected< T, E > result
Alias for expected (Rust-style naming)
Definition result.h:31
bool compare_f32_arrays(const float *a, const float *b, size_t count, float epsilon)
Compare two float arrays element-wise with epsilon tolerance.

References compare_f32_arrays().

Referenced by setup().

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