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

◆ test_min_f32_4()

void simd_test::test_min_f32_4 ( TestResult & result)

Definition at line 374 of file simd_tests.cpp.

374 {
375 float a_data[4] = {1.0f, 5.0f, 3.0f, 7.0f};
376 float b_data[4] = {2.0f, 4.0f, 6.0f, 1.0f};
377 float expected[4] = {1.0f, 4.0f, 3.0f, 1.0f};
378 float output[4] = {0.0f};
379
380 simd_f32x4 a = load_f32_4(a_data);
381 simd_f32x4 b = load_f32_4(b_data);
382 simd_f32x4 c = min_f32_4(a, b);
383 store_f32_4(output, c);
384
385 if (!compare_f32_arrays(expected, output, 4)) {
386 result.fail("Float min operation produced incorrect results");
387 }
388}
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: