| 294 | // ============================================================================ |
| 295 | |
| 296 | void test_add_f32_4(TestResult& result) { |
| 297 | float a_data[4] = {1.0f, 2.0f, 3.0f, 4.0f}; |
| 298 | float b_data[4] = {0.5f, 1.5f, 2.5f, 3.5f}; |
| 299 | float expected[4] = {1.5f, 3.5f, 5.5f, 7.5f}; |
| 300 | float output[4] = {0.0f}; |
| 301 | |
| 302 | simd_f32x4 a = load_f32_4(a_data); |
| 303 | simd_f32x4 b = load_f32_4(b_data); |
| 304 | simd_f32x4 c = add_f32_4(a, b); |
| 305 | store_f32_4(output, c); |
| 306 | |
| 307 | if (!compare_f32_arrays(expected, output, 4)) { |
| 308 | result.fail("Float add operation produced incorrect results"); |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | void test_sub_f32_4(TestResult& result) { |
| 313 | float a_data[4] = {5.0f, 4.0f, 3.0f, 2.0f}; |
nothing calls this directly
no test coverage detected