Driver Types

Driver Types#

HIP Runtime API Reference: Driver Types

Data Structures

struct  hipChannelFormatDesc
 
struct  HIP_ARRAY_DESCRIPTOR
 
struct  HIP_ARRAY3D_DESCRIPTOR
 
struct  hip_Memcpy2D
 
struct  hipMipmappedArray_t
 
struct  HIP_TEXTURE_DESC
 
struct  hipResourceDesc
 
struct  HIP_RESOURCE_DESC
 
struct  hipResourceViewDesc
 
struct  HIP_RESOURCE_VIEW_DESC
 
struct  hipPitchedPtr
 
struct  hipExtent
 
struct  hipPos
 
struct  hipMemcpy3DParms
 
struct  HIP_MEMCPY3D
 
struct  hipMemLocation
 
struct  hipMemcpyAttributes
 
struct  hipOffset3D
 
struct  hipMemcpy3DOperand
 
struct  hipMemcpy3DBatchOp
 
struct  hipMemcpy3DPeerParms
 
union  hipResourceDesc.res
 
struct  hipResourceDesc.res.array
 
struct  hipResourceDesc.res.mipmap
 
struct  hipResourceDesc.res.linear
 
struct  hipResourceDesc.res.pitch2D
 
union  HIP_RESOURCE_DESC.res
 
struct  HIP_RESOURCE_DESC.res.array
 
struct  HIP_RESOURCE_DESC.res.mipmap
 
struct  HIP_RESOURCE_DESC.res.linear
 
struct  HIP_RESOURCE_DESC.res.pitch2D
 
struct  HIP_RESOURCE_DESC.res.reserved
 
union  hipMemcpy3DOperand.op
 
struct  hipMemcpy3DOperand.op.ptr
 
struct  hipMemcpy3DOperand.op.array
 

Macros

#define HIP_TRSA_OVERRIDE_FORMAT   0x01
 The hipTexRefSetArray function flags parameter override format value.
 
#define HIP_TRSF_READ_AS_INTEGER   0x01
 The hipTexRefSetFlags function flags parameter read as integer value.
 
#define HIP_TRSF_NORMALIZED_COORDINATES   0x02
 The hipTexRefSetFlags function flags parameter normalized coordinate value.
 
#define HIP_TRSF_SRGB   0x10
 The hipTexRefSetFlags function flags parameter srgb value.
 

Typedefs

typedef void * hipDeviceptr_t
 
typedef struct hipArray * hipArray_t
 
typedef const struct hipArray * hipArray_const_t
 
typedef hipMipmappedArray_t hipmipmappedArray
 
typedef const struct hipMipmappedArrayhipMipmappedArray_const_t
 

Enumerations

enum  hipChannelFormatKind {
  hipChannelFormatKindSigned = 0 ,
  hipChannelFormatKindUnsigned = 1 ,
  hipChannelFormatKindFloat = 2 ,
  hipChannelFormatKindNone = 3
}
 
enum  hipArray_Format {
  HIP_AD_FORMAT_UNSIGNED_INT8 = 0x01 ,
  HIP_AD_FORMAT_UNSIGNED_INT16 = 0x02 ,
  HIP_AD_FORMAT_UNSIGNED_INT32 = 0x03 ,
  HIP_AD_FORMAT_SIGNED_INT8 = 0x08 ,
  HIP_AD_FORMAT_SIGNED_INT16 = 0x09 ,
  HIP_AD_FORMAT_SIGNED_INT32 = 0x0a ,
  HIP_AD_FORMAT_HALF = 0x10 ,
  HIP_AD_FORMAT_FLOAT = 0x20
}
 
enum  hipResourceType {
  hipResourceTypeArray = 0x00 ,
  hipResourceTypeMipmappedArray = 0x01 ,
  hipResourceTypeLinear = 0x02 ,
  hipResourceTypePitch2D = 0x03
}
 
enum  hipResourcetype {
  HIP_RESOURCE_TYPE_ARRAY = 0x00 ,
  HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY = 0x01 ,
  HIP_RESOURCE_TYPE_LINEAR = 0x02 ,
  HIP_RESOURCE_TYPE_PITCH2D = 0x03
}
 
enum  HIPaddress_mode {
  HIP_TR_ADDRESS_MODE_WRAP = 0 ,
  HIP_TR_ADDRESS_MODE_CLAMP = 1 ,
  HIP_TR_ADDRESS_MODE_MIRROR = 2 ,
  HIP_TR_ADDRESS_MODE_BORDER = 3
}
 
enum  HIPfilter_mode {
  HIP_TR_FILTER_MODE_POINT = 0 ,
  HIP_TR_FILTER_MODE_LINEAR = 1
}
 
