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

Function GetTensorSize

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

Source from the content-addressed store, hash-verified

1138}
1139
1140Status GetTensorSize(const Tensor& tensor, int64_t* size) {
1141 // emulates the behavior of Write without actually writing
1142 int32_t metadata_length = 0;
1143 int64_t body_length = 0;
1144 io::MockOutputStream dst;
1145 RETURN_NOT_OK(WriteTensor(tensor, &dst, &metadata_length, &body_length));
1146 *size = dst.GetExtentBytesWritten();
1147 return Status::OK();
1148}
1149
1150// ----------------------------------------------------------------------
1151

Callers 1

TEST_FFunction · 0.85

Calls 2

WriteTensorFunction · 0.85
OKFunction · 0.50

Tested by 1

TEST_FFunction · 0.68