- Added
widthandheightmethods toVolGrid2d.
- New:
VolGrid2d<T,R,W, WIDTH, HEIGHT>works like video memory (accessed with(x,y)) - New
VolGrid2dStrided<T,R,W, WIDTH, HEIGHT, FRAMES, BYTE_STRIDE>has many "frames" ofVolGrid2d, each offset by the given stride in bytes. The stride can be larger, equal to, or smaller than the number of bytes per frame. - New:
VolRegion<T,R,W>is a 1d span with a dynamic size, like a slice. - Removed: the "experimental" cargo features were removed from Cargo.toml.
If you had opted-in to using them you will have to adjust your
[dependencies]entry.
- Fixed up unclear documentation.
- Soundness: Previous versions of the iterators in
this crate (since 0.4) had a math error in the
nthmethod, causing them to potentially go out of bounds.
- The
SafeandUnsafetypes now also deriveDefault,Clone, andCopy. This doesn't do too much since they're already ZSTs with a public constructor, but it doesn't hurt. VolAddress: Added const fnas_ptrandas_mut_ptr.VolBlock: Added const fnas_usize,as_ptr,as_mut_ptr, and non-const fnas_slice_ptrandas_slice_mut_ptr.- It turns out that getting the pointer to a
VolBlockby indexing to the 0th element and then turning that into a usize and then turning that into a pointer was enough layers to confuse LLVM. Specifically, all volatile accesses have an "aligned and non-null" debug check, which wasn't getting optimized out of debug builds withbuild-std, even withopt-level=3. Providing these more direct conversion methods does seem to help LLVM eliminate that non-null check more often. - Added
core::fmt::Pointerimpls. WhileDebugformats the address along with extra metadata,Pointerjust formats the address.
-
Added
VolAddress::as_volblockfor (unsafely) converting from aVolAddressto an array into aVolBlock. This is totally fine in any case I've ever seen, but the general policy of the crate is that any creation of aVolBlockbe an unsafe action, and so this is unsafe for consistency. -
Also adds the
experimental_volmatrixcargo feature, which adds another opt-in type for people to experiment with.
- Temporarily adds the
experimental_volregionfeature, allowing a person to experimentally opt-in to theVolRegiontype. This type will be part of a 1.1 release of the crate at some point. This feature is not part of the crate's SemVer, and it will go away entirely onceVolRegionbecomes a stable part of the crate.
- Initial stable release.