Trait EmptyAPI

Source
pub trait EmptyAPI<Inp>: Sized {
    type Out;

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

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

Required Associated Types§

Required Methods§

Source

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

§Safety

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

Provided Methods§

Source

unsafe fn empty(self) -> Self::Out

§Safety

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

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.

Implementations on Foreign Types§

Source§

impl<T, D, B, L> EmptyAPI<(T, D)> for (L, &B)
where L: Into<Layout<D>>, 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<Self::Out>

Implementors§