Skip to content

Commit 40142ac

Browse files
committed
Remove aliases
1 parent 275889f commit 40142ac

File tree

5 files changed

+60
-94
lines changed

5 files changed

+60
-94
lines changed

crates/core_simd/src/select.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,21 @@ where
6060
///
6161
/// ```
6262
/// # #![feature(portable_simd)]
63-
/// # use core_simd::{Mask32, SimdI32};
64-
/// let a = SimdI32::from_array([0, 1, 2, 3]);
65-
/// let b = SimdI32::from_array([4, 5, 6, 7]);
66-
/// let mask = Mask32::from_array([true, false, false, true]);
63+
/// # use core_simd::{Mask, Simd};
64+
/// let a = Simd::from_array([0, 1, 2, 3]);
65+
/// let b = Simd::from_array([4, 5, 6, 7]);
66+
/// let mask = Mask::from_array([true, false, false, true]);
6767
/// let c = mask.select(a, b);
6868
/// assert_eq!(c.to_array(), [0, 5, 6, 3]);
6969
/// ```
7070
///
7171
/// `select` can also be used on masks:
7272
/// ```
7373
/// # #![feature(portable_simd)]
74-
/// # use core_simd::Mask32;
75-
/// let a = Mask32::from_array([true, true, false, false]);
76-
/// let b = Mask32::from_array([false, false, true, true]);
77-
/// let mask = Mask32::from_array([true, false, false, true]);
74+
/// # use core_simd::Mask;
75+
/// let a = Mask::<i32, 4>::from_array([true, true, false, false]);
76+
/// let b = Mask::<i32, 4>::from_array([false, false, true, true]);
77+
/// let mask = Mask::<i32, 4>::from_array([true, false, false, true]);
7878
/// let c = mask.select(a, b);
7979
/// assert_eq!(c.to_array(), [true, false, true, false]);
8080
/// ```

crates/core_simd/src/vector/float.rs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,32 +183,26 @@ macro_rules! impl_float_vector {
183183
};
184184
}
185185

186-
/// A SIMD vector of containing `LANES` `f32` values.
187-
pub type SimdF32<const LANES: usize> = crate::Simd<f32, LANES>;
188-
189-
/// A SIMD vector of containing `LANES` `f64` values.
190-
pub type SimdF64<const LANES: usize> = crate::Simd<f64, LANES>;
191-
192186
impl_float_vector! { f32, u32, i32 }
193187
impl_float_vector! { f64, u64, i64 }
194188

195189
/// Vector of two `f32` values
196-
pub type f32x2 = SimdF32<2>;
190+
pub type f32x2 = Simd<f32, 2>;
197191

198192
/// Vector of four `f32` values
199-
pub type f32x4 = SimdF32<4>;
193+
pub type f32x4 = Simd<f32, 4>;
200194

201195
/// Vector of eight `f32` values
202-
pub type f32x8 = SimdF32<8>;
196+
pub type f32x8 = Simd<f32, 8>;
203197

204198
/// Vector of 16 `f32` values
205-
pub type f32x16 = SimdF32<16>;
199+
pub type f32x16 = Simd<f32, 16>;
206200

207201
/// Vector of two `f64` values
208-
pub type f64x2 = SimdF64<2>;
202+
pub type f64x2 = Simd<f64, 2>;
209203

210204
/// Vector of four `f64` values
211-
pub type f64x4 = SimdF64<4>;
205+
pub type f64x4 = Simd<f64, 4>;
212206

213207
/// Vector of eight `f64` values
214-
pub type f64x8 = SimdF64<8>;
208+
pub type f64x8 = Simd<f64, 8>;

crates/core_simd/src/vector/int.rs

Lines changed: 20 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -36,83 +36,68 @@ macro_rules! impl_integer_vector {
3636
}
3737
}
3838

39-
/// A SIMD vector of containing `LANES` `i8` values.
40-
pub type SimdI8<const LANES: usize> = crate::Simd<i8, LANES>;
41-
42-
/// A SIMD vector of containing `LANES` `i16` values.
43-
pub type SimdI16<const LANES: usize> = crate::Simd<i16, LANES>;
44-
45-
/// A SIMD vector of containing `LANES` `i32` values.
46-
pub type SimdI32<const LANES: usize> = crate::Simd<i32, LANES>;
47-
48-
/// A SIMD vector of containing `LANES` `i64` values.
49-
pub type SimdI64<const LANES: usize> = crate::Simd<i64, LANES>;
50-
51-
/// A SIMD vector of containing `LANES` `isize` values.
52-
pub type SimdIsize<const LANES: usize> = crate::Simd<isize, LANES>;
53-
5439
impl_integer_vector! { isize }
5540
impl_integer_vector! { i16 }
5641
impl_integer_vector! { i32 }
5742
impl_integer_vector! { i64 }
5843
impl_integer_vector! { i8 }
5944

