Skip to main content

Module array

Module array 

Source
Expand description

CUDA arrays + texture / surface objects.

A Array is an opaque on-device layout optimized for texture fetches and surface loads/stores. Host↔Array copies go through the 2-D memcpy path (see crate::memcpy2d), with CUmemorytype::ARRAY on whichever side the array sits on.

Texture and surface objects are created from an array (or a pitched device pointer, for linear textures). This module exposes the modern “object” API (CUDA 5+); the legacy reference-based API is not wrapped.

Structs§

Array
A 2-D CUDA array. Element format is chosen at creation; channels are typically 1, 2, or 4.
SurfaceObject
A surface object — a read/write view onto a CUDA array.
TextureDesc
Configuration for TextureObject::new.
TextureObject
A texture object — a read-only, filtered view onto a CUDA array.

Enums§

ArrayFormat
Element format shorthand for common single-channel arrays. Build a multi-channel descriptor by passing a CUarray_format constant and a channel count directly to Array::new.
TextureAddressMode
TextureFilterMode