-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Labels
EnhancementNew feature or requestNew feature or request
Description
There is an LLVM patch under review (https://reviews.llvm.org/D59180) that adds portable support for masked compressed loads and masked expand stores via llvm.masked.compressstore
and llvm.masked.expandload
.
We should add two APIs to vector masks:
impl<T, const N: usize> Simd<[T; N]>
where Simd<[T; N]>: Mask
{
/// Writes the lanes of `value` for which `self` is `true` to
/// adjacent memory locations at `ptr`.
unsafe fn write_compressed<U>(self, value: Simd<[U; N]>, ptr: *mut U);
/// Reads adjacent `U` values at `ptr` into the result's vector
/// lanes for which `self` is `true`, using the values of `defaults`
/// otherwise.
unsafe fn read_expanded<U>(self, defaults: Simd<[U; N]>, ptr: *const U) -> Simd<[U; N]>;
}
Metadata
Metadata
Assignees
Labels
EnhancementNew feature or requestNew feature or request