On this page
Trait std::simd::SimdElement
pub unsafe trait SimdElement: Sealed + Copy {
type Mask: MaskElement;
}
🔬This is a nightly-only experimental API. (
portable_simd
#86656)
Marker trait for types that may be used as SIMD vector elements.
Safety
This trait, when implemented, asserts the compiler can monomorphize #[repr(simd)]
structs with the marked type as an element. Strictly, it is valid to impl if the vector will not be miscompiled. Practically, it is user-unfriendly to impl it if the vector won’t compile, even when no soundness guarantees are broken by allowing the user to try.
Required Associated Types
type Mask: MaskElement
🔬This is a nightly-only experimental API. (
portable_simd
#86656)
The mask element type corresponding to this element type.
Object Safety
This trait is not object safe.
Implementors
impl SimdElement for f32
type Mask = i32
impl SimdElement for f64
type Mask = i64
impl SimdElement for i8
type Mask = i8
impl SimdElement for i16
type Mask = i16
impl SimdElement for i32
type Mask = i32
impl SimdElement for i64
type Mask = i64
impl SimdElement for isize
type Mask = isize
impl SimdElement for u8
type Mask = i8
impl SimdElement for u16
type Mask = i16
impl SimdElement for u32
type Mask = i32
impl SimdElement for u64
type Mask = i64
impl SimdElement for usize
type Mask = isize
impl<T> SimdElement for *const T
where
T: Pointee<Metadata = ()>,
type Mask = isize
impl<T> SimdElement for *mut T
where
T: Pointee<Metadata = ()>,
type Mask = isize
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/simd/trait.SimdElement.html