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 nan;
30pub mod propagate_dictionary;
31pub mod propagate_nulls;
32pub mod rolling;
33pub mod size;
34pub mod sum;
35pub mod trim_lists_to_normalized_offsets;
36pub mod unique;
37
38pub trait NotSimdPrimitive: NativeType {}
40
41#[cfg(not(feature = "simd"))]
42impl<T: NativeType> NotSimdPrimitive for T {}
43
44#[cfg(feature = "simd")]
45impl NotSimdPrimitive for u128 {}
46#[cfg(feature = "simd")]
47impl NotSimdPrimitive for i128 {}
48#[cfg(feature = "simd")]
49impl NotSimdPrimitive for pf16 {}
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;
72#[cfg(feature = "simd")]
73use polars_utils::float16::pf16;