Skip to content

Commit 4e14017

Browse files
committed
Standardize documentation for SIMD vector and mask types
1 parent 0711e11 commit 4e14017

File tree

4 files changed

+65
-65
lines changed

4 files changed

+65
-65
lines changed

crates/core_simd/src/masks.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -507,58 +507,58 @@ where
507507
}
508508
}
509509

510-
/// Vector of eight 8-bit masks
510+
/// A 64-bit SIMD vector mask for eight elements of 8 bits.
511511
pub type mask8x8 = Mask<i8, 8>;
512512

513-
/// Vector of 16 8-bit masks
513+
/// A 128-bit SIMD vector mask for 16 elements of 8 bits.
514514
pub type mask8x16 = Mask<i8, 16>;
515515

516-
/// Vector of 32 8-bit masks
516+
/// A 256-bit SIMD vector mask for 32 elements of 8 bits.
517517
pub type mask8x32 = Mask<i8, 32>;
518518

519-
/// Vector of 16 8-bit masks
519+
/// A 512-bit SIMD vector mask for 64 elements of 8 bits.
520520
pub type mask8x64 = Mask<i8, 64>;
521521

522-
/// Vector of four 16-bit masks
522+
/// A 64-bit SIMD vector mask for four elements of 16 bits.
523523
pub type mask16x4 = Mask<i16, 4>;
524524

525-
/// Vector of eight 16-bit masks
525+
/// A 128-bit SIMD vector mask for eight elements of 16 bits.
526526
pub type mask16x8 = Mask<i16, 8>;
527527

528-
/// Vector of 16 16-bit masks
528+
/// A 256-bit SIMD vector mask for 16 elements of 16 bits.
529529
pub type mask16x16 = Mask<i16, 16>;
530530

531-
/// Vector of 32 16-bit masks
531+
/// A 512-bit SIMD vector mask for 32 elements of 16 bits.
532532
pub type mask16x32 = Mask<i16, 32>;
533533

534-
/// Vector of two 32-bit masks
534+
/// A 64-bit SIMD vector mask for two elements of 32 bits.
535535
pub type mask32x2 = Mask<i32, 2>;
536536

537-
/// Vector of four 32-bit masks
537+
/// A 128-bit SIMD vector mask for four elements of 32 bits.
538538
pub type mask32x4 = Mask<i32, 4>;
539539

540-
/// Vector of eight 32-bit masks
540+
/// A 256-bit SIMD vector mask for eight elements of 32 bits.
541541
pub type mask32x8 = Mask<i32, 8>;
542542

543-
/// Vector of 16 32-bit masks
543+
/// A 512-bit SIMD vector mask for 16 elements of 32 bits.
544544
pub type mask32x16 = Mask<i32, 16>;
545545

546-
/// Vector of two 64-bit masks
546+
/// A 128-bit SIMD vector mask for two elements of 64 bits.
547547
pub type mask64x2 = Mask<i64, 2>;
548548

549-
/// Vector of four 64-bit masks
549+
/// A 256-bit SIMD vector mask for four elements of 64 bits.
550550
pub type mask64x4 = Mask<i64, 4>;
551551

552-
/// Vector of eight 64-bit masks
552+
/// A 512-bit SIMD vector mask for eight elements of 64 bits.
553553
pub type mask64x8 = Mask<i64, 8>;
554554

555-
/// Vector of two pointer-width masks
555+
/// A SIMD vector mask for two elements of pointer width.
556556
pub type masksizex2 = Mask<isize, 2>;
557557

558-
/// Vector of four pointer-width masks
558+
/// A SIMD vector mask for four elements of pointer width.
559559
pub type masksizex4 = Mask<isize, 4>;
560560

561-
/// Vector of eight pointer-width masks
561+
/// A SIMD vector mask for eight elements of pointer width.
562562
pub type masksizex8 = Mask<isize, 8>;
563563

