rstsr_core/storage/adv_indexing.rs
1//! Advanced indexing related device traits.
2//!
3//! Currently, full support of advanced indexing is not available. However, it
4//! is still possible to index one axis by list.
5
6use crate::prelude_dev::*;
7
8pub trait DeviceIndexSelectAPI<T, D>
9where
10 D: DimAPI + DimSmallerOneAPI,
11 D::SmallerOne: DimAPI,
12 Self: DeviceAPI<T> + DeviceRawAPI<MaybeUninit<T>>,
13{
14 /// Index select on one axis.
15 fn index_select(
16 &self,
17 c: &mut <Self as DeviceRawAPI<MaybeUninit<T>>>::Raw,
18 lc: &Layout<D>,
19 a: &<Self as DeviceRawAPI<T>>::Raw,
20 la: &Layout<D>,
21 axis: usize,
22 indices: &[usize],
23 ) -> Result<()>;
24}