enum  hipResourceViewFormat {
  hipResViewFormatNone = 0x00 ,
  hipResViewFormatUnsignedChar1 = 0x01 ,
  hipResViewFormatUnsignedChar2 = 0x02 ,
  hipResViewFormatUnsignedChar4 = 0x03 ,
  hipResViewFormatSignedChar1 = 0x04 ,
  hipResViewFormatSignedChar2 = 0x05 ,
  hipResViewFormatSignedChar4 = 0x06 ,
  hipResViewFormatUnsignedShort1 = 0x07 ,
  hipResViewFormatUnsignedShort2 = 0x08 ,
  hipResViewFormatUnsignedShort4 = 0x09 ,
  hipResViewFormatSignedShort1 = 0x0a ,
  hipResViewFormatSignedShort2 = 0x0b ,
  hipResViewFormatSignedShort4 = 0x0c ,
  hipResViewFormatUnsignedInt1 = 0x0d ,
  hipResViewFormatUnsignedInt2 = 0x0e ,
  hipResViewFormatUnsignedInt4 = 0x0f ,
  hipResViewFormatSignedInt1 = 0x10 ,
  hipResViewFormatSignedInt2 = 0x11 ,
  hipResViewFormatSignedInt4 = 0x12 ,
  hipResViewFormatHalf1 = 0x13 ,
  hipResViewFormatHalf2 = 0x14 ,
  hipResViewFormatHalf4 = 0x15 ,
  hipResViewFormatFloat1 = 0x16 ,
  hipResViewFormatFloat2 = 0x17 ,
  hipResViewFormatFloat4 = 0x18 ,
  hipResViewFormatUnsignedBlockCompressed1 = 0x19 ,
  hipResViewFormatUnsignedBlockCompressed2 = 0x1a ,
  hipResViewFormatUnsignedBlockCompressed3 = 0x1b ,
  hipResViewFormatUnsignedBlockCompressed4 = 0x1c ,
  hipResViewFormatSignedBlockCompressed4 = 0x1d ,
  hipResViewFormatUnsignedBlockCompressed5 = 0x1e ,
  hipResViewFormatSignedBlockCompressed5 = 0x1f ,
  hipResViewFormatUnsignedBlockCompressed6H = 0x20 ,
  hipResViewFormatSignedBlockCompressed6H = 0x21 ,
  hipResViewFormatUnsignedBlockCompressed7 = 0x22
}
 
enum  HIPresourceViewFormat {
  HIP_RES_VIEW_FORMAT_NONE = 0x00 ,
  HIP_RES_VIEW_FORMAT_UINT_1X8 = 0x01 ,
  HIP_RES_VIEW_FORMAT_UINT_2X8 = 0x02 ,
  HIP_RES_VIEW_FORMAT_UINT_4X8 = 0x03 ,
  HIP_RES_VIEW_FORMAT_SINT_1X8 = 0x04 ,
  HIP_RES_VIEW_FORMAT_SINT_2X8 = 0x05 ,
  HIP_RES_VIEW_FORMAT_SINT_4X8 = 0x06 ,
  HIP_RES_VIEW_FORMAT_UINT_1X16 = 0x07 ,
  HIP_RES_VIEW_FORMAT_UINT_2X16 = 0x08 ,
  HIP_RES_VIEW_FORMAT_UINT_4X16 = 0x09 ,
  HIP_RES_VIEW_FORMAT_SINT_1X16 = 0x0a ,
  HIP_RES_VIEW_FORMAT_SINT_2X16 = 0x0b ,
  HIP_RES_VIEW_FORMAT_SINT_4X16 = 0x0c ,
  HIP_RES_VIEW_FORMAT_UINT_1X32 = 0x0d ,
  HIP_RES_VIEW_FORMAT_UINT_2X32 = 0x0e ,
  HIP_RES_VIEW_FORMAT_UINT_4X32 = 0x0f ,
  HIP_RES_VIEW_FORMAT_SINT_1X32 = 0x10 ,
  HIP_RES_VIEW_FORMAT_SINT_2X32 = 0x11 ,
  HIP_RES_VIEW_FORMAT_SINT_4X32 = 0x12 ,
  HIP_RES_VIEW_FORMAT_FLOAT_1X16 = 0x13 ,
  HIP_RES_VIEW_FORMAT_FLOAT_2X16 = 0x14 ,
  HIP_RES_VIEW_FORMAT_FLOAT_4X16 = 0x15 ,
  HIP_RES_VIEW_FORMAT_FLOAT_1X32 = 0x16 ,
  HIP_RES_VIEW_FORMAT_FLOAT_2X32 = 0x17 ,
  HIP_RES_VIEW_FORMAT_FLOAT_4X32 = 0x18 ,
  HIP_RES_VIEW_FORMAT_UNSIGNED_BC1 = 0x19 ,
  HIP_RES_VIEW_FORMAT_UNSIGNED_BC2 = 0x1a ,
  HIP_RES_VIEW_FORMAT_UNSIGNED_BC3 = 0x1b ,
  HIP_RES_VIEW_FORMAT_UNSIGNED_BC4 = 0x1c ,
  HIP_RES_VIEW_FORMAT_SIGNED_BC4 = 0x1d ,
  HIP_RES_VIEW_FORMAT_UNSIGNED_BC5 = 0x1e ,
  HIP_RES_VIEW_FORMAT_SIGNED_BC5 = 0x1f ,
  HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H = 0x20 ,
  HIP_RES_VIEW_FORMAT_SIGNED_BC6H = 0x21 ,
  HIP_RES_VIEW_FORMAT_UNSIGNED_BC7 = 0x22
}
 
