candle_core::shape

Trait Dim

Source
pub trait Dim {
    // Required methods
    fn to_index(&self, shape: &Shape, op: &'static str) -> Result<usize>;
    fn to_index_plus_one(
        &self,
        shape: &Shape,
        op: &'static str,
    ) -> Result<usize>;
}

Required Methods§

Source

fn to_index(&self, shape: &Shape, op: &'static str) -> Result<usize>

Source

fn to_index_plus_one(&self, shape: &Shape, op: &'static str) -> Result<usize>

Implementations on Foreign Types§

Source§

impl Dim for usize

Source§

fn to_index(&self, shape: &Shape, op: &'static str) -> Result<usize>

Source§

fn to_index_plus_one(&self, shape: &Shape, op: &'static str) -> Result<usize>

Implementors§

Source§

impl Dim for D