@@ -47,23 +47,23 @@ macro_rules! simd_swizzle {
47
47
} => {
48
48
{
49
49
use $crate:: simd:: Swizzle ;
50
- struct SwizzleImpl ;
51
- impl <const LANES : usize > Swizzle <LANES , { $index. len( ) } > for SwizzleImpl {
50
+ struct Impl ;
51
+ impl <const LANES : usize > Swizzle <LANES , { $index. len( ) } > for Impl {
52
52
const INDEX : [ usize ; { $index. len( ) } ] = $index;
53
53
}
54
- SwizzleImpl :: swizzle( $vector)
54
+ Impl :: swizzle( $vector)
55
55
}
56
56
} ;
57
57
{
58
58
$first: expr, $second: expr, $index: expr $( , ) ?
59
59
} => {
60
60
{
61
61
use $crate:: simd:: { Which , Swizzle2 } ;
62
- struct SwizzleImpl ;
63
- impl <const LANES : usize > Swizzle2 <LANES , { $index. len( ) } > for SwizzleImpl {
62
+ struct Impl ;
63
+ impl <const LANES : usize > Swizzle2 <LANES , { $index. len( ) } > for Impl {
64
64
const INDEX : [ Which ; { $index. len( ) } ] = $index;
65
65
}
66
- SwizzleImpl :: swizzle2( $first, $second)
66
+ Impl :: swizzle2( $first, $second)
67
67
}
68
68
}
69
69
}
@@ -118,6 +118,7 @@ pub trait Swizzle2<const INPUT_LANES: usize, const OUTPUT_LANES: usize> {
118
118
}
119
119
120
120
/// The `simd_shuffle` intrinsic expects `u32`, so do error checking and conversion here.
121
+ /// This trait hides `INDEX_IMPL` from the public API.
121
122
trait SwizzleImpl < const INPUT_LANES : usize , const OUTPUT_LANES : usize > {
122
123
const INDEX_IMPL : [ u32 ; OUTPUT_LANES ] ;
123
124
}
@@ -142,6 +143,7 @@ where
142
143
}
143
144
144
145
/// The `simd_shuffle` intrinsic expects `u32`, so do error checking and conversion here.
146
+ /// This trait hides `INDEX_IMPL` from the public API.
145
147
trait Swizzle2Impl < const INPUT_LANES : usize , const OUTPUT_LANES : usize > {
146
148
const INDEX_IMPL : [ u32 ; OUTPUT_LANES ] ;
147
149
}
@@ -258,8 +260,6 @@ where
258
260
/// The second result contains the last `LANES / 2` lanes from `self` and `other`,
259
261
/// alternating, starting with the lane `LANES / 2` from the start of `self`.
260
262
///
261
- /// This particular permutation is efficient on many architectures.
262
- ///
263
263
/// ```
264
264
/// #![feature(portable_simd)]
265
265
/// # use core_simd::Simd;
@@ -322,8 +322,6 @@ where
322
322
/// The second result takes every other lane of `self` and then `other`, starting with
323
323
/// the second lane.
324
324
///
325
- /// This particular permutation is efficient on many architectures.
326
- ///
327
325
/// ```
328
326
/// #![feature(portable_simd)]
329
327
/// # use core_simd::Simd;
0 commit comments