6045
/// Vector of two `isize` values
61-
pub type isizex2 = SimdIsize<2>;
46+
pub type isizex2 = Simd<isize, 2>;
6247

6348
/// Vector of four `isize` values
64-
pub type isizex4 = SimdIsize<4>;
49+
pub type isizex4 = Simd<isize, 4>;
6550

6651
/// Vector of eight `isize` values
67-
pub type isizex8 = SimdIsize<8>;
52+
pub type isizex8 = Simd<isize, 8>;
6853

6954
/// Vector of two `i16` values
70-
pub type i16x2 = SimdI16<2>;
55+
pub type i16x2 = Simd<i16, 2>;
7156

7257
/// Vector of four `i16` values
73-
pub type i16x4 = SimdI16<4>;
58+
pub type i16x4 = Simd<i16, 4>;
7459

7560
/// Vector of eight `i16` values
76-
pub type i16x8 = SimdI16<8>;
61+
pub type i16x8 = Simd<i16, 8>;
7762

7863
/// Vector of 16 `i16` values
79-
pub type i16x16 = SimdI16<16>;
64+
pub type i16x16 = Simd<i16, 16>;
8065

8166
/// Vector of 32 `i16` values
82-
pub type i16x32 = SimdI16<32>;
67+
pub type i16x32 = Simd<i16, 32>;
8368

8469
/// Vector of two `i32` values
85-
pub type i32x2 = SimdI32<2>;
70+
pub type i32x2 = Simd<i32, 2>;
8671

8772
/// Vector of four `i32` values
88-
pub type i32x4 = SimdI32<4>;
73+
pub type i32x4 = Simd<i32, 4>;
8974

9075
/// Vector of eight `i32` values
91-
pub type i32x8 = SimdI32<8>;
76+
pub type i32x8 = Simd<i32, 8>;
9277

9378
/// Vector of 16 `i32` values
94-
pub type i32x16 = SimdI32<16>;
79+
pub type i32x16 = Simd<i32, 16>;
9580

9681
/// Vector of two `i64` values
97-
pub type i64x2 = SimdI64<2>;
82+
pub type i64x2 = Simd<i64, 2>;
9883

9984
/// Vector of four `i64` values
100-
pub type i64x4 = SimdI64<4>;
85+
pub type i64x4 = Simd<i64, 4>;
10186

10287
/// Vector of eight `i64` values
103-
pub type i64x8 = SimdI64<8>;
88+
pub type i64x8 = Simd<i64, 8>;
10489

10590
/// Vector of four `i8` values
106-
pub type i8x4 = SimdI8<4>;
91+
pub type i8x4 = Simd<i8, 4>;
10792

10893
/// Vector of eight `i8` values
109-
pub type i8x8 = SimdI8<8>;
94+
pub type i8x8 = Simd<i8, 8>;
11095

11196
/// Vector of 16 `i8` values
112-
pub type i8x16 = SimdI8<16>;
97+
pub type i8x16 = Simd<i8, 16>;
11398

11499
/// Vector of 32 `i8` values
115-
pub type i8x32 = SimdI8<32>;
100+
pub type i8x32 = Simd<i8, 32>;
116101

117102
/// Vector of 64 `i8` values
118-
pub type i8x64 = SimdI8<64>;
103+
pub type i8x64 = Simd<i8, 64>;

crates/core_simd/src/vector/uint.rs

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,63 @@
11
#![allow(non_camel_case_types)]
22

3-
/// A SIMD vector of containing `LANES` `u8` values.
4-
pub type SimdU8<const LANES: usize> = crate::Simd<u8, LANES>;
5-
6-
/// A SIMD vector of containing `LANES` `u16` values.
7-
pub type SimdU16<const LANES: usize> = crate::Simd<u16, LANES>;
8-
9-
/// A SIMD vector of containing `LANES` `u32` values.
10-
pub type SimdU32<const LANES: usize> = crate::Simd<u32, LANES>;
11-
12-
/// A SIMD vector of containing `LANES` `u64` values.
13-
pub type SimdU64<const LANES: usize> = crate::Simd<u64, LANES>;
14-
15-
/// A SIMD vector of containing `LANES` `usize` values.
16-
pub type SimdUsize<const LANES: usize> = crate::Simd<usize, LANES>;
3+
use crate::Simd;
174

