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

Function diff

dnn/test/common/utils.h:189–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187 int debug_level, const std::shared_ptr<MegcoreCPUDispatcher>& dispatcher);
188
189static inline dt_float32 diff(dt_float32 x, dt_float32 y) {
190 auto numerator = x - y;
191 auto denominator = std::max(std::max(std::abs(x), std::abs(y)), 1.f);
192 return numerator / denominator;
193}
194
195static inline int diff(int x, int y) {
196 return x - y;

Callers 4

cmp_fltMethod · 0.85
cmp_fltMethod · 0.85
cmp_fltMethod · 0.85

Calls 6

maxFunction · 0.85
as_int32Method · 0.80
as_int16Method · 0.80
absFunction · 0.50
as_uint8Method · 0.45
as_int8Method · 0.45

Tested by

no test coverage detected