EmptyLikeAPI

Trait EmptyLikeAPI 

Source
pub trait EmptyLikeAPI<Inp> {
    type Out;

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

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

Required Associated Types§

Required Methods§

Source

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

§Safety

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

Provided Methods§

Source

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

§Safety

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

Implementations on Foreign Types§

Source§

impl<R, T, B, D> EmptyLikeAPI<()> for (&TensorBase<Storage<R, T, B>, D>, TensorIterOrder)
where R: DataAPI<Data = <B as DeviceRawAPI<T>>::Raw>, D: DimAPI, B: DeviceAPI<T> + DeviceCreationAnyAPI<T>,

Source§

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

Source§

unsafe fn empty_like_f( self, ) -> Result<<(&TensorBase<Storage<R, T, B>, D>, TensorIterOrder) as EmptyLikeAPI<()>>::Out, Error>

Source§

impl<R, T, B, D> EmptyLikeAPI<()> for (&TensorBase<Storage<R, T, B>, D>, TensorIterOrder, &B)
where R: DataAPI<Data = <B as DeviceRawAPI<T>>::Raw>, D: DimAPI, B: DeviceAPI<T> + DeviceCreationAnyAPI<T>,

Source§

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

Source§

unsafe fn empty_like_f( self, ) -> Result<<(&TensorBase<Storage<R, T, B>, D>, TensorIterOrder, &B) as EmptyLikeAPI<()>>::Out, Error>

Source§

impl<R, T, B, D> EmptyLikeAPI<()> for (&TensorBase<Storage<R, T, B>, D>, &B)
where R: DataAPI<Data = <B as DeviceRawAPI<T>>::Raw>, D: DimAPI, B: DeviceAPI<T> + DeviceCreationAnyAPI<T>,

Source§

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

Source§

unsafe fn empty_like_f( self, ) -> Result<<(&TensorBase<Storage<R, T, B>, D>, &B) as EmptyLikeAPI<()>>::Out, Error>

Implementors§

Source§

impl<R, T, B, D> EmptyLikeAPI<()> for &TensorBase<Storage<R, T, B>, D>
where R: DataAPI<Data = <B as DeviceRawAPI<T>>::Raw>, D: DimAPI, B: DeviceAPI<T> + DeviceCreationAnyAPI<T>,

Source§

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