enum  hipMemcpyKind {
  hipMemcpyHostToHost = 0 ,
  hipMemcpyHostToDevice = 1 ,
  hipMemcpyDeviceToHost = 2 ,
  hipMemcpyDeviceToDevice = 3 ,
  hipMemcpyDefault = 4 ,
  hipMemcpyDeviceToDeviceNoCU = 1024
}
 
enum  hipMemLocationType {
  hipMemLocationTypeInvalid = 0 ,
  hipMemLocationTypeNone = 0 ,
  hipMemLocationTypeDevice = 1 ,
  hipMemLocationTypeHost = 2 ,
  hipMemLocationTypeHostNuma = 3 ,
  hipMemLocationTypeHostNumaCurrent
}
 
enum  hipMemcpyFlags {
  hipMemcpyFlagDefault = 0x0 ,
  hipMemcpyFlagPreferOverlapWithCompute = 0x1 ,
  hipMemcpyFlagExtPreferCE = 0x100 ,
  hipMemcpyFlagExtOpSwap = 0x200 ,
  hipMemcpyFlagExtOpIndirectSrc = 0x400 ,
  hipMemcpyFlagExtOpIndirectDst = 0x800
}
 
enum  hipMemcpySrcAccessOrder {
  hipMemcpySrcAccessOrderInvalid = 0x0 ,
  hipMemcpySrcAccessOrderStream = 0x1 ,
  hipMemcpySrcAccessOrderDuringApiCall ,
  hipMemcpySrcAccessOrderAny ,
  hipMemcpySrcAccessOrderMax = 0x7FFFFFFF
}
 
enum  hipMemcpy3DOperandType {
  hipMemcpyOperandTypePointer = 0x1 ,
  hipMemcpyOperandTypeArray = 0x2 ,
  hipMemcpyOperandTypeMax = 0x7FFFFFFF
}
 
enum  hipFunction_attribute {
  HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK ,
  HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES ,
  HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES ,
  HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES ,
  HIP_FUNC_ATTRIBUTE_NUM_REGS ,
  HIP_FUNC_ATTRIBUTE_PTX_VERSION ,
  HIP_FUNC_ATTRIBUTE_BINARY_VERSION ,
  HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA ,
  HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES ,
  HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT ,
  HIP_FUNC_ATTRIBUTE_CLUSTER_DIM_MUST_BE_SET ,
  HIP_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH ,
  HIP_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT ,
  HIP_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH ,
  HIP_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED ,
  HIP_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE ,
  HIP_FUNC_ATTRIBUTE_MAX
}
 
enum  hipPointer_attribute {
  HIP_POINTER_ATTRIBUTE_CONTEXT = 1 ,
  HIP_POINTER_ATTRIBUTE_MEMORY_TYPE ,
  HIP_POINTER_ATTRIBUTE_DEVICE_POINTER ,
  HIP_POINTER_ATTRIBUTE_HOST_POINTER ,
  HIP_POINTER_ATTRIBUTE_P2P_TOKENS ,
  HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS ,
  HIP_POINTER_ATTRIBUTE_BUFFER_ID ,
  HIP_POINTER_ATTRIBUTE_IS_MANAGED ,
  HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL ,
  HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE ,
  HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR ,
  HIP_POINTER_ATTRIBUTE_RANGE_SIZE ,
  HIP_POINTER_ATTRIBUTE_MAPPED ,
  HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES ,
  HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE ,
  HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS ,
  HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE
}
 

Detailed Description

This section describes the driver data types.


Data Structure Documentation

◆ hipChannelFormatDesc

struct hipChannelFormatDesc

HIP channel format descriptor

Data Fields
enum hipChannelFormatKind f Channel format kind.
int w
int x
int y
int z

◆ HIP_ARRAY_DESCRIPTOR

struct HIP_ARRAY_DESCRIPTOR

HIP array descriptor

Data Fields
enum hipArray_Format Format Format of the array.
size_t Height Height of the array.
unsigned int NumChannels Number of channels of the array.
size_t Width Width of the array.

◆ HIP_ARRAY3D_DESCRIPTOR

struct HIP_ARRAY3D_DESCRIPTOR

HIP 3D array descriptor

Data Fields
size_t Depth Depth of the array.
unsigned int Flags Flags of the array.
enum hipArray_Format Format Format of the array.
size_t Height Height of the array.
unsigned int NumChannels Number of channels of the array.
size_t Width Width of the array.

◆ hip_Memcpy2D

struct hip_Memcpy2D

HIP 2D memory copy parameters

Data Fields
hipArray_t dstArray Destination array.
hipDeviceptr_t dstDevice Destination device.
void * dstHost Destination pointer.
hipMemoryType dstMemoryType Destination memory type.
size_t dstPitch Destination pitch.
size_t dstXInBytes Destination width in bytes.
size_t dstY Destination height.
size_t Height Height of the 2D memory copy.
hipArray_t srcArray Source array.
hipDeviceptr_t srcDevice Source device.
const void * srcHost Source pointer.
hipMemoryType srcMemoryType Source memory type.
size_t srcPitch Source pitch.
size_t srcXInBytes Source width in bytes.
size_t srcY Source height.
size_t WidthInBytes Width in bytes of the 2D memory copy.

◆ hipMipmappedArray

struct hipMipmappedArray

HIP mipmapped array

