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

Method getOffsets

matlab/src/cpp/arrow/matlab/array/proxy/list_array.cc:85–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void ListArray::getOffsets(libmexclass::proxy::method::Context& context) {
86 namespace mda = ::matlab::data;
87 using libmexclass::proxy::ProxyManager;
88 using Int32ArrayProxy = arrow::matlab::array::proxy::NumericArray<arrow::Int32Type>;
89 auto list_array = std::static_pointer_cast<arrow::ListArray>(array);
90 auto offsets_array = list_array->offsets();
91 auto offsets_int32_array = std::static_pointer_cast<arrow::Int32Array>(offsets_array);
92 auto offsets_int32_array_proxy = std::make_shared<Int32ArrayProxy>(offsets_int32_array);
93 const auto offsets_int32_array_proxy_id =
94 ProxyManager::manageProxy(offsets_int32_array_proxy);
95 mda::ArrayFactory factory;
96 context.outputs[0] = factory.createScalar(offsets_int32_array_proxy_id);
97}
98
99} // namespace arrow::matlab::array::proxy

Callers

nothing calls this directly

Calls 1

offsetsMethod · 0.45

Tested by

no test coverage detected