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

Function ToBytes

cpp/src/arrow/c/dlpack_test.cc:353–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351
352template <typename T>
353std::vector<uint8_t> ToBytes(const std::vector<T>& values) {
354 std::vector<uint8_t> bytes(values.size() * sizeof(T));
355 std::memcpy(bytes.data(), values.data(), bytes.size());
356 return bytes;
357}
358
359/// Hand out a DLPack tensor owning ``foreign``, releasing it through its deleter.
360DLManagedTensorVersioned* Produce(ForeignTensor foreign) {

Callers 1

TYPED_TESTFunction · 0.70

Calls 2

sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected