Skip to main content

Reinterpret

Trait Reinterpret 

Source
pub trait Reinterpret: CubePrimitive {
    // Provided methods
    fn reinterpret<From: CubePrimitive>(value: From) -> Self { ... }
    fn reinterpret_vectorization<From: CubePrimitive>() -> usize { ... }
    fn __expand_reinterpret<From: CubePrimitive>(
        scope: &mut Scope,
        value: NativeExpand<From>,
    ) -> <Self as CubeType>::ExpandType { ... }
    fn __expand_reinterpret_vectorization<From: CubePrimitive>(
        scope: &mut Scope,
    ) -> usize { ... }
}
Expand description

Enables reinterpetring the bits from any value to any other type of the same size.

Provided Methods§

Source

fn reinterpret<From: CubePrimitive>(value: From) -> Self

Reinterpret the bits of another primitive as this primitive without conversion.

Source

fn reinterpret_vectorization<From: CubePrimitive>() -> usize

Calculates the expected vectorization for the reinterpret target

Source

fn __expand_reinterpret<From: CubePrimitive>( scope: &mut Scope, value: NativeExpand<From>, ) -> <Self as CubeType>::ExpandType

Source

fn __expand_reinterpret_vectorization<From: CubePrimitive>( scope: &mut Scope, ) -> usize

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§