pub unsafe extern "C" fn cudaCreateSurfaceObject(
pSurfObject: *mut cudaSurfaceObject_t,
pResDesc: *const cudaResourceDesc,
) -> cudaError_tExpand description
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 cudaResourceType::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. Additionally, a surface object is an opaque value, and, as such, should only be accessed through CUDA API calls.
Note that this function may also return cudaError_t::CUDA_ERROR_NOT_INITIALIZED, cudaErrorInsufficientDriver or cudaError_t::CUDA_ERROR_NO_DEVICE if this call tries to initialize internal CUDA RT state.
Note that as specified by cudaStreamAddCallback no CUDA function may be called from callback. cudaError_t::CUDA_ERROR_NOT_PERMITTED may, but is not guaranteed to, be returned as a diagnostic in such case.
§Parameters
pSurfObject: Surface object to create.pResDesc: Resource descriptor.
§Return value
cudaError_t::CUDA_SUCCESScudaError_t::CUDA_ERROR_INVALID_VALUEcudaErrorInvalidChannelDescriptorcudaError_t::CUDA_ERROR_INVALID_HANDLE
See also: cudaDestroySurfaceObject, cuSurfObjectCreate.