hipmallocpitch Interface Reference

hipmallocpitch Interface Reference#

HIPFORT API Reference: hipfort::hipmallocpitch Interface Reference
hipfort::hipmallocpitch Interface Reference

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. More...

Public Member Functions

integer(kind(hipsuccess)) function hipmallocpitch_ (ptr, pitch, width, height)
 

Detailed 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

Parameters
[out]ptrPointer to the allocated device memory
[out]pitchPitch for allocation (in bytes)
[in]widthRequested pitched allocation width (in bytes)
[in]heightRequested pitched allocation height

If size is 0, no memory is allocated, ptr returns nullptr, and hipSuccess is returned.

Returns
Error code
See also
hipMalloc, hipFree, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D, hipMalloc3DArray, hipHostMalloc

Member Function/Subroutine Documentation

◆ hipmallocpitch_()

integer(kind(hipsuccess)) function hipfort::hipmallocpitch::hipmallocpitch_ ( type(c_ptr)  ptr,
integer(c_size_t)  pitch,
integer(c_size_t), value  width,
integer(c_size_t), value  height 
)

The documentation for this interface was generated from the following file: