Skip to main content

Module array

Module array 

Source
Expand description

CUDA arrays + texture / surface objects (Runtime API).

Mirrors [baracuda_driver::array]. An Array is an opaque on-device layout optimized for texture fetches. TextureObject / SurfaceObject wrap the CUDA 5+ object-based texture API; the legacy reference-based API is intentionally not wrapped.

Structs§

Array
A 2-D / 3-D CUDA array handle.
MipmappedArray
A mipmapped CUDA array.
SurfaceObject
A surface object — writable array access from kernels.
TextureObject
A texture object — a read-only sampler bound to an array (or linear device memory). Pass as_raw() as a u64 kernel argument.

Functions§

channel_desc
Construct a cudaChannelFormatDesc with 1/2/4 channels of bits bits of the given kind (matches the cudaCreateChannelDesc<T>() helpers in CUDA headers).
channel_desc_f32
cudaCreateChannelDesc<f32> — one 32-bit float channel.
channel_desc_u8
cudaCreateChannelDesc<u8> — one 8-bit unsigned channel.