MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / TotalBytes

Method TotalBytes

tensorflow/core/framework/tensor.cc:1023–1028  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1021}
1022
1023size_t Tensor::TotalBytes() const {
1024 if (shape_.num_elements() == 0) return 0;
1025 CHECK(buf_) << "null buf_ with non-zero shape size " << shape_.num_elements();
1026 CASES(dtype(), return Helper<T>::TotalBytes(buf_, shape_.num_elements()));
1027 return 0; // Makes compiler happy.
1028}
1029
1030size_t Tensor::AllocatedBytes() const {
1031 if (buf_) {

Callers 5

TESTFunction · 0.45
allocate_tempMethod · 0.45
allocate_persistentMethod · 0.45
set_outputMethod · 0.45
InitMethod · 0.45

Calls 1

num_elementsMethod · 0.45

Tested by 1

TESTFunction · 0.36