EmptyLikeAPI

Trait EmptyLikeAPI 

Source
pub trait EmptyLikeAPI<Inp> {
    type Out;

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

    // 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>

§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 (&TensorAny<R, T, B, D>, TensorIterOrder)
where R: DataAPI<Data = B::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<Self::Out>

Source§

impl<R, T, B, D> EmptyLikeAPI<()> for (&TensorAny<R, T, B, D>, TensorIterOrder, &B)
where R: DataAPI<Data = B::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<Self::Out>

Source§

impl<R, T, B, D> EmptyLikeAPI<()> for (&TensorAny<R, T, B, D>, &B)
where R: DataAPI<Data = B::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<Self::Out>

Implementors§

Source§

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

Source§

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