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