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

Function test_div_f32_4

examples/SIMD/simd_tests.cpp:344–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344void test_div_f32_4(TestResult& result) {
345 float a_data[4] = {10.0f, 20.0f, 30.0f, 40.0f};
346 float b_data[4] = {2.0f, 4.0f, 5.0f, 8.0f};
347 float expected[4] = {5.0f, 5.0f, 6.0f, 5.0f};
348 float output[4] = {0.0f};
349
350 simd_f32x4 a = load_f32_4(a_data);
351 simd_f32x4 b = load_f32_4(b_data);
352 simd_f32x4 c = div_f32_4(a, b);
353 store_f32_4(output, c);
354
355 if (!compare_f32_arrays(expected, output, 4)) {
356 result.fail("Float divide operation produced incorrect results");
357 }
358}
359
360void test_sqrt_f32_4(TestResult& result) {
361 float input[4] = {4.0f, 9.0f, 16.0f, 25.0f};

Callers

nothing calls this directly

Calls 2

compare_f32_arraysFunction · 0.85
failMethod · 0.45

Tested by

no test coverage detected