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

Function get_nearest_src

dnn/src/arm_common/resize/helper.h:85–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83#endif
84
85static inline int get_nearest_src(float scale, int size, int idx) {
86 return std::min(static_cast<int>(idx / scale), size - 1);
87}
88
89static inline std::tuple<float, int, float, int> get_nearest_linear_coord(
90 InterpolationMode imode, float scale, int size, int idx) {

Callers 3

get_nearest_linear_coordFunction · 0.70
repFunction · 0.50

Calls 1

minFunction · 0.50

Tested by

no test coverage detected