HIP mipmapped array pointer

Collaboration diagram for hipMipmappedArray_t:
[legend]
Data Fields
void * data Data pointer of the mipmapped array.
unsigned int depth Depth of the mipmapped array.
struct hipChannelFormatDesc desc Description of the mipmapped array.
unsigned int flags Flags of the mipmapped array.
enum hipArray_Format format Format of the mipmapped array.
unsigned int height Height of the mipmapped array.
unsigned int max_mipmap_level Maximum level of the mipmapped array.
unsigned int min_mipmap_level Minimum level of the mipmapped array.
unsigned int num_channels Number of channels of the mipmapped array.
unsigned int type Type of the mipmapped array.
unsigned int width Width of the mipmapped array.

◆ HIP_TEXTURE_DESC

struct HIP_TEXTURE_DESC

HIP texture descriptor

Data Fields
HIPaddress_mode addressMode[3] Address modes.
float borderColor[4] Border Color.
HIPfilter_mode filterMode Filter mode.
unsigned int flags Flags.
unsigned int maxAnisotropy Maximum anisotropy ratio.
float maxMipmapLevelClamp Mipmap maximum level clamp.
float minMipmapLevelClamp Mipmap minimum level clamp.
HIPfilter_mode mipmapFilterMode Mipmap filter mode.
float mipmapLevelBias Mipmap level bias.
int reserved[12]

◆ hipResourceDesc

struct hipResourceDesc

HIP resource descriptor

Data Fields
union hipResourceDesc.res res
enum hipResourceType resType Resource type.

◆ HIP_RESOURCE_DESC

struct HIP_RESOURCE_DESC

HIP resource view descriptor struct

Data Fields
unsigned int flags Flags (must be zero)
union HIP_RESOURCE_DESC.res res
HIPresourcetype resType Resource type.

◆ hipResourceViewDesc

struct hipResourceViewDesc

HIP resource view descriptor

Data Fields
size_t depth Depth of the resource view.
unsigned int firstLayer First layer index.
unsigned int firstMipmapLevel First defined mipmap level.
enum hipResourceViewFormat format Resource view format.
size_t height Height of the resource view.
unsigned int lastLayer Last layer index.
unsigned int lastMipmapLevel Last defined mipmap level.
size_t width Width of the resource view.

◆ HIP_RESOURCE_VIEW_DESC

struct HIP_RESOURCE_VIEW_DESC

Resource view descriptor

Data Fields
size_t depth Depth of the resource view.
unsigned int firstLayer First layer index.
unsigned int firstMipmapLevel First defined mipmap level.
HIPresourceViewFormat format Resource view format.
size_t height Height of the resource view.
unsigned int lastLayer Last layer index.
unsigned int lastMipmapLevel Last defined mipmap level.
unsigned int reserved[16]
size_t width Width of the resource view.

◆ hipPitchedPtr

struct hipPitchedPtr

HIP pithed pointer

Data Fields
size_t pitch Pitch in bytes.
void * ptr Pointer to the allocated memory.
size_t xsize Logical size of the first dimension of allocation in elements.
size_t ysize Logical size of the second dimension of allocation in elements.

◆ hipExtent

struct hipExtent

HIP extent

Data Fields
size_t depth
size_t height
size_t width

◆ hipPos

struct hipPos

HIP position

Data Fields
size_t x X coordinate.
size_t y Y coordinate.
size_t z Z coordinate.

◆ hipMemcpy3DParms

struct hipMemcpy3DParms

HIP 3D memory copy parameters

Collaboration diagram for hipMemcpy3DParms:
[legend]
Data Fields
hipArray_t dstArray Destination array.
struct hipPos dstPos Destination position.
struct hipPitchedPtr dstPtr Destination pointer.
struct hipExtent extent Extent of 3D memory copy.
enum hipMemcpyKind kind Kind of 3D memory copy.
hipArray_t srcArray Source array.
struct hipPos srcPos Source position.
struct hipPitchedPtr srcPtr Source pointer.

◆ HIP_MEMCPY3D

struct HIP_MEMCPY3D

HIP 3D memory copy

Data Fields
size_t Depth Depth in bytes of 3D memory copy.
hipArray_t dstArray Destination array.
hipDeviceptr_t dstDevice Destination device.
size_t dstHeight Destination height.
void * dstHost Destination host pointer.
size_t dstLOD Destination LOD.
hipMemoryType dstMemoryType Destination memory type.
size_t dstPitch Destination pitch.
size_t dstXInBytes Destination X in bytes.
size_t dstY Destination Y.
size_t dstZ Destination Z.
size_t Height Height in bytes of 3D memory copy.
hipArray_t srcArray Source array.
hipDeviceptr_t srcDevice Source device.
size_t srcHeight Source height.
const void * srcHost Source host pointer.
size_t srcLOD Source LOD.
hipMemoryType srcMemoryType Source memory type.
size_t srcPitch Source pitch.
size_t srcXInBytes Source X in bytes.
size_t srcY Source Y.
size_t srcZ Source Z.
size_t WidthInBytes Width in bytes of 3D memory copy.

◆ hipMemLocation

struct hipMemLocation

Specifies a memory location.

To specify a gpu, set type = hipMemLocationTypeDevice and set id = the gpu's device ID

