Skip to main content

cuSurfObjectCreate

Function cuSurfObjectCreate 

Source
pub unsafe extern "C" fn cuSurfObjectCreate(
    pSurfObject: *mut CUsurfObject,
    pResDesc: *const CUDA_RESOURCE_DESC,
) -> CUresult
Expand description

Creates a surface object.

Creates a surface object and returns it in pSurfObject. pResDesc describes the data to perform surface load/stores on. CUDA_RESOURCE_DESC::resType must be CUresourcetype_enum::CU_RESOURCE_TYPE_ARRAY and CUDA_RESOURCE_DESC::res::array::hArray must be set to a valid CUDA array handle. CUDA_RESOURCE_DESC::flags must be set to zero.

Surface objects are only supported on devices of compute capability 3.0 or higher. Additionally, a surface object is an opaque value, and, as such, should only be accessed through CUDA API calls.

§Parameters

  • pSurfObject: Surface object to create.
  • pResDesc: Resource descriptor.

§Return value

See also: cuSurfObjectDestroy, cudaCreateSurfaceObject.