DeviceCreationAnyAPI

Trait DeviceCreationAnyAPI 

Source
pub trait DeviceCreationAnyAPI<T>: DeviceRawAPI<T> {
    // Required methods
    unsafe fn empty_impl(
        &self,
        len: usize,
    ) -> Result<Storage<DataOwned<Self::Raw>, T, Self>, Error>;
    fn full_impl(
        &self,
        len: usize,
        fill: T,
    ) -> Result<Storage<DataOwned<Self::Raw>, T, Self>, Error>
       where T: Clone;
    fn outof_cpu_vec(
        &self,
        vec: Vec<T>,
    ) -> Result<Storage<DataOwned<Self::Raw>, T, Self>, Error>;
    fn from_cpu_vec(
        &self,
        vec: &[T],
    ) -> Result<Storage<DataOwned<Self::Raw>, T, Self>, Error>
       where T: Clone;
}

Required Methods§

Source

unsafe fn empty_impl( &self, len: usize, ) -> Result<Storage<DataOwned<Self::Raw>, T, Self>, Error>

§Safety

This function is unsafe because it does not initialize the memory.

Source

fn full_impl( &self, len: usize, fill: T, ) -> Result<Storage<DataOwned<Self::Raw>, T, Self>, Error>
where T: Clone,

Source

fn outof_cpu_vec( &self, vec: Vec<T>, ) -> Result<Storage<DataOwned<Self::Raw>, T, Self>, Error>

Source

fn from_cpu_vec( &self, vec: &[T], ) -> Result<Storage<DataOwned<Self::Raw>, T, Self>, Error>
where T: Clone,

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§