Trait core_simd::simd::SimdElement

source ·
pub unsafe trait SimdElement: Sealed + Copy {
    type Mask: MaskElement;
}
🔬This is a nightly-only experimental API. (portable_simd)
Expand description

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§

source

type Mask: MaskElement

🔬This is a nightly-only experimental API. (portable_simd)

The mask element type corresponding to this element type.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl SimdElement for f32

source§

type Mask = i32

🔬This is a nightly-only experimental API. (portable_simd)
source§

impl SimdElement for f64

source§

type Mask = i64

🔬This is a nightly-only experimental API. (portable_simd)
source§

impl SimdElement for i8

source§

type Mask = i8

🔬This is a nightly-only experimental API. (portable_simd)
source§

impl SimdElement for i16

source§

type Mask = i16

🔬This is a nightly-only experimental API. (portable_simd)
source§

impl SimdElement for i32

source§

type Mask = i32

🔬This is a nightly-only experimental API. (portable_simd)
source§

impl SimdElement for i64

source§

type Mask = i64

🔬This is a nightly-only experimental API. (portable_simd)
source§

impl SimdElement for isize

source§

type Mask = isize

🔬This is a nightly-only experimental API. (portable_simd)
source§

impl SimdElement for u8

source§

type Mask = i8

🔬This is a nightly-only experimental API. (portable_simd)
source§

impl SimdElement for u16

source§

type Mask = i16

🔬This is a nightly-only experimental API. (portable_simd)
source§

impl SimdElement for u32

source§

type Mask = i32

🔬This is a nightly-only experimental API. (portable_simd)
source§

impl SimdElement for u64

source§

type Mask = i64

🔬This is a nightly-only experimental API. (portable_simd)
source§

impl SimdElement for usize

source§

type Mask = isize

🔬This is a nightly-only experimental API. (portable_simd)
source§

impl<T> SimdElement for *const T
where T: Pointee<Metadata = ()>,

source§

type Mask = isize

🔬This is a nightly-only experimental API. (portable_simd)
source§

impl<T> SimdElement for *mut T
where T: Pointee<Metadata = ()>,

source§

type Mask = isize

🔬This is a nightly-only experimental API. (portable_simd)

Implementors§