AsyncGpuOps

Trait AsyncGpuOps 

Source
pub trait AsyncGpuOps {
    // Required methods
    fn launch_async(
        &self,
        workgroups: [u32; 3],
        stream: &Arc<GpuStream>,
    ) -> Arc<GpuEvent>;
    fn copy_async<T: GpuDataType>(
        &self,
        src: &GpuBuffer<T>,
        dst: &GpuBuffer<T>,
        stream: &Arc<GpuStream>,
    ) -> Arc<GpuEvent>;
    fn copy_from_host_async<T: GpuDataType>(
        &self,
        src: &[T],
        dst: &GpuBuffer<T>,
        stream: &Arc<GpuStream>,
    ) -> Arc<GpuEvent>;
    fn copy_to_host_async<T: GpuDataType>(
        &self,
        src: &GpuBuffer<T>,
        dst: &mut [T],
        stream: &Arc<GpuStream>,
    ) -> Arc<GpuEvent>;
}
Expand description

Extension trait for adding async capabilities to GPU operations

Required Methods§

Source

fn launch_async( &self, workgroups: [u32; 3], stream: &Arc<GpuStream>, ) -> Arc<GpuEvent>

Launch a kernel asynchronously

Source

fn copy_async<T: GpuDataType>( &self, src: &GpuBuffer<T>, dst: &GpuBuffer<T>, stream: &Arc<GpuStream>, ) -> Arc<GpuEvent>

Copy data asynchronously

Source

fn copy_from_host_async<T: GpuDataType>( &self, src: &[T], dst: &GpuBuffer<T>, stream: &Arc<GpuStream>, ) -> Arc<GpuEvent>

Copy from host asynchronously

Source

fn copy_to_host_async<T: GpuDataType>( &self, src: &GpuBuffer<T>, dst: &mut [T], stream: &Arc<GpuStream>, ) -> Arc<GpuEvent>

Copy to host asynchronously

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§