564564
macro_rules! impl_from {

crates/core_simd/src/vector/float.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,23 +177,23 @@ macro_rules! impl_float_vector {
177177
impl_float_vector! { f32, u32, i32 }
178178
impl_float_vector! { f64, u64, i64 }
179179

180-
/// Vector of two `f32` values
180+
/// A 64-bit SIMD vector with two elements of type `f32`.
181181
pub type f32x2 = Simd<f32, 2>;
182182

183-
/// Vector of four `f32` values
183+
/// A 128-bit SIMD vector with four elements of type `f32`.
184184
pub type f32x4 = Simd<f32, 4>;
185185

186-
/// Vector of eight `f32` values
186+
/// A 256-bit SIMD vector with eight elements of type `f32`.
187187
pub type f32x8 = Simd<f32, 8>;
188188

189-
/// Vector of 16 `f32` values
189+
/// A 512-bit SIMD vector with 16 elements of type `f32`.
190190
pub type f32x16 = Simd<f32, 16>;
191191

192-
/// Vector of two `f64` values
192+
/// A 128-bit SIMD vector with two elements of type `f64`.
193193
pub type f64x2 = Simd<f64, 2>;
194194

195-
/// Vector of four `f64` values
195+
/// A 256-bit SIMD vector with four elements of type `f64`.
196196
pub type f64x4 = Simd<f64, 4>;
197197

198-
/// Vector of eight `f64` values
198+
/// A 512-bit SIMD vector with eight elements of type `f64`.
199199
pub type f64x8 = Simd<f64, 8>;

crates/core_simd/src/vector/int.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -42,62 +42,62 @@ impl_integer_vector! { i32 }
4242
impl_integer_vector! { i64 }
4343
impl_integer_vector! { i8 }
4444

45-
/// Vector of two `isize` values
45+
/// A SIMD vector with two elements of type `isize`.
4646
pub type isizex2 = Simd<isize, 2>;
4747

48-
/// Vector of four `isize` values
48+
/// A SIMD vector with four elements of type `isize`.
4949
pub type isizex4 = Simd<isize, 4>;
5050

51-
/// Vector of eight `isize` values
51+
/// A SIMD vector with eight elements of type `isize`.
5252
pub type isizex8 = Simd<isize, 8>;
5353

54-
/// Vector of two `i16` values
54+
/// A 32-bit SIMD vector with two elements of type `i16`.
5555
pub type i16x2 = Simd<i16, 2>;
5656

57-
/// Vector of four `i16` values
57+
/// A 64-bit SIMD vector with four elements of type `i16`.
5858
pub type i16x4 = Simd<i16, 4>;
5959

60-
/// Vector of eight `i16` values
60+
/// A 128-bit SIMD vector with eight elements of type `i16`.
6161
pub type i16x8 = Simd<i16, 8>;
6262

63-
/// Vector of 16 `i16` values
63+
/// A 256-bit SIMD vector with 16 elements of type `i16`.
6464
pub type i16x16 = Simd<i16, 16>;
6565

66-
/// Vector of 32 `i16` values
66+
/// A 512-bit SIMD vector with 32 elements of type `i16`.
6767
pub type i16x32 = Simd<i16, 32>;
6868

69-
/// Vector of two `i32` values
69+
/// A 64-bit SIMD vector with two elements of type `i32`.
7070
pub type i32x2 = Simd<i32, 2>;
7171

72-
/// Vector of four `i32` values
72+
/// A 128-bit SIMD vector with four elements of type `i32`.
7373
pub type i32x4 = Simd<i32, 4>;
7474

75-
/// Vector of eight `i32` values
75+
/// A 256-bit SIMD vector with eight elements of type `i32`.
7676
pub type i32x8 = Simd<i32, 8>;
7777

78-
/// Vector of 16 `i32` values
78+
/// A 512-bit SIMD vector with 16 elements of type `i32`.
7979
pub type i32x16 = Simd<i32, 16>;
8080

81-
/// Vector of two `i64` values
81+
/// A 128-bit SIMD vector with two elements of type `i64`.
8282
pub type i64x2 = Simd<i64, 2>;
8383

84-
/// Vector of four `i64` values
84+
/// A 256-bit SIMD vector with four elements of type `i64`.
8585
pub type i64x4 = Simd<i64, 4>;
8686

87-
/// Vector of eight `i64` values
87+
/// A 512-bit SIMD vector with eight elements of type `i64`.
8888
pub type i64x8 = Simd<i64, 8>;
8989

90-
/// Vector of four `i8` values
90+
/// A 32-bit SIMD vector with four elements of type `i8`.
9191
pub type i8x4 = Simd<i8, 4>;
9292

93-
/// Vector of eight `i8` values
93+
/// A 64-bit SIMD vector with eight elements of type `i8`.
9494
pub type i8x8 = Simd<i8, 8>;
9595

96-
/// Vector of 16 `i8` values
96+
/// A 128-bit SIMD vector with 16 elements of type `i8`.
9797
pub type i8x16 = Simd<i8, 16>;
9898

99-
/// Vector of 32 `i8` values
99+
/// A 256-bit SIMD vector with 32 elements of type `i8`.
100100
pub type i8x32 = Simd<i8, 32>;
101101

102-
/// Vector of 64 `i8` values
102+
/// A 512-bit SIMD vector with 64 elements of type `i8`.
103103
pub type i8x64 = Simd<i8, 64>;

crates/core_simd/src/vector/uint.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,62 +2,62 @@
22

33
use crate::simd::Simd;
44

5-
/// Vector of two `usize` values
5+
/// A SIMD vector with two elements of type `usize`.
66
pub type usizex2 = Simd<usize, 2>;
77

8-
/// Vector of four `usize` values
8+
/// A SIMD vector with four elements of type `usize`.
99
pub type usizex4 = Simd<usize, 4>;
1010

11-
/// Vector of eight `usize` values
11+
/// A SIMD vector with eight elements of type `usize`.
1212
pub type usizex8 = Simd<usize, 8>;
1313

14-
/// Vector of two `u16` values
14+
/// A 32-bit SIMD vector with two elements of type `u16`.
1515
pub type u16x2 = Simd<u16, 2>;
1616

17-
/// Vector of four `u16` values
17+
/// A 64-bit SIMD vector with four elements of type `u16`.
1818
pub type u16x4 = Simd<u16, 4>;
1919

20-
/// Vector of eight `u16` values
20+
/// A 128-bit SIMD vector with eight elements of type `u16`.
2121
pub type u16x8 = Simd<u16, 8>;
2222

23-
/// Vector of 16 `u16` values
23+
/// A 256-bit SIMD vector with 16 elements of type `u16`.
2424
pub type u16x16 = Simd<u16, 16>;
2525

26-
/// Vector of 32 `u16` values
26+
/// A 512-bit SIMD vector with 32 elements of type `u16`.
2727
pub type u16x32 = Simd<u16, 32>;
2828

29-
/// Vector of two `u32` values
29+
/// A 64-bit SIMD vector with two elements of type `u32`.
3030
pub type u32x2 = Simd<u32, 2>;
3131

32-
/// Vector of four `u32` values
32+
/// A 128-bit SIMD vector with four elements of type `u32`.
3333
pub type u32x4 = Simd<u32, 4>;
3434

35-
/// Vector of eight `u32` values
35+
/// A 256-bit SIMD vector with eight elements of type `u32`.
3636
pub type u32x8 = Simd<u32, 8>;
3737

38-
/// Vector of 16 `u32` values
38+
/// A 512-bit SIMD vector with 16 elements of type `u32`.
3939
pub type u32x16 = Simd<u32, 16>;
4040

41-
/// Vector of two `u64` values
41+
/// A 128-bit SIMD vector with two elements of type `u64`.
4242
pub type u64x2 = Simd<u64, 2>;
4343

44-
/// Vector of four `u64` values
44+
/// A 256-bit SIMD vector with four elements of type `u64`.
4545
pub type u64x4 = Simd<u64, 4>;
4646

47-
/// Vector of eight `u64` values
47+
/// A 512-bit SIMD vector with eight elements of type `u64`.
4848
pub type u64x8 = Simd<u64, 8>;
4949

50-
/// Vector of four `u8` values
50+
/// A 32-bit SIMD vector with four elements of type `u8`.
5151
pub type u8x4 = Simd<u8, 4>;
5252

53-
/// Vector of eight `u8` values
53+
/// A 64-bit SIMD vector with eight elements of type `u8`.
5454
pub type u8x8 = Simd<u8, 8>;
5555

56-
/// Vector of 16 `u8` values
56+
/// A 128-bit SIMD vector with 16 elements of type `u8`.
5757
pub type u8x16 = Simd<u8, 16>;
5858

59-
/// Vector of 32 `u8` values
59+
/// A 256-bit SIMD vector with 32 elements of type `u8`.
6060
pub type u8x32 = Simd<u8, 32>;
6161

62-
/// Vector of 64 `u8` values
62+
/// A 512-bit SIMD vector with 64 elements of type `u8`.
6363
pub type u8x64 = Simd<u8, 64>;

0 commit comments

Comments
 (0)