MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / assert_eq_and_nan

Function assert_eq_and_nan

dnn/test/fallback/gi.cpp:39–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37
38template <typename T>
39static void assert_eq_and_nan(
40 T* a, const std::vector<T>& b, const size_t simd_len = SIMD_LEN) {
41 for (size_t i = 0; i < simd_len; i++) {
42 if (isnan(a[i]) && isnan(b[i])) {
43 continue;
44 }
45 ASSERT_EQ(a[i], b[i]);
46 }
47}
48
49static void assert_lt(
50 float* a, const std::vector<float>& b, const float eps,

Callers 1

TEST_FFunction · 0.85

Calls 1

isnanFunction · 0.50

Tested by

no test coverage detected