MCPcopy Create free account
hub / github.com/FastLED/FastLED / test_min_f32_4

Function test_min_f32_4

examples/SIMD/simd_tests.cpp:374–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372}
373
374void test_min_f32_4(TestResult& result) {
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}
389
390void test_max_f32_4(TestResult& result) {
391 float a_data[4] = {1.0f, 5.0f, 3.0f, 7.0f};

Callers

nothing calls this directly

Calls 2

compare_f32_arraysFunction · 0.85
failMethod · 0.45

Tested by

no test coverage detected