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

Method gen

dnn/test/rocm/argsort.cpp:29–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27 }
28
29 void gen(const TensorND& tensor) override {
30 auto n = tensor.layout.total_nr_elems();
31 if (m_dtype == dtype::Float32{}) {
32 fill(tensor.ptr<dt_float32>(), n);
33 } else {
34 megdnn_assert(m_dtype == dtype::Int32{});
35 fill(tensor.ptr<dt_int32>(), n);
36 }
37 }
38
39public:
40 ArgsortRNG(DType dt) : m_dtype{dt} {}

Callers

nothing calls this directly

Calls 2

fillFunction · 0.85
total_nr_elemsMethod · 0.45

Tested by

no test coverage detected