Data Fields
int id Identifier for the provided location type hipMemLocationType.
hipMemLocationType type Specifies the location type, which describes the meaning of id.

◆ hipMemcpyAttributes

struct hipMemcpyAttributes

Attributes for copies within a batch.

Collaboration diagram for hipMemcpyAttributes:
[legend]
Data Fields
hipMemLocation dstLocHint Location hint for destination operand.
unsigned int flags Additional Flags for copies. See hipMemcpyFlags.
hipMemcpySrcAccessOrder srcAccessOrder Source access ordering to be observed for copies with this attribute.
hipMemLocation srcLocHint Location hint for src operand.

◆ hipOffset3D

struct hipOffset3D

Struct representing offset into a hipArray_t in elements.

Data Fields
size_t x
size_t y
size_t z

◆ hipMemcpy3DOperand

struct hipMemcpy3DOperand

Struct representing an operand for copy with hipMemcpy3DBatchAsync.

Data Fields
union hipMemcpy3DOperand.op op
hipMemcpy3DOperandType type

◆ hipMemcpy3DBatchOp

struct hipMemcpy3DBatchOp

HIP 3D Batch Op

Collaboration diagram for hipMemcpy3DBatchOp:
[legend]
Data Fields
hipMemcpy3DOperand dst
hipExtent extent
unsigned int flags
hipMemcpy3DOperand src
hipMemcpySrcAccessOrder srcAccessOrder

◆ hipMemcpy3DPeerParms

struct hipMemcpy3DPeerParms
Collaboration diagram for hipMemcpy3DPeerParms:
[legend]
Data Fields
hipArray_t dstArray Destination memory address.
int dstDevice Destination device.
hipPos dstPos Destination position offset.
hipPitchedPtr dstPtr Pitched destination memory address.
hipExtent extent Requested memory copy size.
hipArray_t srcArray Source memory address.
int srcDevice Source device.
hipPos srcPos Source position offset.
hipPitchedPtr srcPtr Pitched source memory address.

◆ hipResourceDesc.res

union hipResourceDesc.res
Data Fields
struct hipResourceDesc.res.array array
struct hipResourceDesc.res.linear linear
struct hipResourceDesc.res.mipmap mipmap
struct hipResourceDesc.res.pitch2D pitch2D

◆ hipResourceDesc.res.array

struct hipResourceDesc.res.array
Data Fields
hipArray_t array HIP array.

◆ hipResourceDesc.res.mipmap

struct hipResourceDesc.res.mipmap
Data Fields
hipMipmappedArray_t mipmap HIP mipmapped array.

◆ hipResourceDesc.res.linear

struct hipResourceDesc.res.linear
Data Fields
struct hipChannelFormatDesc desc Channel format description.
void * devPtr Device pointer.
size_t sizeInBytes Size in bytes.

◆ hipResourceDesc.res.pitch2D

struct hipResourceDesc.res.pitch2D
Data Fields
struct hipChannelFormatDesc desc Channel format description.
void * devPtr Device pointer.
size_t height Height of the array in elements.
size_t pitchInBytes Pitch between two rows in bytes.
size_t width Width of the array in elements.

◆ HIP_RESOURCE_DESC.res

union HIP_RESOURCE_DESC.res

◆ HIP_RESOURCE_DESC.res.array

struct HIP_RESOURCE_DESC.res.array
Data Fields
hipArray_t hArray HIP array.

◆ HIP_RESOURCE_DESC.res.mipmap

struct HIP_RESOURCE_DESC.res.mipmap
Data Fields
hipMipmappedArray_t hMipmappedArray HIP mipmapped array.

◆ HIP_RESOURCE_DESC.res.linear

struct HIP_RESOURCE_DESC.res.linear
Data Fields
hipDeviceptr_t devPtr Device pointer.
hipArray_Format format Array format.
unsigned int numChannels Channels per array element.
size_t sizeInBytes Size in bytes.

◆ HIP_RESOURCE_DESC.res.pitch2D

struct HIP_RESOURCE_DESC.res.pitch2D
Data Fields
hipDeviceptr_t devPtr Device pointer.
hipArray_Format format Array format.
size_t height Height of the array in elements.
unsigned int numChannels Channels per array element.
size_t pitchInBytes Pitch between two rows in bytes.
size_t width Width of the array in elements.

◆ HIP_RESOURCE_DESC.res.reserved

struct HIP_RESOURCE_DESC.res.reserved
Data Fields
int reserved[32]

◆ hipMemcpy3DOperand.op

union hipMemcpy3DOperand.op
Data Fields
struct hipMemcpy3DOperand.op.array array
struct hipMemcpy3DOperand.op.ptr ptr

◆ hipMemcpy3DOperand.op.ptr

struct hipMemcpy3DOperand.op.ptr
Data Fields
size_t layerHeight Height of each layer in elements.
hipMemLocation locHint Location Hint for the operand.
void * ptr
size_t rowLength Length of each row in elements.

◆ hipMemcpy3DOperand.op.array

struct hipMemcpy3DOperand.op.array
Data Fields
hipArray_t array Array struct for hipMemcpyOperandTypeArray.
hipOffset3D offset Offset into array in elements.

Macro Definition Documentation

◆ HIP_TRSA_OVERRIDE_FORMAT

#define HIP_TRSA_OVERRIDE_FORMAT   0x01

The hipTexRefSetArray function flags parameter override format value.

◆ HIP_TRSF_NORMALIZED_COORDINATES

#define HIP_TRSF_NORMALIZED_COORDINATES   0x02

The hipTexRefSetFlags function flags parameter normalized coordinate value.

◆ HIP_TRSF_READ_AS_INTEGER

#define HIP_TRSF_READ_AS_INTEGER   0x01

The hipTexRefSetFlags function flags parameter read as integer value.

◆ HIP_TRSF_SRGB

#define HIP_TRSF_SRGB   0x10

The hipTexRefSetFlags function flags parameter srgb value.

Typedef Documentation

◆ hipArray_const_t

typedef const struct hipArray* hipArray_const_t

◆ hipArray_t

typedef struct hipArray* hipArray_t

◆ hipDeviceptr_t

typedef void* hipDeviceptr_t

◆ hipmipmappedArray

typedef hipMipmappedArray_t hipmipmappedArray

◆ hipMipmappedArray_const_t

Enumeration Type Documentation

◆ HIPaddress_mode

HIP texture address modes

Enumerator
HIP_TR_ADDRESS_MODE_WRAP 

Wrap address mode.

HIP_TR_ADDRESS_MODE_CLAMP 

Clamp address mode.

HIP_TR_ADDRESS_MODE_MIRROR 

Mirror address mode.

HIP_TR_ADDRESS_MODE_BORDER 

Border address mode.

◆ hipArray_Format

HIP array format

Enumerator
HIP_AD_FORMAT_UNSIGNED_INT8 

Unsigned 8-bit array format.

HIP_AD_FORMAT_UNSIGNED_INT16 

Unsigned 16-bit array format.

HIP_AD_FORMAT_UNSIGNED_INT32 

Unsigned 32-bit array format.

HIP_AD_FORMAT_SIGNED_INT8 

Signed 8-bit array format.

HIP_AD_FORMAT_SIGNED_INT16 

Signed 16-bit array format.

HIP_AD_FORMAT_SIGNED_INT32 

Signed 32-bit array format.

HIP_AD_FORMAT_HALF 

Half array format.

HIP_AD_FORMAT_FLOAT 

Float array format.

◆ hipChannelFormatKind

HIP channel format kinds

Enumerator
hipChannelFormatKindSigned 

Signed channel format.

hipChannelFormatKindUnsigned 

Unsigned channel format.

hipChannelFormatKindFloat 

Float channel format.

hipChannelFormatKindNone 

No channel format.

◆ HIPfilter_mode

HIP filter modes

Enumerator
HIP_TR_FILTER_MODE_POINT 

Filter mode point.

HIP_TR_FILTER_MODE_LINEAR 

Filter mode linear.

◆ hipFunction_attribute

Enumerator
HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK 

The maximum number of threads per block. Depends on function and device.

HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES 

The statically allocated shared memory size in bytes per block required by the function.

HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES 

The user-allocated constant memory by the function in bytes.

HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES 

The local memory usage of each thread by this function in bytes.

HIP_FUNC_ATTRIBUTE_NUM_REGS 

The number of registers used by each thread of this function.

HIP_FUNC_ATTRIBUTE_PTX_VERSION 

PTX version.

HIP_FUNC_ATTRIBUTE_BINARY_VERSION 

Binary version.

HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA 

Cache mode.

HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES 

The maximum dynamic shared memory per block for this function in bytes.

HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT 

The shared memory carveout preference in percent of the maximum shared memory.

HIP_FUNC_ATTRIBUTE_CLUSTER_DIM_MUST_BE_SET 

the kernel must launch with a valid cluster size specified.

HIP_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH 

The required cluster width in blocks.

HIP_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT 

The required cluster height in blocks.

HIP_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH 

The required cluster depth in blocks.

HIP_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED 

Is the function allowed to launch with non-portable cluster size.

HIP_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE 

The block scheduling policy of a function.

HIP_FUNC_ATTRIBUTE_MAX 

◆ hipMemcpy3DOperandType

Operand types for individual copies within a batch

Enumerator
hipMemcpyOperandTypePointer 

Mempcy operand is a valid pointer.

hipMemcpyOperandTypeArray 

Memcpy operand is a valid hipArray.

hipMemcpyOperandTypeMax 

◆ hipMemcpyFlags

Flags to specify for copies within a batch. Used with hipMemcpyBatchAsync

Enumerator
hipMemcpyFlagDefault 

Default flag.

hipMemcpyFlagPreferOverlapWithCompute 

Tries to overlap copy with compute work.

hipMemcpyFlagExtPreferCE 

Prefer copy engine over compute engine.

hipMemcpyFlagExtOpSwap 

Swap contents of src and dst.

hipMemcpyFlagExtOpIndirectSrc 

The src pointer holds the address of the real source pointer, read when the copy runs rather than when it is submitted.

hipMemcpyFlagExtOpIndirectDst 

Same as IndirectSrc, but for the dst pointer.

◆ hipMemcpyKind

Memory copy types

Enumerator
hipMemcpyHostToHost 

