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

Function compare_f32

examples/AutoResearch/AutoResearchSimd.h:42–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42inline bool compare_f32(const float* a, const float* b, size_t n, float eps = 0.001f) {
43 for (size_t i = 0; i < n; i++) {
44 float diff = a[i] - b[i];
45 if (diff < -eps || diff > eps) return false;
46 }
47 return true;
48}
49
50// Reinterpret u32 as i32 for readability
51inline int32_t as_i32(uint32_t v) { return static_cast<int32_t>(v); }

Callers 13

test_load_store_f32_4Function · 0.85
test_set1_f32_4Function · 0.85
test_add_f32_4Function · 0.85
test_add_f32_4_negativeFunction · 0.85
test_sub_f32_4Function · 0.85
test_mul_f32_4Function · 0.85
test_mul_f32_4_negativeFunction · 0.85
test_div_f32_4Function · 0.85
test_sqrt_f32_4Function · 0.85
test_sqrt_f32_4_zeroFunction · 0.85
test_min_f32_4Function · 0.85
test_max_f32_4Function · 0.85

Calls

no outgoing calls

Tested by 13

test_load_store_f32_4Function · 0.68
test_set1_f32_4Function · 0.68
test_add_f32_4Function · 0.68
test_add_f32_4_negativeFunction · 0.68
test_sub_f32_4Function · 0.68
test_mul_f32_4Function · 0.68
test_mul_f32_4_negativeFunction · 0.68
test_div_f32_4Function · 0.68
test_sqrt_f32_4Function · 0.68
test_sqrt_f32_4_zeroFunction · 0.68
test_min_f32_4Function · 0.68
test_max_f32_4Function · 0.68