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

Method size

mlx/data/core/BatchShape.cpp:14–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12BatchShape::BatchShape(int dim) : dim_(dim), nodim_(false), num_sample_(0) {};
13
14int64_t BatchShape::size() const {
15 int64_t size = 1;
16 for (auto dim : shape_) {
17 size *= dim;
18 }
19 return size;
20}
21
22const std::vector<int64_t>& BatchShape::shape() const {
23 return shape_;

Callers 15

addMethod · 0.45
operator[]Method · 0.45
tokenizeFunction · 0.45
TokenizerMethod · 0.45
tokenize_shortestMethod · 0.45
tokenize_randMethod · 0.45
forward_Method · 0.45
nextMethod · 0.45
fill_queue_Method · 0.45
fetchMethod · 0.45
insertMethod · 0.45
num_keysMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected