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

Function test_sqrt_f32_4

examples/SIMD/simd_tests.cpp:360–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358}
359
360void test_sqrt_f32_4(TestResult& result) {
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}
373
374void test_min_f32_4(TestResult& result) {
375 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