pub type GpuBox<T, A = GpuAlloc> = Box<T, A>;Expand description
A Box allocated on the GPU, also accessible from the CPU.
§Example
// This integer is allocated in GPU memory,
// so fast to access on the GPU and slow to access on the CPU.
let gpu_int = GpuBox::new(42);Aliased Type§
pub struct GpuBox<T, A = GpuAlloc>(/* private fields */);Trait Implementations§
Source§impl<'a, T: SafeKernelArg<Output = T>> SafeKernelArg for &'a GpuBox<T>
Available on neither AMD GPU nor NVidia GPU.
impl<'a, T: SafeKernelArg<Output = T>> SafeKernelArg for &'a GpuBox<T>
Available on neither AMD GPU nor NVidia GPU.
Source§fn into_kernel_arg(self, _: &LaunchConfig) -> Self::Output
fn into_kernel_arg(self, _: &LaunchConfig) -> Self::Output
Convert into the actual GPU argument. Read more
Source§impl<'a, T: SafeKernelArg<Output = T>> SafeKernelArg for &'a GpuBox<[T]>
Available on neither AMD GPU nor NVidia GPU.
impl<'a, T: SafeKernelArg<Output = T>> SafeKernelArg for &'a GpuBox<[T]>
Available on neither AMD GPU nor NVidia GPU.
Source§fn into_kernel_arg(self, _: &LaunchConfig) -> Self::Output
fn into_kernel_arg(self, _: &LaunchConfig) -> Self::Output
Convert into the actual GPU argument. Read more
Source§impl<'a, T: SafeKernelArg<Output = T>> SafeKernelArg for &'a mut GpuBox<[T]>
Available on neither AMD GPU nor NVidia GPU.
impl<'a, T: SafeKernelArg<Output = T>> SafeKernelArg for &'a mut GpuBox<[T]>
Available on neither AMD GPU nor NVidia GPU.
Source§type Output = ThreadIndexedSlice<'a, T>
type Output = ThreadIndexedSlice<'a, T>
The type that is passed to the GPU.
Source§fn into_kernel_arg(
self,
launch_config: &LaunchConfig,
) -> ThreadIndexedSlice<'a, T>
fn into_kernel_arg( self, launch_config: &LaunchConfig, ) -> ThreadIndexedSlice<'a, T>
Convert into the actual GPU argument. Read more