MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / size

Method size

mlx/data/Array.cpp:57–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57int64_t Array::size() const {
58 int64_t size = 1;
59 for (auto dim : shape_) {
60 size *= dim;
61 }
62 return size;
63}
64
65int64_t Array::itemsize() const {
66 return itemsize_;

Callers 15

init_mlx_data_coreFunction · 0.45
readinto_bufferMethod · 0.45
to_py_arrayFunction · 0.45
PyBufferIteratorMethod · 0.45
init_mlx_data_bufferFunction · 0.45
ndimMethod · 0.45
ArrayMethod · 0.45
squeezeMethod · 0.45
reshapeMethod · 0.45
cloneFunction · 0.45
sliceFunction · 0.45
copyFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected