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

Method exec

dnn/src/fallback/split/opr_impl.cpp:33–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31namespace fallback {
32
33void SplitImpl::exec(
34 _megdnn_tensor_in src, _megdnn_out const TensorNDArray& dsts,
35 _megdnn_workspace workspace) {
36 auto dsts_layout = apply_vector<TensorLayout>(m_get_layout, dsts);
37 auto dsts_shape = apply_vector<TensorShape>(m_get_shape, dsts_layout);
38 check_exec(src.layout, dsts_layout, workspace.size);
39 size_t* Bv = reinterpret_cast<size_t*>(workspace.raw_ptr);
40 size_t A, B, C;
41 get_ABC(dsts_shape, A, Bv, C);
42 B = std::accumulate(Bv, Bv + dsts.size(), 0u);
43 MEGDNN_DISPATCH_CPU_KERN_OPR(split::exec_generic(src, dsts, A, B, C, Bv));
44}
45
46} // namespace fallback
47} // namespace megdnn

Callers

nothing calls this directly

Calls 3

get_ABCFunction · 0.85
exec_genericFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected