MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / num_elements

Method num_elements

paddle/cinn/runtime/buffer.cc:57–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57uint32_t Shape::num_elements() const {
58 uint32_t res = ndims_ > 0 ? 1 : 0;
59 for (int i = 0; i < ndims(); i++) res *= (*this)[i];
60 return res;
61}
62
63} // namespace runtime
64} // namespace cinn

Callers 13

CreateDeviceBufferMethod · 0.45
BuildMethod · 0.45
AllocHostMethod · 0.45
cinn_x86_mallocFunction · 0.45
cinn_call_cnnl_randintFunction · 0.45
__cinn_host_tanh_vFunction · 0.45
cinn_call_cholesky_nvgpuFunction · 0.45
cinn_call_uniform_randomFunction · 0.45

Calls

no outgoing calls

Tested by 2

CreateDeviceBufferMethod · 0.36
BuildMethod · 0.36