@@ -112,7 +112,7 @@ where
112
112
T : SimdElement ,
113
113
{
114
114
/// Number of elements in this vector.
115
- pub const LANES : usize = N ;
115
+ pub const LEN : usize = N ;
116
116
117
117
/// Returns the number of elements in this SIMD vector.
118
118
///
@@ -122,11 +122,11 @@ where
122
122
/// # #![feature(portable_simd)]
123
123
/// # use core::simd::u32x4;
124
124
/// let v = u32x4::splat(0);
125
- /// assert_eq!(v.lanes (), 4);
125
+ /// assert_eq!(v.len (), 4);
126
126
/// ```
127
127
#[ inline]
128
- pub const fn lanes ( & self ) -> usize {
129
- Self :: LANES
128
+ pub const fn len ( & self ) -> usize {
129
+ Self :: LEN
130
130
}
131
131
132
132
/// Constructs a new SIMD vector with all elements set to the given value.
@@ -273,7 +273,7 @@ where
273
273
#[ track_caller]
274
274
pub const fn from_slice ( slice : & [ T ] ) -> Self {
275
275
assert ! (
276
- slice. len( ) >= Self :: LANES ,
276
+ slice. len( ) >= Self :: LEN ,
277
277
"slice length must be at least the number of elements"
278
278
) ;
279
279
// SAFETY: We just checked that the slice contains
@@ -303,7 +303,7 @@ where
303
303
#[ track_caller]
304
304
pub fn copy_to_slice ( self , slice : & mut [ T ] ) {
305
305
assert ! (
306
- slice. len( ) >= Self :: LANES ,
306
+ slice. len( ) >= Self :: LEN ,
307
307
"slice length must be at least the number of elements"
308
308
) ;
309
309
// SAFETY: We just checked that the slice contains
0 commit comments