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

Method exportToC

matlab/src/cpp/arrow/matlab/array/proxy/array.cc:172–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172void Array::exportToC(libmexclass::proxy::method::Context& context) {
173 namespace mda = ::matlab::data;
174 mda::StructArray opts = context.inputs[0];
175 const mda::TypedArray<uint64_t> array_address_mda = opts[0]["ArrowArrayAddress"];
176 const mda::TypedArray<uint64_t> schema_address_mda = opts[0]["ArrowSchemaAddress"];
177
178 auto arrow_array = reinterpret_cast<struct ArrowArray*>(uint64_t(array_address_mda[0]));
179 auto arrow_schema =
180 reinterpret_cast<struct ArrowSchema*>(uint64_t(schema_address_mda[0]));
181
182 MATLAB_ERROR_IF_NOT_OK_WITH_CONTEXT(
183 arrow::ExportArray(*array, arrow_array, arrow_schema), context,
184 error::C_EXPORT_FAILED);
185}
186
187void Array::validate(libmexclass::proxy::method::Context& context) {
188 namespace mda = ::matlab::data;

Callers

nothing calls this directly

Calls 1

ExportArrayFunction · 0.50

Tested by

no test coverage detected