From a28e553fd25bfe001be5724b39621281c9bb8f78 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Tue, 1 Mar 2022 21:59:12 +0100 Subject: [PATCH] Rename Block SIMD functions for more clarity Because you could also do per-sample SIMD. For blocks that's simple enough to do without any help though. --- src/buffer.rs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/buffer.rs b/src/buffer.rs index 62f888a4..f1560568 100644 --- a/src/buffer.rs +++ b/src/buffer.rs @@ -483,7 +483,10 @@ impl<'slice, 'sample> Block<'slice, 'sample> { /// Returns a `None` value if `sample_index` is out of bounds. #[cfg(feature = "simd")] #[inline] - pub fn to_simd(&self, sample_index: usize) -> Option> + pub fn to_channel_simd( + &self, + sample_index: usize, + ) -> Option> where LaneCount: SupportedLaneCount, { @@ -512,7 +515,7 @@ impl<'slice, 'sample> Block<'slice, 'sample> { /// Undefined behavior if `LANES > block.len()` or if `sample_index > block.len()`. #[cfg(feature = "simd")] #[inline] - pub unsafe fn to_simd_unchecked( + pub unsafe fn to_channel_simd_unchecked( &self, sample_index: usize, ) -> Simd @@ -536,7 +539,7 @@ impl<'slice, 'sample> Block<'slice, 'sample> { #[cfg(feature = "simd")] #[allow(clippy::wrong_self_convention)] #[inline] - pub fn from_simd( + pub fn from_channel_simd( &mut self, sample_index: usize, vector: Simd, @@ -571,7 +574,7 @@ impl<'slice, 'sample> Block<'slice, 'sample> { #[cfg(feature = "simd")] #[allow(clippy::wrong_self_convention)] #[inline] - pub unsafe fn from_simd_unchecked( + pub unsafe fn from_channel_simd_unchecked( &mut self, sample_index: usize, vector: Simd,