Function rcudnn_sys::cudaMemset3DAsync[][src]

pub unsafe extern "C" fn cudaMemset3DAsync(
    pitchedDevPtr: cudaPitchedPtr,
    value: c_int,
    extent: cudaExtent,
    stream: cudaStream_t
) -> cudaError_t
Expand description

\brief Initializes or sets device memory to a value

Initializes each element of a 3D array to the specified value \p value. The object to initialize is defined by \p pitchedDevPtr. The \p pitch field of \p pitchedDevPtr is the width in memory in bytes of the 3D array pointed to by \p pitchedDevPtr, including any padding added to the end of each row. The \p xsize field specifies the logical width of each row in bytes, while the \p ysize field specifies the height of each 2D slice in rows. The \p pitch field of \p pitchedDevPtr is ignored when \p height and \p depth are both equal to 1.

The extents of the initialized region are specified as a \p width in bytes, a \p height in rows, and a \p depth in slices.

Extents with \p width greater than or equal to the \p xsize of \p pitchedDevPtr may perform significantly faster than extents narrower than the \p xsize. Secondarily, extents with \p height equal to the \p ysize of \p pitchedDevPtr will perform faster than when the \p height is shorter than the \p ysize.

This function performs fastest when the \p pitchedDevPtr has been allocated by ::cudaMalloc3D().

::cudaMemset3DAsync() 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 pitchedDevPtr - Pointer to pitched device memory \param value - Value to set for each byte of specified memory \param extent - Size parameters for where to set device memory (\p width field in bytes) \param stream - Stream identifier

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

\sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D, ::cudaMemsetAsync, ::cudaMemset2DAsync, ::cudaMalloc3D, ::make_cudaPitchedPtr, ::make_cudaExtent