Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Guarantee that as_slice_memory_order_mut preserves strides
This fixes bugs in `.map_mut()` and `.zip_mut_with_same_shape()`. Before this commit, strides obtained before calling `.as_slice_memory_order_mut()` could not be used to correctly interpret the data in the returned slice. Now, the strides are preserved, so the implementations of `.map_mut()` and `.zip_mut_with_same_shape()` work correctly. This also makes it much easier for users of the crate to use `.as_slice_memory_order_mut()` correctly in generic code. Fixes #1018.
- Loading branch information
1 parent
15b0808
commit 37645bd
Showing
3 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters