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

Function GetSpan

cpp/src/arrow/array/data.h:268–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266 /// \return A span<const T> of the requested length
267 template <typename T>
268 std::span<const T> GetSpan(int i, int64_t length) const {
269 if (!buffers[i]) {
270 assert(length == 0);
271 return {};
272 }
273 const int64_t buffer_length = buffers[i]->size() / static_cast<int64_t>(sizeof(T));
274 assert(i > 0 && length + offset <= buffer_length);
275 ARROW_UNUSED(buffer_length);
276 return std::span<const T>(buffers[i]->data_as<T>() + this->offset, length);
277 }
278
279 /// \brief Access a buffer's data as a span
280 ///

Callers 1

StartCallMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected