Skip to main content

SizedType

Trait SizedType 

Source
pub trait SizedType: Type + AlignedType {
    // Required method
    fn size(&self, ctx: &Context) -> usize;

    // Provided methods
    fn verify(_op: &dyn Type, _ctx: &Context) -> Result<()>
       where Self: Sized { ... }
    fn size_bits(&self, ctx: &Context) -> usize { ... }
}

Required Methods§

Source

fn size(&self, ctx: &Context) -> usize

Provided Methods§

Source

fn verify(_op: &dyn Type, _ctx: &Context) -> Result<()>
where Self: Sized,

Source

fn size_bits(&self, ctx: &Context) -> usize

Trait Implementations§

Source§

impl TypeImplsInterface<dyn SizedType> for BarrierType

Source§

impl TypeImplsInterface<dyn SizedType> for BarrierTokenType

Source§

impl TypeImplsInterface<dyn SizedType> for TensorMapType

Source§

impl TypeImplsInterface<dyn SizedType> for IntegerType

Source§

impl TypeImplsInterface<dyn SizedType> for IndexType

Source§

impl TypeImplsInterface<dyn SizedType> for Complex32Type

Source§

impl TypeImplsInterface<dyn SizedType> for Complex64Type

Source§

impl TypeImplsInterface<dyn SizedType> for Float64Type

Source§

impl TypeImplsInterface<dyn SizedType> for Float32Type

Source§

impl TypeImplsInterface<dyn SizedType> for TFloat32Type

Source§

impl TypeImplsInterface<dyn SizedType> for FloatFlex32Type

Source§

impl TypeImplsInterface<dyn SizedType> for Float16Type

Source§

impl TypeImplsInterface<dyn SizedType> for BFloat16Type

Source§

impl TypeImplsInterface<dyn SizedType> for Float8E8M0Type

Source§

impl TypeImplsInterface<dyn SizedType> for Float8E5M2Type

Source§

impl TypeImplsInterface<dyn SizedType> for Float8E4M3Type

Source§

impl TypeImplsInterface<dyn SizedType> for Float6E3M2Type

Source§

impl TypeImplsInterface<dyn SizedType> for Float6E2M3Type

Source§

impl TypeImplsInterface<dyn SizedType> for Float4E2M1Type

Source§

impl TypeImplsInterface<dyn SizedType> for Float4E2M1x2Type

Source§

impl TypeImplsInterface<dyn SizedType> for VectorType

Source§

impl TypeImplsInterface<dyn SizedType> for AtomicType

Source§

impl TypeImplsInterface<dyn SizedType> for PointerType

Source§

impl TypeImplsInterface<dyn SizedType> for ArrayType

Source§

impl TypeInterfaceMarker for dyn SizedType

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl SizedType for IntegerType

Source§

fn size(&self, _ctx: &Context) -> usize

Implementors§