Initializes each element of a 3D array to the specified value
value. The object to initialize is defined by
pitch field of
pitchedDevPtr is the width in memory in bytes of the 3D array pointed to by
pitchedDevPtr, including any padding added to the end of each row. The
xsize field specifies the logical width of each row in bytes, while the
ysize field specifies the height of each 2D slice in rows.
The extents of the initialized region are specified as a
width in bytes, a
height in rows, and a
depth in slices.
width greater than or equal to the
pitchedDevPtr may perform significantly faster than extents narrower than the
xsize. Secondarily, extents with
height equal to the
pitchedDevPtr will perform faster than when the
height is shorter than the
This function performs fastest when the
pitchedDevPtr has been allocated by cudaMalloc3D().
|pitchedDevPtr ||- Pointer to pitched device memory |
|value ||- Value to set for each byte of specified memory |
|extent ||- Size parameters for where to set device memory (|
width field in bytes)
- cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevicePointer
- Note that this function may also return error codes from previous, asynchronous launches.
- See also:
- cudaMemset, cudaMemset2D, cudaMemsetAsync, cudaMemset2DAsync, cudaMemset3DAsync, cudaMalloc3D, make_cudaPitchedPtr, make_cudaExtent