From 0f837a9147a1ba22cfb12a4480ce1c18d3afc6b8 Mon Sep 17 00:00:00 2001 From: Caleb Zulawski Date: Tue, 22 Sep 2020 20:26:25 -0400 Subject: [PATCH] Add docs --- crates/core_simd/src/macros.rs | 37 +++++++++++++++------------- crates/core_simd/src/type_f32x16.rs | 5 +++- crates/core_simd/src/type_f32x2.rs | 5 +++- crates/core_simd/src/type_f32x4.rs | 5 +++- crates/core_simd/src/type_f32x8.rs | 5 +++- crates/core_simd/src/type_f64x2.rs | 5 +++- crates/core_simd/src/type_f64x4.rs | 5 +++- crates/core_simd/src/type_f64x8.rs | 5 +++- crates/core_simd/src/type_i128x2.rs | 5 +++- crates/core_simd/src/type_i128x4.rs | 5 +++- crates/core_simd/src/type_i16x16.rs | 5 +++- crates/core_simd/src/type_i16x2.rs | 5 +++- crates/core_simd/src/type_i16x32.rs | 5 +++- crates/core_simd/src/type_i16x4.rs | 5 +++- crates/core_simd/src/type_i16x8.rs | 5 +++- crates/core_simd/src/type_i32x16.rs | 5 +++- crates/core_simd/src/type_i32x2.rs | 5 +++- crates/core_simd/src/type_i32x4.rs | 5 +++- crates/core_simd/src/type_i32x8.rs | 5 +++- crates/core_simd/src/type_i64x2.rs | 5 +++- crates/core_simd/src/type_i64x4.rs | 5 +++- crates/core_simd/src/type_i64x8.rs | 5 +++- crates/core_simd/src/type_i8x16.rs | 5 +++- crates/core_simd/src/type_i8x2.rs | 5 +++- crates/core_simd/src/type_i8x32.rs | 5 +++- crates/core_simd/src/type_i8x4.rs | 5 +++- crates/core_simd/src/type_i8x64.rs | 5 +++- crates/core_simd/src/type_i8x8.rs | 5 +++- crates/core_simd/src/type_isizex2.rs | 5 +++- crates/core_simd/src/type_isizex4.rs | 5 +++- crates/core_simd/src/type_isizex8.rs | 5 +++- crates/core_simd/src/type_u128x2.rs | 5 +++- crates/core_simd/src/type_u128x4.rs | 5 +++- crates/core_simd/src/type_u16x16.rs | 5 +++- crates/core_simd/src/type_u16x2.rs | 5 +++- crates/core_simd/src/type_u16x32.rs | 5 +++- crates/core_simd/src/type_u16x4.rs | 5 +++- crates/core_simd/src/type_u16x8.rs | 5 +++- crates/core_simd/src/type_u32x16.rs | 5 +++- crates/core_simd/src/type_u32x2.rs | 5 +++- crates/core_simd/src/type_u32x4.rs | 5 +++- crates/core_simd/src/type_u32x8.rs | 5 +++- crates/core_simd/src/type_u64x2.rs | 5 +++- crates/core_simd/src/type_u64x4.rs | 5 +++- crates/core_simd/src/type_u64x8.rs | 5 +++- crates/core_simd/src/type_u8x16.rs | 5 +++- crates/core_simd/src/type_u8x2.rs | 5 +++- crates/core_simd/src/type_u8x32.rs | 5 +++- crates/core_simd/src/type_u8x4.rs | 5 +++- crates/core_simd/src/type_u8x64.rs | 5 +++- crates/core_simd/src/type_u8x8.rs | 5 +++- crates/core_simd/src/type_usizex2.rs | 5 +++- crates/core_simd/src/type_usizex4.rs | 5 +++- crates/core_simd/src/type_usizex8.rs | 5 +++- 54 files changed, 232 insertions(+), 70 deletions(-) diff --git a/crates/core_simd/src/macros.rs b/crates/core_simd/src/macros.rs index 70b19e5f4db..64d9c4b217f 100644 --- a/crates/core_simd/src/macros.rs +++ b/crates/core_simd/src/macros.rs @@ -28,8 +28,8 @@ macro_rules! from_unaligned { } macro_rules! define_type { - { struct $name:ident([$type:ty; $lanes:tt]); } => { - define_type! { @impl $name [$type; $lanes] } + { $(#[$attr:meta])* struct $name:ident([$type:ty; $lanes:tt]); } => { + define_type! { @impl $(#[$attr])* | $name [$type; $lanes] } // array references impl AsRef<[$type; $lanes]> for $name { @@ -74,40 +74,40 @@ macro_rules! define_type { } } }; - { @impl $name:ident [$type:ty; 1] } => { - define_type! { @impl $name | $type | $type, | v0, } + { @impl $(#[$attr:meta])* | $name:ident [$type:ty; 1] } => { + define_type! { @def $(#[$attr])* | $name | $type | $type, | v0, } }; - { @impl $name:ident [$type:ty; 2] } => { - define_type! { @impl $name | $type | $type, $type, | v0, v1, } + { @impl $(#[$attr:meta])* | $name:ident [$type:ty; 2] } => { + define_type! { @def $(#[$attr])* | $name | $type | $type, $type, | v0, v1, } }; - { @impl $name:ident [$type:ty; 4] } => { - define_type! { @impl $name | $type | + { @impl $(#[$attr:meta])* | $name:ident [$type:ty; 4] } => { + define_type! { @def $(#[$attr])* | $name | $type | $type, $type, $type, $type, | v0, v1, v2, v3, } }; - { @impl $name:ident [$type:ty; 8] } => { - define_type! { @impl $name | $type | + { @impl $(#[$attr:meta])* | $name:ident [$type:ty; 8] } => { + define_type! { @def $(#[$attr])* | $name | $type | $type, $type, $type, $type, $type, $type, $type, $type, | v0, v1, v2, v3, v4, v5, v6, v7, } }; - { @impl $name:ident [$type:ty; 16] } => { - define_type! { @impl $name | $type | + { @impl $(#[$attr:meta])* | $name:ident [$type:ty; 16] } => { + define_type! { @def $(#[$attr])* | $name | $type | $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, | v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, } }; - { @impl $name:ident [$type:ty; 32] } => { - define_type! { @impl $name | $type | + { @impl $(#[$attr:meta])* | $name:ident [$type:ty; 32] } => { + define_type! { @def $(#[$attr])* | $name | $type | $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, | v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, } }; - { @impl $name:ident [$type:ty; 64] } => { - define_type! { @impl $name | $type | + { @impl $(#[$attr:meta])* | $name:ident [$type:ty; 64] } => { + define_type! { @def $(#[$attr])* | $name | $type | $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, $type, @@ -118,18 +118,21 @@ macro_rules! define_type { v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63, } }; - { @impl $name:ident | $type:ty | $($itype:ty,)* | $($ivar:ident,)* } => { + { @def $(#[$attr:meta])* | $name:ident | $type:ty | $($itype:ty,)* | $($ivar:ident,)* } => { + $(#[$attr])* #[allow(non_camel_case_types)] #[derive(Copy, Clone, Debug, Default, PartialEq, PartialOrd)] #[repr(simd)] pub struct $name($($itype),*); impl $name { + /// Construct a vector by setting each lane to a single value. #[inline] pub fn splat(value: $type) -> Self { Self($(value as $itype),*) } + /// Construct a vector by setting each lane. #[allow(clippy::too_many_arguments)] #[inline] pub fn new($($ivar: $itype),*) -> Self { diff --git a/crates/core_simd/src/type_f32x16.rs b/crates/core_simd/src/type_f32x16.rs index f001b9c42df..45fb4a3175b 100644 --- a/crates/core_simd/src/type_f32x16.rs +++ b/crates/core_simd/src/type_f32x16.rs @@ -1,4 +1,7 @@ -define_type! { struct f32x16([f32; 16]); } +define_type! { + #[doc = "Vector of 16 `f32` types"] + struct f32x16([f32; 16]); +} /* #[cfg(target_arch = "x86")] diff --git a/crates/core_simd/src/type_f32x2.rs b/crates/core_simd/src/type_f32x2.rs index e6691523ea9..8b60a2ee76f 100644 --- a/crates/core_simd/src/type_f32x2.rs +++ b/crates/core_simd/src/type_f32x2.rs @@ -1 +1,4 @@ -define_type! { struct f32x2([f32; 2]); } +define_type! { + #[doc = "Vector of two `f32` types"] + struct f32x2([f32; 2]); +} diff --git a/crates/core_simd/src/type_f32x4.rs b/crates/core_simd/src/type_f32x4.rs index 4fd937425c5..452e607732c 100644 --- a/crates/core_simd/src/type_f32x4.rs +++ b/crates/core_simd/src/type_f32x4.rs @@ -1,4 +1,7 @@ -define_type! { struct f32x4([f32; 4]); } +define_type! { + #[doc = "Vector of four `f32` types"] + struct f32x4([f32; 4]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe f32x4 |bidirectional| core::arch::x86::__m128 } diff --git a/crates/core_simd/src/type_f32x8.rs b/crates/core_simd/src/type_f32x8.rs index a6754d490c1..790a546e4e7 100644 --- a/crates/core_simd/src/type_f32x8.rs +++ b/crates/core_simd/src/type_f32x8.rs @@ -1,4 +1,7 @@ -define_type! { struct f32x8([f32; 8]); } +define_type! { + #[doc = "Vector of eight `f32` types"] + struct f32x8([f32; 8]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe f32x8 |bidirectional| core::arch::x86::__m256 } diff --git a/crates/core_simd/src/type_f64x2.rs b/crates/core_simd/src/type_f64x2.rs index 227ef951434..0c349f38c86 100644 --- a/crates/core_simd/src/type_f64x2.rs +++ b/crates/core_simd/src/type_f64x2.rs @@ -1,4 +1,7 @@ -define_type! { struct f64x2([f64; 2]); } +define_type! { + #[doc = "Vector of two `f64` types"] + struct f64x2([f64; 2]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe f64x2 |bidirectional| core::arch::x86::__m128d } diff --git a/crates/core_simd/src/type_f64x4.rs b/crates/core_simd/src/type_f64x4.rs index 8e9debd8bfd..ec6b46bc8c8 100644 --- a/crates/core_simd/src/type_f64x4.rs +++ b/crates/core_simd/src/type_f64x4.rs @@ -1,4 +1,7 @@ -define_type! { struct f64x4([f64; 4]); } +define_type! { + #[doc = "Vector of four `f64` types"] + struct f64x4([f64; 4]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe f64x4 |bidirectional| core::arch::x86::__m256d } diff --git a/crates/core_simd/src/type_f64x8.rs b/crates/core_simd/src/type_f64x8.rs index 8aa3812b4f4..dd65dc6b39a 100644 --- a/crates/core_simd/src/type_f64x8.rs +++ b/crates/core_simd/src/type_f64x8.rs @@ -1,4 +1,7 @@ -define_type! { struct f64x8([f64; 8]); } +define_type! { + #[doc = "Vector of eight `f64` types"] + struct f64x8([f64; 8]); +} /* #[cfg(target_arch = "x86")] diff --git a/crates/core_simd/src/type_i128x2.rs b/crates/core_simd/src/type_i128x2.rs index cb1be5a9866..1ac736ddf3a 100644 --- a/crates/core_simd/src/type_i128x2.rs +++ b/crates/core_simd/src/type_i128x2.rs @@ -1,4 +1,7 @@ -define_type! { struct i128x2([i128; 2]); } +define_type! { + #[doc = "Vector of two `i128` types"] + struct i128x2([i128; 2]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe i128x2 |bidirectional| core::arch::x86::__m256i } diff --git a/crates/core_simd/src/type_i128x4.rs b/crates/core_simd/src/type_i128x4.rs index 8888d4205f8..6cef039d947 100644 --- a/crates/core_simd/src/type_i128x4.rs +++ b/crates/core_simd/src/type_i128x4.rs @@ -1,4 +1,7 @@ -define_type! { struct i128x4([i128; 4]); } +define_type! { + #[doc = "Vector of four `i128` types"] + struct i128x4([i128; 4]); +} /* #[cfg(target_arch = "x86")] diff --git a/crates/core_simd/src/type_i16x16.rs b/crates/core_simd/src/type_i16x16.rs index ec52c485776..1721286128f 100644 --- a/crates/core_simd/src/type_i16x16.rs +++ b/crates/core_simd/src/type_i16x16.rs @@ -1,4 +1,7 @@ -define_type! { struct i16x16([i16; 16]); } +define_type! { + #[doc = "Vector of 16 `i16` types"] + struct i16x16([i16; 16]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe i16x16 |bidirectional| core::arch::x86::__m256i } diff --git a/crates/core_simd/src/type_i16x2.rs b/crates/core_simd/src/type_i16x2.rs index 313ba334da1..7ccbbe7f2d0 100644 --- a/crates/core_simd/src/type_i16x2.rs +++ b/crates/core_simd/src/type_i16x2.rs @@ -1 +1,4 @@ -define_type! { struct i16x2([i16; 2]); } +define_type! { + #[doc = "Vector of two `i16` types"] + struct i16x2([i16; 2]); +} diff --git a/crates/core_simd/src/type_i16x32.rs b/crates/core_simd/src/type_i16x32.rs index 53679e2ac5c..349d094a1bc 100644 --- a/crates/core_simd/src/type_i16x32.rs +++ b/crates/core_simd/src/type_i16x32.rs @@ -1,4 +1,7 @@ -define_type! { struct i16x32([i16; 32]); } +define_type! { + #[doc = "Vector of 32 `i16` types"] + struct i16x32([i16; 32]); +} /* #[cfg(target_arch = "x86")] diff --git a/crates/core_simd/src/type_i16x4.rs b/crates/core_simd/src/type_i16x4.rs index f69f5dc2acd..348bc4c53a9 100644 --- a/crates/core_simd/src/type_i16x4.rs +++ b/crates/core_simd/src/type_i16x4.rs @@ -1 +1,4 @@ -define_type! { struct i16x4([i16; 4]); } +define_type! { + #[doc = "Vector of four `i16` types"] + struct i16x4([i16; 4]); +} diff --git a/crates/core_simd/src/type_i16x8.rs b/crates/core_simd/src/type_i16x8.rs index b1a3100dd6e..87ded0f3a49 100644 --- a/crates/core_simd/src/type_i16x8.rs +++ b/crates/core_simd/src/type_i16x8.rs @@ -1,4 +1,7 @@ -define_type! { struct i16x8([i16; 8]); } +define_type! { + #[doc = "Vector of eight `i16` types"] + struct i16x8([i16; 8]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe i16x8 |bidirectional| core::arch::x86::__m128i } diff --git a/crates/core_simd/src/type_i32x16.rs b/crates/core_simd/src/type_i32x16.rs index 5b7edb0f51b..7c52e9cb9e5 100644 --- a/crates/core_simd/src/type_i32x16.rs +++ b/crates/core_simd/src/type_i32x16.rs @@ -1,4 +1,7 @@ -define_type! { struct i32x16([i32; 16]); } +define_type! { + #[doc = "Vector of 16 `i32` types"] + struct i32x16([i32; 16]); +} /* #[cfg(target_arch = "x86")] diff --git a/crates/core_simd/src/type_i32x2.rs b/crates/core_simd/src/type_i32x2.rs index 425b6fd3bca..e9845ae75c7 100644 --- a/crates/core_simd/src/type_i32x2.rs +++ b/crates/core_simd/src/type_i32x2.rs @@ -1 +1,4 @@ -define_type! { struct i32x2([i32; 2]); } +define_type! { + #[doc = "Vector of two `i32` types"] + struct i32x2([i32; 2]); +} diff --git a/crates/core_simd/src/type_i32x4.rs b/crates/core_simd/src/type_i32x4.rs index d62fc385634..47374f7ce43 100644 --- a/crates/core_simd/src/type_i32x4.rs +++ b/crates/core_simd/src/type_i32x4.rs @@ -1,4 +1,7 @@ -define_type! { struct i32x4([i32; 4]); } +define_type! { + #[doc = "Vector of four `i32` types"] + struct i32x4([i32; 4]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe i32x4 |bidirectional| core::arch::x86::__m128i } diff --git a/crates/core_simd/src/type_i32x8.rs b/crates/core_simd/src/type_i32x8.rs index ee83854cee4..79b4ea180c3 100644 --- a/crates/core_simd/src/type_i32x8.rs +++ b/crates/core_simd/src/type_i32x8.rs @@ -1,4 +1,7 @@ -define_type! { struct i32x8([i32; 8]); } +define_type! { + #[doc = "Vector of eight `i32` types"] + struct i32x8([i32; 8]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe i32x8 |bidirectional| core::arch::x86::__m256i } diff --git a/crates/core_simd/src/type_i64x2.rs b/crates/core_simd/src/type_i64x2.rs index 35af990ec64..7268ad5dfbe 100644 --- a/crates/core_simd/src/type_i64x2.rs +++ b/crates/core_simd/src/type_i64x2.rs @@ -1,4 +1,7 @@ -define_type! { struct i64x2([i64; 2]); } +define_type! { + #[doc = "Vector of two `i64` types"] + struct i64x2([i64; 2]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe i64x2 |bidirectional| core::arch::x86::__m128i } diff --git a/crates/core_simd/src/type_i64x4.rs b/crates/core_simd/src/type_i64x4.rs index 6f69a492ede..3535783c300 100644 --- a/crates/core_simd/src/type_i64x4.rs +++ b/crates/core_simd/src/type_i64x4.rs @@ -1,4 +1,7 @@ -define_type! { struct i64x4([i64; 4]); } +define_type! { + #[doc = "Vector of four `i64` types"] + struct i64x4([i64; 4]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe i64x4 |bidirectional| core::arch::x86::__m256i } diff --git a/crates/core_simd/src/type_i64x8.rs b/crates/core_simd/src/type_i64x8.rs index 888c9b6612c..42d28db8c55 100644 --- a/crates/core_simd/src/type_i64x8.rs +++ b/crates/core_simd/src/type_i64x8.rs @@ -1,4 +1,7 @@ -define_type! { struct i64x8([i64; 8]); } +define_type! { + #[doc = "Vector of eight `i64` types"] + struct i64x8([i64; 8]); +} /* #[cfg(target_arch = "x86")] diff --git a/crates/core_simd/src/type_i8x16.rs b/crates/core_simd/src/type_i8x16.rs index 32ea4fa8293..d7aadd4d7ab 100644 --- a/crates/core_simd/src/type_i8x16.rs +++ b/crates/core_simd/src/type_i8x16.rs @@ -1,4 +1,7 @@ -define_type! { struct i8x16([i8; 16]); } +define_type! { + #[doc = "Vector of 16 `i8` types"] + struct i8x16([i8; 16]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe i8x16 |bidirectional| core::arch::x86::__m128i } diff --git a/crates/core_simd/src/type_i8x2.rs b/crates/core_simd/src/type_i8x2.rs index a36de2c5421..aca22993c2e 100644 --- a/crates/core_simd/src/type_i8x2.rs +++ b/crates/core_simd/src/type_i8x2.rs @@ -1 +1,4 @@ -define_type! { struct i8x2([i8; 2]); } +define_type! { + #[doc = "Vector of two `i8` types"] + struct i8x2([i8; 2]); +} diff --git a/crates/core_simd/src/type_i8x32.rs b/crates/core_simd/src/type_i8x32.rs index 874fcdd1e96..a323565c85c 100644 --- a/crates/core_simd/src/type_i8x32.rs +++ b/crates/core_simd/src/type_i8x32.rs @@ -1,4 +1,7 @@ -define_type! { struct i8x32([i8; 32]); } +define_type! { + #[doc = "Vector of 32 `i8` types"] + struct i8x32([i8; 32]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe i8x32 |bidirectional| core::arch::x86::__m256i } diff --git a/crates/core_simd/src/type_i8x4.rs b/crates/core_simd/src/type_i8x4.rs index 5be83d5e037..246703ebc50 100644 --- a/crates/core_simd/src/type_i8x4.rs +++ b/crates/core_simd/src/type_i8x4.rs @@ -1 +1,4 @@ -define_type! { struct i8x4([i8; 4]); } +define_type! { + #[doc = "Vector of four `i8` types"] + struct i8x4([i8; 4]); +} diff --git a/crates/core_simd/src/type_i8x64.rs b/crates/core_simd/src/type_i8x64.rs index d21baf12640..26934df2a48 100644 --- a/crates/core_simd/src/type_i8x64.rs +++ b/crates/core_simd/src/type_i8x64.rs @@ -1,4 +1,7 @@ -define_type! { struct i8x64([i8; 64]); } +define_type! { + #[doc = "Vector of 64 `i8` types"] + struct i8x64([i8; 64]); +} /* #[cfg(target_arch = "x86")] diff --git a/crates/core_simd/src/type_i8x8.rs b/crates/core_simd/src/type_i8x8.rs index f09a70f6cb9..bc30e2daf84 100644 --- a/crates/core_simd/src/type_i8x8.rs +++ b/crates/core_simd/src/type_i8x8.rs @@ -1 +1,4 @@ -define_type! { struct i8x8([i8; 8]); } +define_type! { + #[doc = "Vector of eight `i8` types"] + struct i8x8([i8; 8]); +} diff --git a/crates/core_simd/src/type_isizex2.rs b/crates/core_simd/src/type_isizex2.rs index aa3abaa8c4e..464f6495552 100644 --- a/crates/core_simd/src/type_isizex2.rs +++ b/crates/core_simd/src/type_isizex2.rs @@ -1,4 +1,7 @@ -define_type! { struct isizex2([isize; 2]); } +define_type! { + #[doc = "Vector of two `isize` types"] + struct isizex2([isize; 2]); +} #[cfg(all(target_arch = "x86", target_pointer_width = "64"))] from_aligned! { unsafe isizex2 |bidirectional| core::arch::x86::__m128i } diff --git a/crates/core_simd/src/type_isizex4.rs b/crates/core_simd/src/type_isizex4.rs index 2c0d7d33ba5..3be457393ec 100644 --- a/crates/core_simd/src/type_isizex4.rs +++ b/crates/core_simd/src/type_isizex4.rs @@ -1,4 +1,7 @@ -define_type! { struct isizex4([isize; 4]); } +define_type! { + #[doc = "Vector of four `isize` types"] + struct isizex4([isize; 4]); +} #[cfg(all(target_arch = "x86", target_pointer_width = "32"))] from_aligned! { unsafe isizex4 |bidirectional| core::arch::x86::__m128i } diff --git a/crates/core_simd/src/type_isizex8.rs b/crates/core_simd/src/type_isizex8.rs index cc2f9ad550f..e21c2cf624b 100644 --- a/crates/core_simd/src/type_isizex8.rs +++ b/crates/core_simd/src/type_isizex8.rs @@ -1,4 +1,7 @@ -define_type! { struct isizex8([isize; 8]); } +define_type! { + #[doc = "Vector of eight `isize` types"] + struct isizex8([isize; 8]); +} #[cfg(all(target_arch = "x86", target_pointer_width = "32"))] from_aligned! { unsafe isizex8 |bidirectional| core::arch::x86::__m256i } diff --git a/crates/core_simd/src/type_u128x2.rs b/crates/core_simd/src/type_u128x2.rs index cbed7589616..f448e4f0e62 100644 --- a/crates/core_simd/src/type_u128x2.rs +++ b/crates/core_simd/src/type_u128x2.rs @@ -1,4 +1,7 @@ -define_type! { struct u128x2([u128; 2]); } +define_type! { + #[doc = "Vector of two `u128` types"] + struct u128x2([u128; 2]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe u128x2 |bidirectional| core::arch::x86::__m256i } diff --git a/crates/core_simd/src/type_u128x4.rs b/crates/core_simd/src/type_u128x4.rs index 563689621ee..07466c72085 100644 --- a/crates/core_simd/src/type_u128x4.rs +++ b/crates/core_simd/src/type_u128x4.rs @@ -1,4 +1,7 @@ -define_type! { struct u128x4([u128; 4]); } +define_type! { + #[doc = "Vector of four `u128` types"] + struct u128x4([u128; 4]); +} /* #[cfg(target_arch = "x86")] diff --git a/crates/core_simd/src/type_u16x16.rs b/crates/core_simd/src/type_u16x16.rs index 50f39983b38..5460c3740ad 100644 --- a/crates/core_simd/src/type_u16x16.rs +++ b/crates/core_simd/src/type_u16x16.rs @@ -1,4 +1,7 @@ -define_type! { struct u16x16([u16; 16]); } +define_type! { + #[doc = "Vector of 16 `u16` types"] + struct u16x16([u16; 16]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe u16x16 |bidirectional| core::arch::x86::__m256i } diff --git a/crates/core_simd/src/type_u16x2.rs b/crates/core_simd/src/type_u16x2.rs index d0384e40f94..480be8b6eae 100644 --- a/crates/core_simd/src/type_u16x2.rs +++ b/crates/core_simd/src/type_u16x2.rs @@ -1 +1,4 @@ -define_type! { struct u16x2([u16; 2]); } +define_type! { + #[doc = "Vector of two `u16` types"] + struct u16x2([u16; 2]); +} diff --git a/crates/core_simd/src/type_u16x32.rs b/crates/core_simd/src/type_u16x32.rs index 29cf58581a9..67d60535f77 100644 --- a/crates/core_simd/src/type_u16x32.rs +++ b/crates/core_simd/src/type_u16x32.rs @@ -1,4 +1,7 @@ -define_type! { struct u16x32([u16; 32]); } +define_type! { + #[doc = "Vector of 32 `u16` types"] + struct u16x32([u16; 32]); +} /* #[cfg(target_arch = "x86")] diff --git a/crates/core_simd/src/type_u16x4.rs b/crates/core_simd/src/type_u16x4.rs index 0c4e3ed9b7d..874891363da 100644 --- a/crates/core_simd/src/type_u16x4.rs +++ b/crates/core_simd/src/type_u16x4.rs @@ -1 +1,4 @@ -define_type! { struct u16x4([u16; 4]); } +define_type! { + #[doc = "Vector of four `u16` types"] + struct u16x4([u16; 4]); +} diff --git a/crates/core_simd/src/type_u16x8.rs b/crates/core_simd/src/type_u16x8.rs index 69127996f7f..5ba0af151e3 100644 --- a/crates/core_simd/src/type_u16x8.rs +++ b/crates/core_simd/src/type_u16x8.rs @@ -1,4 +1,7 @@ -define_type! { struct u16x8([u16; 8]); } +define_type! { + #[doc = "Vector of eight `u16` types"] + struct u16x8([u16; 8]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe u16x8 |bidirectional| core::arch::x86::__m128i } diff --git a/crates/core_simd/src/type_u32x16.rs b/crates/core_simd/src/type_u32x16.rs index 1b8965685b8..40e557b2d6c 100644 --- a/crates/core_simd/src/type_u32x16.rs +++ b/crates/core_simd/src/type_u32x16.rs @@ -1,4 +1,7 @@ -define_type! { struct u32x16([u32; 16]); } +define_type! { + #[doc = "Vector of 16 `u32` types"] + struct u32x16([u32; 16]); +} /* #[cfg(target_arch = "x86")] diff --git a/crates/core_simd/src/type_u32x2.rs b/crates/core_simd/src/type_u32x2.rs index 8d9d5359525..001fd31db39 100644 --- a/crates/core_simd/src/type_u32x2.rs +++ b/crates/core_simd/src/type_u32x2.rs @@ -1 +1,4 @@ -define_type! { struct u32x2([u32; 2]); } +define_type! { + #[doc = "Vector of two `u32` types"] + struct u32x2([u32; 2]); +} diff --git a/crates/core_simd/src/type_u32x4.rs b/crates/core_simd/src/type_u32x4.rs index fc79dff0e5b..0582b51ead1 100644 --- a/crates/core_simd/src/type_u32x4.rs +++ b/crates/core_simd/src/type_u32x4.rs @@ -1,4 +1,7 @@ -define_type! { struct u32x4([u32; 4]); } +define_type! { + #[doc = "Vector of four `u32` types"] + struct u32x4([u32; 4]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe u32x4 |bidirectional| core::arch::x86::__m128i } diff --git a/crates/core_simd/src/type_u32x8.rs b/crates/core_simd/src/type_u32x8.rs index 727b87860c9..686833c250c 100644 --- a/crates/core_simd/src/type_u32x8.rs +++ b/crates/core_simd/src/type_u32x8.rs @@ -1,4 +1,7 @@ -define_type! { struct u32x8([u32; 8]); } +define_type! { + #[doc = "Vector of eight `u32` types"] + struct u32x8([u32; 8]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe u32x8 |bidirectional| core::arch::x86::__m256i } diff --git a/crates/core_simd/src/type_u64x2.rs b/crates/core_simd/src/type_u64x2.rs index 729982f7735..e3ba3dc03b5 100644 --- a/crates/core_simd/src/type_u64x2.rs +++ b/crates/core_simd/src/type_u64x2.rs @@ -1,4 +1,7 @@ -define_type! { struct u64x2([u64; 2]); } +define_type! { + #[doc = "Vector of two `u64` types"] + struct u64x2([u64; 2]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe u64x2 |bidirectional| core::arch::x86::__m128i } diff --git a/crates/core_simd/src/type_u64x4.rs b/crates/core_simd/src/type_u64x4.rs index 7e1aa973381..005f26012ad 100644 --- a/crates/core_simd/src/type_u64x4.rs +++ b/crates/core_simd/src/type_u64x4.rs @@ -1,4 +1,7 @@ -define_type! { struct u64x4([u64; 4]); } +define_type! { + #[doc = "Vector of four `u64` types"] + struct u64x4([u64; 4]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe u64x4 |bidirectional| core::arch::x86::__m256i } diff --git a/crates/core_simd/src/type_u64x8.rs b/crates/core_simd/src/type_u64x8.rs index ed0769d1311..fbb41f36e5d 100644 --- a/crates/core_simd/src/type_u64x8.rs +++ b/crates/core_simd/src/type_u64x8.rs @@ -1,4 +1,7 @@ -define_type! { struct u64x8([u64; 8]); } +define_type! { + #[doc = "Vector of eight `u64` types"] + struct u64x8([u64; 8]); +} /* #[cfg(target_arch = "x86")] diff --git a/crates/core_simd/src/type_u8x16.rs b/crates/core_simd/src/type_u8x16.rs index 69d788ef2b6..a44b74c122b 100644 --- a/crates/core_simd/src/type_u8x16.rs +++ b/crates/core_simd/src/type_u8x16.rs @@ -1,4 +1,7 @@ -define_type! { struct u8x16([u8; 16]); } +define_type! { + #[doc = "Vector of 16 `u8` types"] + struct u8x16([u8; 16]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe u8x16 |bidirectional| core::arch::x86::__m128i } diff --git a/crates/core_simd/src/type_u8x2.rs b/crates/core_simd/src/type_u8x2.rs index 5ab66878b82..c6162cc73a2 100644 --- a/crates/core_simd/src/type_u8x2.rs +++ b/crates/core_simd/src/type_u8x2.rs @@ -1 +1,4 @@ -define_type! { struct u8x2([u8; 2]); } +define_type! { + #[doc = "Vector of two `u8` types"] + struct u8x2([u8; 2]); +} diff --git a/crates/core_simd/src/type_u8x32.rs b/crates/core_simd/src/type_u8x32.rs index 102724684cb..012286846db 100644 --- a/crates/core_simd/src/type_u8x32.rs +++ b/crates/core_simd/src/type_u8x32.rs @@ -1,4 +1,7 @@ -define_type! { struct u8x32([u8; 32]); } +define_type! { + #[doc = "Vector of 32 `u8` types"] + struct u8x32([u8; 32]); +} #[cfg(target_arch = "x86")] from_aligned! { unsafe u8x32 |bidirectional| core::arch::x86::__m256i } diff --git a/crates/core_simd/src/type_u8x4.rs b/crates/core_simd/src/type_u8x4.rs index 648d12b9e2d..ecdffa11993 100644 --- a/crates/core_simd/src/type_u8x4.rs +++ b/crates/core_simd/src/type_u8x4.rs @@ -1 +1,4 @@ -define_type! { struct u8x4([u8; 4]); } +define_type! { + #[doc = "Vector of four `u8` types"] + struct u8x4([u8; 4]); +} diff --git a/crates/core_simd/src/type_u8x64.rs b/crates/core_simd/src/type_u8x64.rs index 1e2967d485a..6f05f086a64 100644 --- a/crates/core_simd/src/type_u8x64.rs +++ b/crates/core_simd/src/type_u8x64.rs @@ -1,4 +1,7 @@ -define_type! { struct u8x64([u8; 64]); } +define_type! { + #[doc = "Vector of 64 `u8` types"] + struct u8x64([u8; 64]); +} /* #[cfg(target_arch = "x86")] diff --git a/crates/core_simd/src/type_u8x8.rs b/crates/core_simd/src/type_u8x8.rs index aa62e04ddf2..7810ac743f8 100644 --- a/crates/core_simd/src/type_u8x8.rs +++ b/crates/core_simd/src/type_u8x8.rs @@ -1 +1,4 @@ -define_type! { struct u8x8([u8; 8]); } +define_type! { + #[doc = "Vector of eight `u8` types"] + struct u8x8([u8; 8]); +} diff --git a/crates/core_simd/src/type_usizex2.rs b/crates/core_simd/src/type_usizex2.rs index 083cd499a07..218d5a1056e 100644 --- a/crates/core_simd/src/type_usizex2.rs +++ b/crates/core_simd/src/type_usizex2.rs @@ -1,4 +1,7 @@ -define_type! { struct usizex2([usize; 2]); } +define_type! { + #[doc = "Vector of two `usize` types"] + struct usizex2([usize; 2]); +} #[cfg(all(target_arch = "x86", target_pointer_width = "64"))] from_aligned! { unsafe usizex2 |bidirectional| core::arch::x86::__m128i } diff --git a/crates/core_simd/src/type_usizex4.rs b/crates/core_simd/src/type_usizex4.rs index 3301039a05a..60160ecc217 100644 --- a/crates/core_simd/src/type_usizex4.rs +++ b/crates/core_simd/src/type_usizex4.rs @@ -1,4 +1,7 @@ -define_type! { struct usizex4([usize; 4]); } +define_type! { + #[doc = "Vector of four `usize` types"] + struct usizex4([usize; 4]); +} #[cfg(all(target_arch = "x86", target_pointer_width = "32"))] from_aligned! { unsafe usizex4 |bidirectional| core::arch::x86::__m128i } diff --git a/crates/core_simd/src/type_usizex8.rs b/crates/core_simd/src/type_usizex8.rs index e21b1ea6b7a..5f5a445f430 100644 --- a/crates/core_simd/src/type_usizex8.rs +++ b/crates/core_simd/src/type_usizex8.rs @@ -1,4 +1,7 @@ -define_type! { struct usizex8([usize; 8]); } +define_type! { + #[doc = "Vector of eight `usize` types"] + struct usizex8([usize; 8]); +} #[cfg(all(target_arch = "x86", target_pointer_width = "32"))] from_aligned! { unsafe usizex8 |bidirectional| core::arch::x86::__m256i }