Function rcudnn_sys::cudaMemset3D[][src]

pub unsafe extern "C" fn cudaMemset3D(
    pitchedDevPtr: cudaPitchedPtr,
    value: c_int,
    extent: cudaExtent
) -> 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().

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

\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)

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

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