Expand description
Filtering of fixed-width values by a Selection.
filter_buffer filters values that are already in memory, and filter_chunked filters
values that a ChunkDecoder decodes one chunk at a time. Both work for any T: Copy and
share one strategy ladder. filter_records filters records whose byte width is known only
at run time, and uses filter_buffer for power-of-two widths. The first matching row wins:
| Priority | Selection or condition | Out-of-place | In-place |
|---|---|---|---|
| 1 | slices | copy runs | move runs |
| 2 | indices | gather indices | move indices |
| 3 | bitmap, an eligible architecture kernel | SIMD compress | SIMD compress |
| 4 | bitmap, density reaches the byte compress threshold | byte compress | bitmap walk |
| 5 | bitmap, runs average at least 8 values and 96 bytes | copy runs | bitmap walk |
| 6 | bitmap, otherwise | bitmap walk | bitmap walk |
append_filtered appends to an existing buffer with the out-of-place column. Before row 3,
it copies bitmap selections of values of at least 16 bytes at density >= 0.50 without branches.
Row 5 counts the runs of the first 256 words that have a set bit, unless the runs of the whole bitmap are already too many before then.
filter_buffer compacts in place only a uniquely owned buffer with density >= 0.50.
filter_chunked applies the ladder to each chunk that it decodes, at the density of that
chunk. SIMD eligibility is summarized in the simd module.
Structs§
- Selection
- The positions that a filter keeps, out of
lenpositions.
Constants§
- FILTER_
CHUNK_ LEN - Number of values in each chunk of a
ChunkDecoder.
Traits§
- Chunk
Decoder - Decodes the values of an array in chunks of
FILTER_CHUNK_LENvalues, forfilter_chunked.
Functions§
- append_
filtered - Appends the values of
valuesthatselectionkeeps to the end ofout. - filter_
buffer - Filters
bufferbyselectionand returns the selected values. - filter_
chunked - Filters the values of
decoderbyselection, and decodes only the chunks that hold selected values. - filter_
records - Filters the records of
widthbytes invaluesbyselectionand returns the selected records.