pub struct FixedBuffer<T, const SIZE: usize> { /* private fields */ }Expand description
Fixed-size buffer on the stack — default per-port buffer.
16-byte aligned for direct SIMD loads/stores via _mm_load_ps / _mm256_load_ps.
Implementations§
Source§impl<T: Scalar, const SIZE: usize> FixedBuffer<T, SIZE>
impl<T: Scalar, const SIZE: usize> FixedBuffer<T, SIZE>
Sourcepub fn from_array(data: [T; SIZE]) -> Self
pub fn from_array(data: [T; SIZE]) -> Self
Create a buffer from a fixed-size array.
Sourcepub fn from_slice(slice: &[T]) -> Self
pub fn from_slice(slice: &[T]) -> Self
Create a buffer from a slice, truncating or padding with T::default() as needed.
Sourcepub fn as_mut_array(&mut self) -> &mut [T; SIZE]
pub fn as_mut_array(&mut self) -> &mut [T; SIZE]
Return a mutable reference to the inner array.
Trait Implementations§
Source§impl<T: Scalar, const SIZE: usize> Buffer<T> for FixedBuffer<T, SIZE>
impl<T: Scalar, const SIZE: usize> Buffer<T> for FixedBuffer<T, SIZE>
Source§fn as_mut_slice(&mut self) -> &mut [T]
fn as_mut_slice(&mut self) -> &mut [T]
Mutable access to the buffer data.
Source§fn copy_from(&mut self, src: &[T])
fn copy_from(&mut self, src: &[T])
Copy data from a slice. Copies
min(src.len(), self.len()) samples.Source§fn stats(&self) -> BufferStats
fn stats(&self) -> BufferStats
Snapshot of performance statistics.
Source§fn reset_stats(&mut self)
fn reset_stats(&mut self)
Reset performance counters (not the data).
Source§impl<T: Clone, const SIZE: usize> Clone for FixedBuffer<T, SIZE>
impl<T: Clone, const SIZE: usize> Clone for FixedBuffer<T, SIZE>
Source§fn clone(&self) -> FixedBuffer<T, SIZE>
fn clone(&self) -> FixedBuffer<T, SIZE>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T, const SIZE: usize> Freeze for FixedBuffer<T, SIZE>where
T: Freeze,
impl<T, const SIZE: usize> RefUnwindSafe for FixedBuffer<T, SIZE>where
T: RefUnwindSafe,
impl<T, const SIZE: usize> Send for FixedBuffer<T, SIZE>where
T: Send,
impl<T, const SIZE: usize> Sync for FixedBuffer<T, SIZE>where
T: Sync,
impl<T, const SIZE: usize> Unpin for FixedBuffer<T, SIZE>where
T: Unpin,
impl<T, const SIZE: usize> UnsafeUnpin for FixedBuffer<T, SIZE>where
T: UnsafeUnpin,
impl<T, const SIZE: usize> UnwindSafe for FixedBuffer<T, SIZE>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more