diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2021-12-02 18:04:33 -0800 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2021-12-02 18:14:37 -0800 |
| commit | 92c8317d2ae45a86b632b24996cd29a30d0dc3ce (patch) | |
| tree | bedcfc1d0be8f146cf69e48eccea475b42275acf /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | ff23ad3179014ba258f2b540fb39dd0f26852b7a (diff) | |
| download | rust-92c8317d2ae45a86b632b24996cd29a30d0dc3ce.tar.gz rust-92c8317d2ae45a86b632b24996cd29a30d0dc3ce.zip | |
Add `[T]::as_simd(_mut)`
SIMD-style optimizations are the most common use for `[T]::align_to(_mut)`, but that's `unsafe`. So these are *safe* wrappers around it, now that we have the `Simd` type available, to make it easier to use.
```rust
impl [T] {
pub fn as_simd<const LANES: usize>(&self) -> (&[T], &[Simd<T, LANES>], &[T]);
pub fn as_simd_mut<const LANES: usize>(&mut self) -> (&mut [T], &mut [Simd<T, LANES>], &mut [T]);
}
```
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
