pub unsafe extern "C" fn cuArrayGetPlane(
pPlaneArray: *mut CUarray,
hArray: CUarray,
planeIdx: c_uint,
) -> CUresultExpand description
Gets a CUDA array plane from a CUDA array.
Returns in pPlaneArray a CUDA array that represents a single format plane of the CUDA array hArray.
If planeIdx is greater than the maximum number of planes in this array or if the array does not have a multi-planar format e.g: CUarray_format_enum::CU_AD_FORMAT_NV12, then cudaError_enum::CUDA_ERROR_INVALID_VALUE is returned.
Note that if the hArray has format CUarray_format_enum::CU_AD_FORMAT_NV12, then passing in 0 for planeIdx returns a CUDA array of the same size as hArray but with one channel and CUarray_format_enum::CU_AD_FORMAT_UNSIGNED_INT8 as its format. If 1 is passed for planeIdx, then the returned CUDA array has half the height and width of hArray with two channels and CUarray_format_enum::CU_AD_FORMAT_UNSIGNED_INT8 as its format.
Note that this function may also return error codes from previous, asynchronous launches.
§Parameters
pPlaneArray: Returned CUDA array referenced by theplaneIdx.hArray: Multiplanar CUDA array.planeIdx: Plane index.
§Return value
CUresult::CUDA_SUCCESSCUresult::CUDA_ERROR_DEINITIALIZEDCUresult::CUDA_ERROR_NOT_INITIALIZEDCUresult::CUDA_ERROR_INVALID_CONTEXTCUresult::CUDA_ERROR_INVALID_VALUECUresult::CUDA_ERROR_INVALID_HANDLE
See also: cuArrayCreate, cudaArrayGetPlane.