Function rcudnn_sys::cudaMemsetAsync[][src]

pub unsafe extern "C" fn cudaMemsetAsync(
    devPtr: *mut c_void,
    value: c_int,
    count: usize,
    stream: cudaStream_t
) -> cudaError_t
Expand description

\brief Initializes or sets device memory to a value

Fills the first \p count bytes of the memory area pointed to by \p devPtr with the constant byte value \p value.

::cudaMemsetAsync() 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 device memory \param value - Value to set for each byte of specified memory \param count - Size in bytes to set \param stream - Stream identifier

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

\sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D, ::cudaMemset2DAsync, ::cudaMemset3DAsync, ::cuMemsetD8Async, ::cuMemsetD16Async, ::cuMemsetD32Async