1
+ use crate :: { LaneCount , SupportedLaneCount } ;
2
+
1
3
macro_rules! impl_traits {
2
4
{ $type: ident } => {
3
5
impl <const LANES : usize > core:: iter:: Sum <Self > for crate :: $type<LANES >
4
6
where
5
- Self : crate :: Vector ,
7
+ LaneCount < LANES > : SupportedLaneCount ,
6
8
{
7
9
fn sum<I : core:: iter:: Iterator <Item = Self >>( iter: I ) -> Self {
8
10
iter. fold( Default :: default ( ) , core:: ops:: Add :: add)
@@ -11,7 +13,7 @@ macro_rules! impl_traits {
11
13
12
14
impl <const LANES : usize > core:: iter:: Product <Self > for crate :: $type<LANES >
13
15
where
14
- Self : crate :: Vector ,
16
+ LaneCount < LANES > : SupportedLaneCount ,
15
17
{
16
18
fn product<I : core:: iter:: Iterator <Item = Self >>( iter: I ) -> Self {
17
19
iter. fold( Default :: default ( ) , core:: ops:: Mul :: mul)
@@ -20,7 +22,7 @@ macro_rules! impl_traits {
20
22
21
23
impl <' a, const LANES : usize > core:: iter:: Sum <& ' a Self > for crate :: $type<LANES >
22
24
where
23
- Self : crate :: Vector ,
25
+ LaneCount < LANES > : SupportedLaneCount ,
24
26
{
25
27
fn sum<I : core:: iter:: Iterator <Item = & ' a Self >>( iter: I ) -> Self {
26
28
iter. fold( Default :: default ( ) , core:: ops:: Add :: add)
@@ -29,7 +31,7 @@ macro_rules! impl_traits {
29
31
30
32
impl <' a, const LANES : usize > core:: iter:: Product <& ' a Self > for crate :: $type<LANES >
31
33
where
32
- Self : crate :: Vector ,
34
+ LaneCount < LANES > : SupportedLaneCount ,
33
35
{
34
36
fn product<I : core:: iter:: Iterator <Item = & ' a Self >>( iter: I ) -> Self {
35
37
iter. fold( Default :: default ( ) , core:: ops:: Mul :: mul)
0 commit comments