Skip to main content

vortex_array/arrays/runend/
mod.rs

1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright the Vortex contributors
3
4#[cfg(feature = "arbitrary")]
5mod arbitrary;
6#[cfg(feature = "arbitrary")]
7pub use arbitrary::ArbitraryRunEndArray;
8pub use array::*;
9pub use iter::trimmed_ends_iter;
10
11mod array;
12pub mod compress;
13pub(crate) mod compute;
14pub mod decompress_bool;
15mod iter;
16mod kernel;
17pub mod ops;
18mod probe;
19mod rules;
20#[cfg(test)]
21#[cfg(not(codspeed))]
22mod trace_tests;
23
24#[doc(hidden)]
25pub mod _benchmarking {
26    pub use compute::filter::filter_run_end_primitive;
27    pub use compute::take::take_indices_unchecked;
28
29    use super::*;
30}
31
32use vortex_session::VortexSession;
33
34pub(crate) fn initialize(session: &VortexSession) {
35    kernel::initialize(session);
36}
37
38#[cfg(test)]
39mod tests {
40    use std::sync::LazyLock;
41
42    use prost::Message;
43    use vortex_session::VortexSession;
44
45    use crate::arrays::runend::RunEndMetadata;
46    use crate::dtype::PType;
47    use crate::test_harness::check_metadata;
48
49    pub static SESSION: LazyLock<VortexSession> = LazyLock::new(VortexSession::empty);
50
51    #[cfg_attr(miri, ignore)]
52    #[test]
53    fn test_runend_metadata() {
54        check_metadata(
55            "runend.metadata",
56            &RunEndMetadata {
57                ends_ptype: PType::U64 as i32,
58                num_runs: u64::MAX,
59                offset: u64::MAX,
60            }
61            .encode_to_vec(),
62        );
63    }
64}