cuda.bindings._v2.driver.array_get_plane#
- cuda.bindings._v2.driver.array_get_plane(intptr_t h_array, unsigned int plane_idx) intptr_t#
Gets a CUDA array plane from a CUDA array.
Returns in
p_plane_arraya CUDA array that represents a single format plane of the CUDA arrayh_array. Ifplane_idxis greater than the maximum number of planes in this array or if the array does not have a multi-planar format e.g:CU_AD_FORMAT_NV12, thenCUDA_ERROR_INVALID_VALUEis returned. Note that if theh_arrayhas formatCU_AD_FORMAT_NV12, then passing in 0 forplane_idxreturns a CUDA array of the same size ash_arraybut with one channel andCU_AD_FORMAT_UNSIGNED_INT8as its format. If 1 is passed forplane_idx, then the returned CUDA array has half the height and width ofh_arraywith two channels andCU_AD_FORMAT_UNSIGNED_INT8as its format.- Parameters:
h_array (intptr_t) – Multiplanar CUDA array.
plane_idx (unsigned int) – Plane index.
- Returns:
Returned CUDA array referenced by the
plane_idx.- Return type:
intptr_t
See also
cuArrayGetPlane