GpuSendable

Trait GpuSendable 

Source
pub trait GpuSendable {
    type GpuRepr;

    // Provided methods
    fn upload(self, _ctx: &GpuContextHandle) -> Result<Self::GpuRepr, GpuError>
       where Self: Sized { ... }
    fn download(
        _gpu: &Self::GpuRepr,
        _ctx: &GpuContextHandle,
    ) -> Result<Self, GpuError>
       where Self: Sized { ... }
}
Expand description

Opt-in bridge to allow CPU types to participate in GPU segments. Users implement this for their own types to describe how to upload/download.

Required Associated Types§

Provided Methods§

Source

fn upload(self, _ctx: &GpuContextHandle) -> Result<Self::GpuRepr, GpuError>
where Self: Sized,

Upload CPU data to a GPU representation.

Source

fn download( _gpu: &Self::GpuRepr, _ctx: &GpuContextHandle, ) -> Result<Self, GpuError>
where Self: Sized,

Download a GPU representation back to CPU data.

Implementations on Foreign Types§

Source§

impl GpuSendable for DynamicImage

Source§

impl GpuSendable for GrayImage

Source§

impl GpuSendable for RgbImage

Source§

impl GpuSendable for RgbaImage

Implementors§