| 21 | } |
| 22 | |
| 23 | bool compare_f32_arrays(const float* a, const float* b, size_t count, float epsilon) { |
| 24 | for (size_t i = 0; i < count; i++) { |
| 25 | float diff = a[i] - b[i]; |
| 26 | if (diff < 0.0f) diff = -diff; |
| 27 | if (diff > epsilon) { |
| 28 | return false; |
| 29 | } |
| 30 | } |
| 31 | return true; |
| 32 | } |
| 33 | |
| 34 | // ============================================================================ |
| 35 | // Test Execution Functions |
no outgoing calls
no test coverage detected