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

Function LevelsToBitmap

cpp/src/parquet/level_comparison_inc.h:37–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35///
36template <typename Predicate>
37inline uint64_t LevelsToBitmap(const int16_t* levels, int64_t num_levels,
38 Predicate predicate) {
39 // Both clang and GCC can vectorize this automatically with SSE4/AVX2.
40 uint64_t mask = 0;
41 for (int x = 0; x < num_levels; x++) {
42 mask |= static_cast<uint64_t>(predicate(levels[x]) ? 1 : 0) << x;
43 }
44 return ::arrow::bit_util::ToLittleEndian(mask);
45}
46
47inline MinMax FindMinMaxImpl(const int16_t* levels, int64_t num_levels) {
48 MinMax out{std::numeric_limits<int16_t>::max(), std::numeric_limits<int16_t>::min()};

Callers 1

GreaterThanBitmapImplFunction · 0.85

Calls 1

ToLittleEndianFunction · 0.70

Tested by

no test coverage detected