/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-hip/checkouts/latest/include/hip/driver_types.h File Reference#

HIP Runtime API Reference: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-hip/checkouts/latest/include/hip/driver_types.h File Reference
driver_types.h File Reference
#include <hip/hip_common.h>
#include <stdbool.h>
Include dependency graph for driver_types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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
 

Macros

#define HIP_TRSA_OVERRIDE_FORMAT   0x01
 
#define HIP_TRSF_READ_AS_INTEGER   0x01
 
#define HIP_TRSF_NORMALIZED_COORDINATES   0x02
 
#define HIP_TRSF_SRGB   0x10
 

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  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_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
}
 

Macro Definition Documentation

◆ HIP_TRSA_OVERRIDE_FORMAT

#define HIP_TRSA_OVERRIDE_FORMAT   0x01

◆ HIP_TRSF_NORMALIZED_COORDINATES

#define HIP_TRSF_NORMALIZED_COORDINATES   0x02

◆ HIP_TRSF_READ_AS_INTEGER

#define HIP_TRSF_READ_AS_INTEGER   0x01

◆ HIP_TRSF_SRGB

#define HIP_TRSF_SRGB   0x10

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 address modes

Enumerator
HIP_TR_ADDRESS_MODE_WRAP 
HIP_TR_ADDRESS_MODE_CLAMP 
HIP_TR_ADDRESS_MODE_MIRROR 
HIP_TR_ADDRESS_MODE_BORDER 

◆ hipArray_Format

Enumerator
HIP_AD_FORMAT_UNSIGNED_INT8 
HIP_AD_FORMAT_UNSIGNED_INT16 
HIP_AD_FORMAT_UNSIGNED_INT32 
HIP_AD_FORMAT_SIGNED_INT8 
HIP_AD_FORMAT_SIGNED_INT16 
HIP_AD_FORMAT_SIGNED_INT32 
HIP_AD_FORMAT_HALF 
HIP_AD_FORMAT_FLOAT 

◆ hipChannelFormatKind

Enumerator
hipChannelFormatKindSigned 
hipChannelFormatKindUnsigned 
hipChannelFormatKindFloat 
hipChannelFormatKindNone 

◆ HIPfilter_mode

hip filter modes

Enumerator
HIP_TR_FILTER_MODE_POINT 
HIP_TR_FILTER_MODE_LINEAR 

◆ hipFunction_attribute

Enumerator
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_MAX 

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

◆ hipPointer_attribute

Enumerator
HIP_POINTER_ATTRIBUTE_CONTEXT 

The context on which a pointer was allocated

Warning
- not supported in HIP
HIP_POINTER_ATTRIBUTE_MEMORY_TYPE 

memory type describing location of a pointer

HIP_POINTER_ATTRIBUTE_DEVICE_POINTER 

address at which the pointer is allocated on device

HIP_POINTER_ATTRIBUTE_HOST_POINTER 

address at which the pointer is allocated on host

HIP_POINTER_ATTRIBUTE_P2P_TOKENS 

A pair of tokens for use with linux kernel interface

Warning
- 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
- 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 

for this allocation

Bitmask of allowed hipmemAllocationHandleType

Warning
- 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
- 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
- not supported in HIP

◆ hipResourceType

hip resource types

Enumerator
hipResourceTypeArray 
hipResourceTypeMipmappedArray 
hipResourceTypeLinear 
hipResourceTypePitch2D 

◆ hipResourcetype

Enumerator
HIP_RESOURCE_TYPE_ARRAY 

Array resoure

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 
hipResViewFormatUnsignedChar1 
hipResViewFormatUnsignedChar2 
hipResViewFormatUnsignedChar4 
hipResViewFormatSignedChar1 
hipResViewFormatSignedChar2 
hipResViewFormatSignedChar4 
hipResViewFormatUnsignedShort1 
hipResViewFormatUnsignedShort2 
hipResViewFormatUnsignedShort4 
hipResViewFormatSignedShort1 
hipResViewFormatSignedShort2 
hipResViewFormatSignedShort4 
hipResViewFormatUnsignedInt1 
hipResViewFormatUnsignedInt2 
hipResViewFormatUnsignedInt4 
hipResViewFormatSignedInt1 
hipResViewFormatSignedInt2 
hipResViewFormatSignedInt4 
hipResViewFormatHalf1 
hipResViewFormatHalf2 
hipResViewFormatHalf4 
hipResViewFormatFloat1 
hipResViewFormatFloat2 
hipResViewFormatFloat4 
hipResViewFormatUnsignedBlockCompressed1 
hipResViewFormatUnsignedBlockCompressed2 
hipResViewFormatUnsignedBlockCompressed3 
hipResViewFormatUnsignedBlockCompressed4 
hipResViewFormatSignedBlockCompressed4 
hipResViewFormatUnsignedBlockCompressed5 
hipResViewFormatSignedBlockCompressed5 
hipResViewFormatUnsignedBlockCompressed6H 
hipResViewFormatSignedBlockCompressed6H 
hipResViewFormatUnsignedBlockCompressed7 

◆ HIPresourceViewFormat

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 channel unsigned 8-bit integers

HIP_RES_VIEW_FORMAT_UINT_4X8 

4 channel unsigned 8-bit integers

HIP_RES_VIEW_FORMAT_SINT_1X8 

1 channel signed 8-bit integers

HIP_RES_VIEW_FORMAT_SINT_2X8 

2 channel signed 8-bit integers

HIP_RES_VIEW_FORMAT_SINT_4X8 

4 channel signed 8-bit integers

HIP_RES_VIEW_FORMAT_UINT_1X16 

1 channel unsigned 16-bit integers

HIP_RES_VIEW_FORMAT_UINT_2X16 

2 channel unsigned 16-bit integers

HIP_RES_VIEW_FORMAT_UINT_4X16 

4 channel unsigned 16-bit integers

HIP_RES_VIEW_FORMAT_SINT_1X16 

1 channel signed 16-bit integers

HIP_RES_VIEW_FORMAT_SINT_2X16 

2 channel signed 16-bit integers

HIP_RES_VIEW_FORMAT_SINT_4X16 

4 channel signed 16-bit integers

HIP_RES_VIEW_FORMAT_UINT_1X32 

1 channel unsigned 32-bit integers

HIP_RES_VIEW_FORMAT_UINT_2X32 

2 channel unsigned 32-bit integers

HIP_RES_VIEW_FORMAT_UINT_4X32 

4 channel unsigned 32-bit integers

HIP_RES_VIEW_FORMAT_SINT_1X32 

1 channel signed 32-bit integers

HIP_RES_VIEW_FORMAT_SINT_2X32 

2 channel signed 32-bit integers

HIP_RES_VIEW_FORMAT_SINT_4X32 

4 channel signed 32-bit integers

HIP_RES_VIEW_FORMAT_FLOAT_1X16 

1 channel 16-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_2X16 

2 channel 16-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_4X16 

4 channel 16-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_1X32 

1 channel 32-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_2X32 

2 channel 32-bit floating point

HIP_RES_VIEW_FORMAT_FLOAT_4X32 

4 channel 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