Function rcudnn::cudaMemset2D[][src]

pub unsafe extern "C" fn cudaMemset2D(
    devPtr: *mut c_void,
    pitch: usize,
    value: i32,
    width: usize,
    height: usize
) -> cudaError
Expand description

\brief Initializes or sets device memory to a value

Sets to the specified value \p value a matrix (\p height rows of \p width bytes each) pointed to by \p dstPtr. \p pitch is the width in bytes of the 2D array pointed to by \p dstPtr, including any padding added to the end of each row. This function performs fastest when the pitch is one that has been passed back by ::cudaMallocPitch().

Note that this function is asynchronous with respect to the host unless \p devPtr refers to pinned host memory.

\param devPtr - Pointer to 2D device memory \param pitch - Pitch in bytes of 2D device memory(Unused if \p height is 1) \param value - Value to set for each byte of specified memory \param width - Width of matrix set (columns in bytes) \param height - Height of matrix set (rows)

\return ::cudaSuccess, ::cudaErrorInvalidValue, \notefnerr \note_memset \note_init_rt \note_callback

\sa ::cudaMemset, ::cudaMemset3D, ::cudaMemsetAsync, ::cudaMemset2DAsync, ::cudaMemset3DAsync, ::cuMemsetD2D8, ::cuMemsetD2D16, ::cuMemsetD2D32