CUDA Runtime API (PDF) - CUDA Toolkit v5.5 (older) - Last updated May 11, 2013 - Send Feedback

2.23. Surface Object Management

This section describes the low level texture object management functions of the CUDA runtime application programming interface. The surface object API is only supported on devices of compute capability 3.0 or higher.

Functions

cudaError_t cudaCreateSurfaceObject ( cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc )
Creates a surface object.
cudaError_t cudaDestroySurfaceObject ( cudaSurfaceObject_t surfObject )
Destroys a surface object.
cudaError_t cudaGetSurfaceObjectResourceDesc ( cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject )
Returns a surface object's resource descriptor Returns the resource descriptor for the surface object specified by surfObject.

Functions

cudaError_t cudaCreateSurfaceObject ( cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc )

Creates a surface object. Creates a surface object and returns it in pSurfObject. pResDesc describes the data to perform surface load/stores on. cudaResourceDesc::resType must be cudaResourceTypeArray and cudaResourceDesc::res::array::array must be set to a valid CUDA array handle.

Surface objects are only supported on devices of compute capability 3.0 or higher.

See also:

cudaDestroySurfaceObject

Parameters
pSurfObject
- Surface object to create
pResDesc
- Resource descriptor
cudaError_t cudaDestroySurfaceObject ( cudaSurfaceObject_t surfObject )

Destroys a surface object. Destroys the surface object specified by surfObject.

See also:

cudaCreateSurfaceObject

Parameters
surfObject
- Surface object to destroy
cudaError_t cudaGetSurfaceObjectResourceDesc ( cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject )

Returns a surface object's resource descriptor Returns the resource descriptor for the surface object specified by surfObject.

See also:

cudaCreateSurfaceObject

Parameters
pResDesc
- Resource descriptor
surfObject
- Surface object

CUDA Runtime API (PDF) - CUDA Toolkit v5.5 (older) - Last updated May 11, 2013 - Send Feedback