Host-to-Host Copy.

hipMemcpyHostToDevice 

Host-to-Device Copy.

hipMemcpyDeviceToHost 

Device-to-Host Copy.

hipMemcpyDeviceToDevice 

Device-to-Device Copy.

hipMemcpyDefault 

Runtime will automatically determine copy-kind based on virtual addresses.

hipMemcpyDeviceToDeviceNoCU 

Device-to-Device Copy without using compute units.

◆ hipMemcpySrcAccessOrder

Flags to specify order in which source pointer is accessed by Batch memcpy

Enumerator
hipMemcpySrcAccessOrderInvalid 

Default Invalid.

hipMemcpySrcAccessOrderStream 

Access to source pointer must be in stream order.

hipMemcpySrcAccessOrderDuringApiCall 

Access to source pointer can be out of stream order and all accesses must be complete before API call returns.

hipMemcpySrcAccessOrderAny 

Access to the source pointer can be out of stream order and the accesses can happen even after the API call return.

hipMemcpySrcAccessOrderMax 

◆ hipMemLocationType

Specifies the type of location

Enumerator
hipMemLocationTypeInvalid 
hipMemLocationTypeNone 
hipMemLocationTypeDevice 

Device location, thus it's HIP device ID.

hipMemLocationTypeHost 

Host location, id is ignored.

hipMemLocationTypeHostNuma 

Host NUMA node location, id is host NUMA node id.

hipMemLocationTypeHostNumaCurrent 

Host NUMA node closest to current thread’s CPU, id is ignored.

◆ hipPointer_attribute

Enumerator
HIP_POINTER_ATTRIBUTE_CONTEXT 

The context on which a pointer was allocated

Warning
This attribute is not supported in HIP
HIP_POINTER_ATTRIBUTE_MEMORY_TYPE 

memory type describing the location of a pointer

HIP_POINTER_ATTRIBUTE_DEVICE_POINTER 

address at which the pointer is allocated on the device

HIP_POINTER_ATTRIBUTE_HOST_POINTER 

address at which the pointer is allocated on the host

HIP_POINTER_ATTRIBUTE_P2P_TOKENS 

A pair of tokens for use with Linux kernel interface

Warning
This attribute is not supported in HIP
HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS 

Synchronize every synchronous memory operation initiated on this region

HIP_POINTER_ATTRIBUTE_BUFFER_ID 

Unique ID for an allocated memory region.

HIP_POINTER_ATTRIBUTE_IS_MANAGED 

Indicates if the pointer points to managed memory.

HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL 

device ordinal of a device on which a pointer was allocated or registered

HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE 

if this pointer maps to an allocation that is suitable for hipIpcGetMemHandle

Warning
This attribute is not supported in HIP
HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR 

Starting address for this requested pointer.

HIP_POINTER_ATTRIBUTE_RANGE_SIZE 

Size of the address range for this requested pointer.

HIP_POINTER_ATTRIBUTE_MAPPED 

tells if this pointer is in a valid address range that is mapped to a backing allocation

HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES 

Bitmask of allowed hipmemAllocationHandleType for this allocation

Warning
This attribute is not supported in HIP
HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE 

returns if the memory referenced by this pointer can be used with the GPUDirect RDMA API

Warning
This attribute is not supported in HIP
HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS 

Returns the access flags the device associated with for the corresponding memory referenced by the ptr

HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE 

Returns the mempool handle for the allocation if it was allocated from a mempool

Warning
This attribute is not supported in HIP

◆ hipResourceType

HIP resource types

Enumerator
hipResourceTypeArray 

Array resource.

hipResourceTypeMipmappedArray 

Mipmapped array resource.

hipResourceTypeLinear 

Linear resource.

hipResourceTypePitch2D 

Pitch 2D resource.

◆ hipResourcetype

Enumerator
HIP_RESOURCE_TYPE_ARRAY 

Array resource.

HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY 

Mipmapped array resource.

HIP_RESOURCE_TYPE_LINEAR 

Linear resource.

HIP_RESOURCE_TYPE_PITCH2D 

Pitch 2D resource.

◆ hipResourceViewFormat

HIP texture resource view formats

Enumerator
hipResViewFormatNone 

No resource view format (use underlying resource format)

hipResViewFormatUnsignedChar1 

1 channel, unsigned 8-bit integers

hipResViewFormatUnsignedChar2 

2 channels, unsigned 8-bit integers

hipResViewFormatUnsignedChar4 

4 channels, unsigned 8-bit integers

hipResViewFormatSignedChar1 

1 channel, signed 8-bit integers

hipResViewFormatSignedChar2 

2 channels, signed 8-bit integers

hipResViewFormatSignedChar4 

4 channels, signed 8-bit integers

hipResViewFormatUnsignedShort1 

1 channel, unsigned 16-bit integers

hipResViewFormatUnsignedShort2 

2 channels, unsigned 16-bit integers

hipResViewFormatUnsignedShort4 

4 channels, unsigned 16-bit integers

hipResViewFormatSignedShort1 

1 channel, signed 16-bit integers

hipResViewFormatSignedShort2 

2 channels, signed 16-bit integers

hipResViewFormatSignedShort4 

4 channels, signed 16-bit integers

hipResViewFormatUnsignedInt1 

