candle_core::cpu_backend

Trait Map2U8

Source
pub trait Map2U8 {
    const OP: &'static str;

    // Required method
    fn f<T: WithDType>(
        &self,
        v1: &[T],
        l1: &Layout,
        v2: &[T],
        l2: &Layout,
    ) -> Result<Vec<u8>>;

    // Provided method
    fn map(
        &self,
        v1: &CpuStorage,
        l1: &Layout,
        v2: &CpuStorage,
        l2: &Layout,
    ) -> Result<CpuStorage> { ... }
}

Required Associated Constants§

Source

const OP: &'static str

Required Methods§

Source

fn f<T: WithDType>( &self, v1: &[T], l1: &Layout, v2: &[T], l2: &Layout, ) -> Result<Vec<u8>>

Provided Methods§

Source

fn map( &self, v1: &CpuStorage, l1: &Layout, v2: &CpuStorage, l2: &Layout, ) -> Result<CpuStorage>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§