We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b506e3e + ec05dfb commit 436ca7fCopy full SHA for 436ca7f
crates/core_simd/src/vector.rs
@@ -24,6 +24,14 @@ where
24
LaneCount<LANES>: SupportedLaneCount,
25
T: SimdElement,
26
{
27
+ /// Number of lanes in this vector.
28
+ pub const LANES: usize = LANES;
29
+
30
+ /// Get the number of lanes in this vector.
31
+ pub const fn lanes(&self) -> usize {
32
+ LANES
33
+ }
34
35
/// Construct a SIMD vector by setting all lanes to the given value.
36
pub const fn splat(value: T) -> Self {
37
Self([value; LANES])
0 commit comments