MCPcopy Create free account
hub / github.com/apache/singa / size

Method size

include/singa/core/tensor.h:139–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137 size_t Size() const { return size(); }
138
139 size_t size() const {
140 if (block_ == nullptr) return 0u;
141 CHECK_EQ(block_->size() % SizeOf(data_type_), 0u);
142 return block_->size() / SizeOf(data_type_);
143 }
144
145 /// Return memory size (i.e., Bytes)
146 size_t MemSize() const { return block_->size(); }

Callers 7

shapeMethod · 0.45
nDimMethod · 0.45
n_dimMethod · 0.45
MemSizeMethod · 0.45
mem_sizeMethod · 0.45
generate_strideMethod · 0.45
ProductFunction · 0.45

Calls 1

SizeOfFunction · 0.85

Tested by

no test coverage detected