1 channel, unsigned 32-bit integers

hipResViewFormatUnsignedInt2 

2 channels, unsigned 32-bit integers

hipResViewFormatUnsignedInt4 

4 channels, unsigned 32-bit integers

hipResViewFormatSignedInt1 

1 channel, signed 32-bit integers

hipResViewFormatSignedInt2 

2 channels, signed 32-bit integers

hipResViewFormatSignedInt4 

4 channels, signed 32-bit integers

hipResViewFormatHalf1 

1 channel, 16-bit floating point

hipResViewFormatHalf2 

2 channels, 16-bit floating point

hipResViewFormatHalf4 

4 channels, 16-bit floating point

hipResViewFormatFloat1 

1 channel, 32-bit floating point

hipResViewFormatFloat2 

2 channels, 32-bit floating point

hipResViewFormatFloat4 

4 channels, 32-bit floating point

hipResViewFormatUnsignedBlockCompressed1 

Block-compressed 1.

hipResViewFormatUnsignedBlockCompressed2 

Block-compressed 2.

hipResViewFormatUnsignedBlockCompressed3 

Block-compressed 3.

hipResViewFormatUnsignedBlockCompressed4 

Block-compressed 4 unsigned.

hipResViewFormatSignedBlockCompressed4 

Block-compressed 4 signed.

hipResViewFormatUnsignedBlockCompressed5 

Block-compressed 5 unsigned.

hipResViewFormatSignedBlockCompressed5 

Block-compressed 5 signed.

hipResViewFormatUnsignedBlockCompressed6H 

Block-compressed 6 unsigned half-float.

hipResViewFormatSignedBlockCompressed6H 

Block-compressed 6 signed half-float.

hipResViewFormatUnsignedBlockCompressed7 

Block-compressed 7.

◆ HIPresourceViewFormat

HIP texture resource view formats

Enumerator
HIP_RES_VIEW_FORMAT_NONE 

No resource view format (use underlying resource format)

HIP_RES_VIEW_FORMAT_UINT_1X8 

1 channel, unsigned 8-bit integers

HIP_RES_VIEW_FORMAT_UINT_2X8 

2 channels, unsigned 8-bit integers

HIP_RES_VIEW_FORMAT_UINT_4X8 

4 channels, unsigned 8-bit integers

HIP_RES_VIEW_FORMAT_SINT_1X8 

1 channel, signed 8-bit integers

HIP_RES_VIEW_FORMAT_SINT_2X8 

2 channels, signed 8-bit integers

HIP_RES_VIEW_FORMAT_SINT_4X8 

4 channels, signed 8-bit integers

HIP_RES_VIEW_FORMAT_UINT_1X16 

1 channel, unsigned 16-bit integers

HIP_RES_VIEW_FORMAT_UINT_2X16 

2 channels, unsigned 16-bit integers

HIP_RES_VIEW_FORMAT_UINT_4X16 

4 channels, unsigned 16-bit integers

HIP_RES_VIEW_FORMAT_SINT_1X16 

1 channel, signed 16-bit integers

HIP_RES_VIEW_FORMAT_SINT_2X16 

2 channels, signed 16-bit integers

HIP_RES_VIEW_FORMAT_SINT_4X16 

4 channels, signed 16-bit integers

HIP_RES_VIEW_FORMAT_UINT_1X32 

1 channel, unsigned 32-bit integers

HIP_RES_VIEW_FORMAT_UINT_2X32 

2 channels, unsigned 32-bit integers

HIP_RES_VIEW_FORMAT_UINT_4X32 

4 channels, unsigned 32-bit integers

HIP_RES_VIEW_FORMAT_SINT_1X32 

1 channel, signed 32-bit integers

HIP_RES_VIEW_FORMAT_SINT_2X32 

2 channels, signed 32-bit integers

HIP_RES_VIEW_FORMAT_SINT_4X32 

4 channels, signed 32-bit integers

HIP_RES_VIEW_FORMAT_FLOAT_1X16 

1 channel, 16-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_2X16 

2 channels, 16-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_4X16 

4 channels, 16-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_1X32 

1 channel, 32-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_2X32 

2 channels, 32-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_4X32 

4 channels, 32-bit floating point

HIP_RES_VIEW_FORMAT_UNSIGNED_BC1 

Block-compressed 1.

HIP_RES_VIEW_FORMAT_UNSIGNED_BC2 

Block-compressed 2.

HIP_RES_VIEW_FORMAT_UNSIGNED_BC3 

Block-compressed 3.

HIP_RES_VIEW_FORMAT_UNSIGNED_BC4 

Block-compressed 4 unsigned.

HIP_RES_VIEW_FORMAT_SIGNED_BC4 

Block-compressed 4 signed.

HIP_RES_VIEW_FORMAT_UNSIGNED_BC5 

Block-compressed 5 unsigned.

HIP_RES_VIEW_FORMAT_SIGNED_BC5 

Block-compressed 5 signed.

HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H 

Block-compressed 6 unsigned half-float.

HIP_RES_VIEW_FORMAT_SIGNED_BC6H 

Block-compressed 6 signed half-float.

HIP_RES_VIEW_FORMAT_UNSIGNED_BC7 

Block-compressed 7.