Skip to main content

ScalarOrVectorRes

Trait ScalarOrVectorRes 

Source
pub trait ScalarOrVectorRes<T: Type, const N: usize>: Op {
    // Provided methods
    fn scalar_or_vector_elem_ty(&self, ctx: &Context) -> TypedHandle<T> { ... }
    fn vector_shape(&self, ctx: &Context) -> Option<(u32, VectorTypeKind)> { ... }
}
Expand description

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

Provided Methods§

Source

fn scalar_or_vector_elem_ty(&self, ctx: &Context) -> TypedHandle<T>

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<T: Type, const N: usize> OpInterfaceMarker for dyn ScalarOrVectorRes<T, N>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl ScalarOrVectorRes<IntegerType, 0> for FCmpOp

Source§

impl ScalarOrVectorRes<IntegerType, 0> for FPToSIOp

Source§

impl ScalarOrVectorRes<IntegerType, 0> for FPToUIOp

Source§

impl ScalarOrVectorRes<IntegerType, 0> for ICmpOp

Source§

impl ScalarOrVectorRes<IntegerType, 0> for SExtOp

Source§

impl ScalarOrVectorRes<IntegerType, 0> for TruncOp

Source§

impl ScalarOrVectorRes<IntegerType, 0> for ZExtOp