185
/// Vector of two `usize` values
19-
pub type usizex2 = SimdUsize<2>;
6+
pub type usizex2 = Simd<usize, 2>;
207

218
/// Vector of four `usize` values
22-
pub type usizex4 = SimdUsize<4>;
9+
pub type usizex4 = Simd<usize, 4>;
2310

2411
/// Vector of eight `usize` values
25-
pub type usizex8 = SimdUsize<8>;
12+
pub type usizex8 = Simd<usize, 8>;
2613

2714
/// Vector of two `u16` values
28-
pub type u16x2 = SimdU16<2>;
15+
pub type u16x2 = Simd<u16, 2>;
2916

3017
/// Vector of four `u16` values
31-
pub type u16x4 = SimdU16<4>;
18+
pub type u16x4 = Simd<u16, 4>;
3219

3320
/// Vector of eight `u16` values
34-
pub type u16x8 = SimdU16<8>;
21+
pub type u16x8 = Simd<u16, 8>;
3522

3623
/// Vector of 16 `u16` values
37-
pub type u16x16 = SimdU16<16>;
24+
pub type u16x16 = Simd<u16, 16>;
3825

3926
/// Vector of 32 `u16` values
40-
pub type u16x32 = SimdU16<32>;
27+
pub type u16x32 = Simd<u16, 32>;
4128

4229
/// Vector of two `u32` values
43-
pub type u32x2 = SimdU32<2>;
30+
pub type u32x2 = Simd<u32, 2>;
4431

4532
/// Vector of four `u32` values
46-
pub type u32x4 = SimdU32<4>;
33+
pub type u32x4 = Simd<u32, 4>;
4734

4835
/// Vector of eight `u32` values
49-
pub type u32x8 = SimdU32<8>;
36+
pub type u32x8 = Simd<u32, 8>;
5037

5138
/// Vector of 16 `u32` values
52-
pub type u32x16 = SimdU32<16>;
39+
pub type u32x16 = Simd<u32, 16>;
5340

5441
/// Vector of two `u64` values
55-
pub type u64x2 = SimdU64<2>;
42+
pub type u64x2 = Simd<u64, 2>;
5643

5744
/// Vector of four `u64` values
58-
pub type u64x4 = SimdU64<4>;
45+
pub type u64x4 = Simd<u64, 4>;
5946

6047
/// Vector of eight `u64` values
61-
pub type u64x8 = SimdU64<8>;
48+
pub type u64x8 = Simd<u64, 8>;
6249

6350
/// Vector of four `u8` values
64-
pub type u8x4 = SimdU8<4>;
51+
pub type u8x4 = Simd<u8, 4>;
6552

6653
/// Vector of eight `u8` values
67-
pub type u8x8 = SimdU8<8>;
54+
pub type u8x8 = Simd<u8, 8>;
6855

6956
/// Vector of 16 `u8` values
70-
pub type u8x16 = SimdU8<16>;
57+
pub type u8x16 = Simd<u8, 16>;
7158

7259
/// Vector of 32 `u8` values
73-
pub type u8x32 = SimdU8<32>;
60+
pub type u8x32 = Simd<u8, 32>;
7461

7562
/// Vector of 64 `u8` values
76-
pub type u8x64 = SimdU8<64>;
63+
pub type u8x64 = Simd<u8, 64>;

crates/core_simd/tests/round.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#![feature(portable_simd)]
22

33
macro_rules! float_rounding_test {
4-
{ $vector:ident, $scalar:tt, $int_scalar:tt } => {
4+
{ $scalar:tt, $int_scalar:tt } => {
55
mod $scalar {
6-
type Vector<const LANES: usize> = core_simd::$vector<LANES>;
6+
type Vector<const LANES: usize> = core_simd::Simd<$scalar, LANES>;
77
type Scalar = $scalar;
88
type IntScalar = $int_scalar;
99

@@ -88,5 +88,5 @@ macro_rules! float_rounding_test {
8888
}
8989
}
9090

91-
float_rounding_test! { SimdF32, f32, i32 }
92-
float_rounding_test! { SimdF64, f64, i64 }
91+
float_rounding_test! { f32, i32 }
92+
float_rounding_test! { f64, i64 }

0 commit comments

Comments
 (0)