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

Method size

src/custom/impl/tensor.cpp:470–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468}
469
470size_t Tensor::size(void) const {
471 return TensorImplRef(m_tensor).shape().total_nr_elems();
472}
473
474std::vector<ptrdiff_t> Tensor::stride(void) const {
475 std::vector<ptrdiff_t> ret(TensorImplRef(m_tensor).shape().ndim);

Callers 15

parse_typestringFunction · 0.45
parse_dictFunction · 0.45
write_tupleFunction · 0.45
parse_headerFunction · 0.45
LoadArrayFromNumpyFunction · 0.45
parse_npyMethod · 0.45
basic_load_from_pathFunction · 0.45
load_from_path_run_cudaFunction · 0.45
decrypt_modelFunction · 0.45
generate_yolox_proposalsFunction · 0.45
qsort_descent_inplaceFunction · 0.45

Calls 2

total_nr_elemsMethod · 0.45
shapeMethod · 0.45

Tested by 15

TESTFunction · 0.36
parse_typestringFunction · 0.36
parse_dictFunction · 0.36
write_tupleFunction · 0.36
parse_headerFunction · 0.36
LoadArrayFromNumpyFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
test_io_no_copy_axFunction · 0.36
get_input_dataFunction · 0.36
mgb_larFunction · 0.36