MCPcopy Create free account
hub / github.com/apache/arrow / GetTensorSize

Function GetTensorSize

cpp/src/arrow/ipc/writer.cc:1133–1141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1131}
1132
1133Status GetTensorSize(const Tensor& tensor, int64_t* size) {
1134 // emulates the behavior of Write without actually writing
1135 int32_t metadata_length = 0;
1136 int64_t body_length = 0;
1137 io::MockOutputStream dst;
1138 RETURN_NOT_OK(WriteTensor(tensor, &dst, &metadata_length, &body_length));
1139 *size = dst.GetExtentBytesWritten();
1140 return Status::OK();
1141}
1142
1143// ----------------------------------------------------------------------
1144

Callers 1

TEST_FFunction · 0.85

Calls 2

WriteTensorFunction · 0.85
OKFunction · 0.50

Tested by 1

TEST_FFunction · 0.68