1#![cfg_attr(feature = "simd", feature(portable_simd))]
2#![allow(stable_features)]
4#![cfg_attr(
5 all(feature = "simd", target_arch = "x86_64"),
6 feature(stdarch_x86_avx512)
7)]
8
9use arrow::types::NativeType;
10
11pub mod arithmetic;
12pub mod arity;
13pub mod binview_index_map;
14pub mod bitwise;
15#[cfg(feature = "approx_unique")]
16pub mod cardinality;
17#[cfg(feature = "cast")]
18pub mod cast;
19pub mod comparisons;
20pub mod filter;
21#[cfg(feature = "cast")]
22pub mod find_validity_mismatch;
23pub mod float_sum;
24#[cfg(feature = "gather")]
25pub mod gather;
26pub mod horizontal_flatten;
27#[cfg(feature = "approx_unique")]
28pub mod hyperloglogplus;
29pub mod if_then_else;
30pub mod min_max;
31pub mod moment;
32pub mod propagate_dictionary;
33pub mod propagate_nulls;
34pub mod rolling;
35pub mod size;
36pub mod sum;
37pub mod trim_lists_to_normalized_offsets;
38pub mod unique;
39
40pub trait NotSimdPrimitive: NativeType {}
42
43#[cfg(not(feature = "simd"))]
44impl<T: NativeType> NotSimdPrimitive for T {}
45
46#[cfg(feature = "simd")]
47impl NotSimdPrimitive for u128 {}
48#[cfg(feature = "simd")]
49impl NotSimdPrimitive for i128 {}
50
51#[cfg(feature = "simd")]
53mod _simd_primitive {
54 use std::simd::SimdElement;
55 pub trait SimdPrimitive: SimdElement {}
56 impl SimdPrimitive for u8 {}
57 impl SimdPrimitive for u16 {}
58 impl SimdPrimitive for u32 {}
59 impl SimdPrimitive for u64 {}
60 impl SimdPrimitive for usize {}
61 impl SimdPrimitive for i8 {}
62 impl SimdPrimitive for i16 {}
63 impl SimdPrimitive for i32 {}
64 impl SimdPrimitive for i64 {}
65 impl SimdPrimitive for isize {}
66 impl SimdPrimitive for f32 {}
67 impl SimdPrimitive for f64 {}
68}
69
70#[cfg(feature = "simd")]
71pub use _simd_primitive::SimdPrimitive;