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

Function test_mul_f32_4

examples/SIMD/simd_tests.cpp:328–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326}
327
328void test_mul_f32_4(TestResult& result) {
329 float a_data[4] = {2.0f, 3.0f, 4.0f, 5.0f};
330 float b_data[4] = {0.5f, 2.0f, 0.25f, 1.0f};
331 float expected[4] = {1.0f, 6.0f, 1.0f, 5.0f};
332 float output[4] = {0.0f};
333
334 simd_f32x4 a = load_f32_4(a_data);
335 simd_f32x4 b = load_f32_4(b_data);
336 simd_f32x4 c = mul_f32_4(a, b);
337 store_f32_4(output, c);
338
339 if (!compare_f32_arrays(expected, output, 4)) {
340 result.fail("Float multiply operation produced incorrect results");
341 }
342}
343
344void test_div_f32_4(TestResult& result) {
345 float a_data[4] = {10.0f, 20.0f, 30.0f, 40.0f};

Callers

nothing calls this directly

Calls 2

compare_f32_arraysFunction · 0.85
failMethod · 0.45

Tested by

no test coverage detected