Skip to main content

ScalarOrVectorResImpls

Trait ScalarOrVectorResImpls 

Source
pub trait ScalarOrVectorResImpls<I: ?Sized + TypeInterfaceMarker + 'static, const N: usize>: Op {
    // Provided methods
    fn scalar_or_vector_elem_ty(&self, ctx: &Context) -> TypeInterfaceHandle<I> { ... }
    fn vector_shape(&self, ctx: &Context) -> Option<(u32, VectorTypeKind)> { ... }
}
Expand description

A result whose type either impls I or is VectorType<T: I>.

Provided Methods§

Source

fn scalar_or_vector_elem_ty(&self, ctx: &Context) -> TypeInterfaceHandle<I>

Get the type of result N, or its element type if its VectorType.

Source

fn vector_shape(&self, ctx: &Context) -> Option<(u32, VectorTypeKind)>

Get the vector shape of result N, or None if it is not a VectorType.

Trait Implementations§

Source§

impl<I: ?Sized + TypeInterfaceMarker + 'static, const N: usize> OpInterfaceMarker for dyn ScalarOrVectorResImpls<I, N>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl ScalarOrVectorResImpls<dyn FloatTypeInterface, 0> for FPExtOp

Source§

impl ScalarOrVectorResImpls<dyn FloatTypeInterface, 0> for FPTruncOp

Source§

impl ScalarOrVectorResImpls<dyn FloatTypeInterface, 0> for SIToFPOp

Source§

impl ScalarOrVectorResImpls<dyn FloatTypeInterface, 0> for UIToFPOp