Skip to content

Commit

Permalink
as_view_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
termoshtt committed Jun 20, 2020
1 parent c9e46a9 commit 4f803b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fftw/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ impl<T> AlignedVec<T> {
{
ArrayView::from_shape(shape, self.as_slice())
}

pub fn as_view_mut<D, Shape>(&mut self, shape: Shape) -> Result<ArrayViewMut<T, D>, ShapeError>
where
D: Dimension,
Shape: Into<StrideShape<D>>,
{
ArrayViewMut::from_shape(shape, self.as_slice_mut())
}
}

impl<T> Deref for AlignedVec<T> {
Expand Down

0 comments on commit 4f803b8

Please sign in to comment.