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

Method exec

dnn/src/naive/cvt_color/opr_impl.cpp:917–931  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

915}
916
917void CvtColorImpl::exec(
918 _megdnn_tensor_in src, _megdnn_tensor_in dst, _megdnn_workspace workspace) {
919#if !MGE_BUILD_WITHOUT_NAIVE_EXEC
920 using namespace megcv;
921 check_exec(src.layout, dst.layout, workspace.size);
922 MEGDNN_DISPATCH_CPU_KERN_OPR(
923 if (dst.layout.dtype == dtype::Float32()) {
924 cvt_color_exec<float>(src, dst);
925 } else if (dst.layout.dtype == dtype::Uint8()) {
926 cvt_color_exec<uchar>(src, dst);
927 } else { megdnn_throw("Unsupported datatype of CvtColor optr."); });
928#else
929 __builtin_trap();
930#endif
931}
932
933} // namespace naive
934} // namespace megdnn

Callers

nothing calls this directly

Calls 1

ifFunction · 0.50

Tested by

no test coverage detected