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

Method PaddedAllocationSize

cpp/src/arrow/compute/util_internal.cc:50–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50int64_t TempVectorStack::PaddedAllocationSize(int64_t num_bytes) {
51 // Round up allocation size to multiple of 8 bytes
52 // to avoid returning temp vectors with unaligned address.
53 //
54 // Also add padding at the end to facilitate loads and stores
55 // using SIMD when number of vector elements is not divisible
56 // by the number of SIMD lanes.
57 //
58 return ::arrow::bit_util::RoundUp(num_bytes, sizeof(int64_t)) + kPadding;
59}
60
61void TempVectorStack::alloc(uint32_t num_bytes, uint8_t** data, int* id) {
62 int64_t estimated_alloc_size = EstimatedAllocationSize(num_bytes);

Callers

nothing calls this directly

Calls 1

RoundUpFunction · 0.85

Tested by

no test coverage detected