mlir::ir

Trait Shape

Source
pub trait Shape {
    // Required methods
    fn rank(&self) -> isize;
    fn get(&self, i: isize) -> i64;

    // Provided methods
    fn to_vec(&self) -> Vec<i64> { ... }
    fn to_vec_transpose(&self) -> Vec<i64> { ... }
    fn unpack(&self) -> ShapeUnpacked { ... }
    fn unpack_transpose(&self) -> ShapeUnpacked { ... }
}

Required Methods§

Source

fn rank(&self) -> isize

Source

fn get(&self, i: isize) -> i64

Provided Methods§

Trait Implementations§

Source§

impl PartialEq for dyn Shape

Source§

fn eq(&self, rhs: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Implementors§