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

Function get_imode

dnn/src/cuda/warp_perspective/helper.cpp:32–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32InterpolationMode get_imode(param::WarpPerspective::InterpolationMode imode) {
33 using IMode = param::WarpPerspective::InterpolationMode;
34 switch (imode) {
35 case IMode::NEAREST:
36 return INTER_NEAREST;
37 case IMode::LINEAR:
38 return INTER_LINEAR;
39 case IMode::AREA:
40 return INTER_AREA;
41 case IMode::CUBIC:
42 return INTER_CUBIC;
43 case IMode::LANCZOS4:
44 return INTER_LANCZOS4;
45 default:
46 megdnn_throw("impossible");
47 }
48}
49
50} // namespace warp_perspective
51} // namespace cuda

Callers 1

execMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected