EmptyAPI

Trait EmptyAPI 

Source
pub trait EmptyAPI<Inp> {
    type Out;

    // Required method
    unsafe fn empty_f(self) -> Result<Self::Out, Error>;

    // Provided method
    unsafe fn empty(self) -> Self::Out
       where Self: Sized { ... }
}

Required Associated Types§

Required Methods§

Source

unsafe fn empty_f(self) -> Result<Self::Out, Error>

§Safety

This function is unsafe because it creates a tensor with uninitialized.

Provided Methods§

Source

unsafe fn empty(self) -> Self::Out
where Self: Sized,

§Safety

This function is unsafe because it creates a tensor with uninitialized.

Implementations on Foreign Types§

Source§

impl<T, D> EmptyAPI<(T, D)> for (D, FlagOrder)
where D: DimAPI,

Source§

impl<T, D, B> EmptyAPI<(T, D)> for (Layout<D>, &B)
where D: DimAPI, B: DeviceAPI<T> + DeviceCreationAnyAPI<T>,

Source§

type Out = TensorBase<Storage<DataOwned<<B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>

Source§

unsafe fn empty_f( self, ) -> Result<<(Layout<D>, &B) as EmptyAPI<(T, D)>>::Out, Error>

Source§

impl<T, D, B> EmptyAPI<(T, D)> for (D, FlagOrder, &B)
where D: DimAPI, B: DeviceAPI<T> + DeviceCreationAnyAPI<T>,

Source§

type Out = TensorBase<Storage<DataOwned<<B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>

Source§

unsafe fn empty_f( self, ) -> Result<<(D, FlagOrder, &B) as EmptyAPI<(T, D)>>::Out, Error>

Source§

impl<T, D, B> EmptyAPI<(T, D)> for (D, &B)
where D: DimAPI, B: DeviceAPI<T> + DeviceCreationAnyAPI<T>,

Source§

type Out = TensorBase<Storage<DataOwned<<B as DeviceRawAPI<T>>::Raw>, T, B>, Vec<usize>>

Source§

unsafe fn empty_f(self) -> Result<<(D, &B) as EmptyAPI<(T, D)>>::Out, Error>

Implementors§