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::slice_relative_ends;
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    rules::register_parent_rules(session);
37}
38
39#[cfg(test)]
40mod tests {
41    use std::sync::LazyLock;
42
43    use prost::Message;
44    use vortex_session::VortexSession;
45
46    use crate::arrays::runend::RunEndMetadata;
47    use crate::dtype::PType;
48    use crate::test_harness::check_metadata;
49
50    pub static SESSION: LazyLock<VortexSession> = LazyLock::new(VortexSession::empty);
51
52    #[cfg_attr(miri, ignore)]
53    #[test]
54    fn test_runend_metadata() {
55        check_metadata(
56            "runend.metadata",
57            &RunEndMetadata {
58                ends_ptype: PType::U64 as i32,
59                num_runs: u64::MAX,
60                offset: u64::MAX,
61            }
62            .encode_to_vec(),
63        );
64    }
65}