1use crate::dimension::Dim;
5use crate::{ArcArray, Array, ArrayRef, ArrayView, ArrayViewMut, Ix, IxDynImpl, LayoutRef};
6
7#[allow(non_snake_case)]
9#[inline(always)]
10pub const fn Ix0() -> Ix0
11{
12 Dim::new([])
13}
14#[allow(non_snake_case)]
16#[inline(always)]
17pub const fn Ix1(i0: Ix) -> Ix1
18{
19 Dim::new([i0])
20}
21#[allow(non_snake_case)]
23#[inline(always)]
24pub const fn Ix2(i0: Ix, i1: Ix) -> Ix2
25{
26 Dim::new([i0, i1])
27}
28#[allow(non_snake_case)]
30#[inline(always)]
31pub const fn Ix3(i0: Ix, i1: Ix, i2: Ix) -> Ix3
32{
33 Dim::new([i0, i1, i2])
34}
35#[allow(non_snake_case)]
37#[inline(always)]
38pub const fn Ix4(i0: Ix, i1: Ix, i2: Ix, i3: Ix) -> Ix4
39{
40 Dim::new([i0, i1, i2, i3])
41}
42#[allow(non_snake_case)]
44#[inline(always)]
45pub const fn Ix5(i0: Ix, i1: Ix, i2: Ix, i3: Ix, i4: Ix) -> Ix5
46{
47 Dim::new([i0, i1, i2, i3, i4])
48}
49#[allow(non_snake_case)]
51#[inline(always)]
52pub const fn Ix6(i0: Ix, i1: Ix, i2: Ix, i3: Ix, i4: Ix, i5: Ix) -> Ix6
53{
54 Dim::new([i0, i1, i2, i3, i4, i5])
55}
56
57#[allow(non_snake_case)]
59#[inline(always)]
60pub fn IxDyn(ix: &[Ix]) -> IxDyn
61{
62 Dim(ix)
63}
64
65pub type Ix0 = Dim<[Ix; 0]>;
67pub type Ix1 = Dim<[Ix; 1]>;
69pub type Ix2 = Dim<[Ix; 2]>;
71pub type Ix3 = Dim<[Ix; 3]>;
73pub type Ix4 = Dim<[Ix; 4]>;
75pub type Ix5 = Dim<[Ix; 5]>;
77pub type Ix6 = Dim<[Ix; 6]>;
79pub type IxDyn = Dim<IxDynImpl>;
108
109pub type Array0<A> = Array<A, Ix0>;
111pub type Array1<A> = Array<A, Ix1>;
113pub type Array2<A> = Array<A, Ix2>;
115pub type Array3<A> = Array<A, Ix3>;
117pub type Array4<A> = Array<A, Ix4>;
119pub type Array5<A> = Array<A, Ix5>;
121pub type Array6<A> = Array<A, Ix6>;
123pub type ArrayD<A> = Array<A, IxDyn>;
125
126pub type ArrayRef0<A> = ArrayRef<A, Ix0>;
128pub type ArrayRef1<A> = ArrayRef<A, Ix1>;
130pub type ArrayRef2<A> = ArrayRef<A, Ix2>;
132pub type ArrayRef3<A> = ArrayRef<A, Ix3>;
134pub type ArrayRef4<A> = ArrayRef<A, Ix4>;
136pub type ArrayRef5<A> = ArrayRef<A, Ix5>;
138pub type ArrayRef6<A> = ArrayRef<A, Ix6>;
140pub type ArrayRefD<A> = ArrayRef<A, IxDyn>;
142
143pub type LayoutRef0<A> = LayoutRef<A, Ix0>;
145pub type LayoutRef1<A> = LayoutRef<A, Ix1>;
147pub type LayoutRef2<A> = LayoutRef<A, Ix2>;
149pub type LayoutRef3<A> = LayoutRef<A, Ix3>;
151pub type LayoutRef4<A> = LayoutRef<A, Ix4>;
153pub type LayoutRef5<A> = LayoutRef<A, Ix5>;
155pub type LayoutRef6<A> = LayoutRef<A, Ix6>;
157pub type LayoutRefD<A> = LayoutRef<A, IxDyn>;
159
160pub type ArrayView0<'a, A> = ArrayView<'a, A, Ix0>;
162pub type ArrayView1<'a, A> = ArrayView<'a, A, Ix1>;
164pub type ArrayView2<'a, A> = ArrayView<'a, A, Ix2>;
166pub type ArrayView3<'a, A> = ArrayView<'a, A, Ix3>;
168pub type ArrayView4<'a, A> = ArrayView<'a, A, Ix4>;
170pub type ArrayView5<'a, A> = ArrayView<'a, A, Ix5>;
172pub type ArrayView6<'a, A> = ArrayView<'a, A, Ix6>;
174pub type ArrayViewD<'a, A> = ArrayView<'a, A, IxDyn>;
176
177pub type ArrayViewMut0<'a, A> = ArrayViewMut<'a, A, Ix0>;
179pub type ArrayViewMut1<'a, A> = ArrayViewMut<'a, A, Ix1>;
181pub type ArrayViewMut2<'a, A> = ArrayViewMut<'a, A, Ix2>;
183pub type ArrayViewMut3<'a, A> = ArrayViewMut<'a, A, Ix3>;
185pub type ArrayViewMut4<'a, A> = ArrayViewMut<'a, A, Ix4>;
187pub type ArrayViewMut5<'a, A> = ArrayViewMut<'a, A, Ix5>;
189pub type ArrayViewMut6<'a, A> = ArrayViewMut<'a, A, Ix6>;
191pub type ArrayViewMutD<'a, A> = ArrayViewMut<'a, A, IxDyn>;
193
194pub type ArcArray1<A> = ArcArray<A, Ix1>;
196pub type ArcArray2<A> = ArcArray<A, Ix2>;