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

Method make

matlab/src/cpp/arrow/matlab/buffer/proxy/buffer.cc:31–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31libmexclass::proxy::MakeResult Buffer::make(
32 const libmexclass::proxy::FunctionArguments& constructor_arguments) {
33 namespace mda = ::matlab::data;
34 using BufferProxy = proxy::Buffer;
35 using MatlabBuffer = arrow::matlab::buffer::MatlabBuffer;
36
37 mda::StructArray opts = constructor_arguments[0];
38 const mda::TypedArray<uint8_t> values_mda = opts[0]["Values"];
39 auto buffer = std::make_shared<MatlabBuffer>(values_mda);
40 return std::make_shared<BufferProxy>(std::move(buffer));
41}
42
43std::shared_ptr<arrow::Buffer> Buffer::unwrap() { return buffer; }
44

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected