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

Function get_imode

dnn/src/cuda/resize/helper.cpp:9–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace resize {
8
9InterpolationMode get_imode(param::Resize::InterpolationMode imode) {
10 using IMode = param::Resize::InterpolationMode;
11 switch (imode) {
12 case IMode::NEAREST:
13 return INTER_NEAREST;
14 case IMode::LINEAR:
15 return INTER_LINEAR;
16 case IMode::AREA:
17 return INTER_AREA;
18 case IMode::CUBIC:
19 return INTER_CUBIC;
20 case IMode::LANCZOS4:
21 return INTER_LANCZOS4;
22 default:
23 megdnn_throw("impossible");
24 }
25}
26
27} // namespace resize
28} // namespace cuda

Callers 1

execMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected