Function rcudnn_sys::cudaMemset2DAsync[][src]

pub unsafe extern "C" fn cudaMemset2DAsync(
    devPtr: *mut c_void,
    pitch: usize,
    value: c_int,
    width: usize,
    height: usize,
    stream: cudaStream_t
) -> cudaError_t
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().

::cudaMemset2DAsync() is asynchronous with respect to the host, so the call may return before the memset is complete. The operation can optionally be associated to a stream by passing a non-zero \p stream argument. If \p stream is non-zero, the operation may overlap with operations in other streams.

The device version of this function only handles device to device copies and cannot be given local or shared pointers.

\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) \param stream - Stream identifier

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

\sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D, ::cudaMemsetAsync, ::cudaMemset3DAsync, ::cuMemsetD2D8Async, ::cuMemsetD2D16Async, ::cuMemsetD2D32Async