diff options
Diffstat (limited to 'library/portable-simd/crates/core_simd/src/iter.rs')
-rw-r--r-- | library/portable-simd/crates/core_simd/src/iter.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/portable-simd/crates/core_simd/src/iter.rs b/library/portable-simd/crates/core_simd/src/iter.rs index 3275b4db8..328c995b8 100644 --- a/library/portable-simd/crates/core_simd/src/iter.rs +++ b/library/portable-simd/crates/core_simd/src/iter.rs @@ -10,6 +10,7 @@ macro_rules! impl_traits { where LaneCount<LANES>: SupportedLaneCount, { + #[inline] fn sum<I: Iterator<Item = Self>>(iter: I) -> Self { iter.fold(Simd::splat(0 as $type), Add::add) } @@ -19,6 +20,7 @@ macro_rules! impl_traits { where LaneCount<LANES>: SupportedLaneCount, { + #[inline] fn product<I: Iterator<Item = Self>>(iter: I) -> Self { iter.fold(Simd::splat(1 as $type), Mul::mul) } @@ -28,6 +30,7 @@ macro_rules! impl_traits { where LaneCount<LANES>: SupportedLaneCount, { + #[inline] fn sum<I: Iterator<Item = &'a Self>>(iter: I) -> Self { iter.fold(Simd::splat(0 as $type), Add::add) } @@ -37,6 +40,7 @@ macro_rules! impl_traits { where LaneCount<LANES>: SupportedLaneCount, { + #[inline] fn product<I: Iterator<Item = &'a Self>>(iter: I) -> Self { iter.fold(Simd::splat(1 as $type), Mul::mul) } |