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

Function packedLength

matlab/src/cpp/arrow/matlab/bit/pack.cc:28–33  ·  view source on GitHub ↗

Calculate the number of bytes required in the bit-packed validity buffer.

Source from the content-addressed store, hash-verified

26
27// Calculate the number of bytes required in the bit-packed validity buffer.
28int64_t packedLength(int64_t num_elements) {
29 // Since MATLAB logical values are encoded using a full byte (8 bits),
30 // we can divide the number of elements in the logical array by 8 to get
31 // the bit packed length.
32 return static_cast<int64_t>(std::ceil(num_elements / 8.0));
33}
34
35arrow::Result<std::shared_ptr<arrow::Buffer>> packValid(
36 const ::matlab::data::TypedArray<bool> matlab_logical_array) {

Callers 1

packFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected