pub unsafe extern "C" fn hipMallocPitch(
ptr: *mut *mut c_void,
pitch: *mut usize,
width: usize,
height: usize,
) -> hipError_t
Expand description
Allocates at least width (in bytes) * height bytes of linear memory Padding may occur to ensure alighnment requirements are met for the given row The change in width size due to padding will be returned in *pitch. Currently the alignment is set to 128 bytes
@param[out] ptr Pointer to the allocated device memory @param[out] pitch Pitch for allocation (in bytes) @param[in] width Requested pitched allocation width (in bytes) @param[in] height Requested pitched allocation height
If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.
@return Error code
@see hipMalloc, hipFree, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D, hipMalloc3DArray, hipHostMalloc