23#ifndef HIP_INCLUDE_HIP_DRIVER_TYPES_H
24#define HIP_INCLUDE_HIP_DRIVER_TYPES_H
26#include <hip/hip_common.h>
28#if !(defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && (defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__))
29#include "driver_types.h"
30#elif (defined(__HIP_PLATFORM_HCC__) || defined(__HIP_PLATFORM_AMD__)) && !(defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_PLATFORM_NVIDIA__))
34#define HIP_INCLUDE_HIP_HCC_DETAIL_DRIVER_TYPES_H
35#if !defined(__HIPCC_RTC__)
40typedef void* hipDeviceptr_t;
41typedef enum hipChannelFormatKind {
42 hipChannelFormatKindSigned = 0,
43 hipChannelFormatKindUnsigned = 1,
44 hipChannelFormatKindFloat = 2,
45 hipChannelFormatKindNone = 3
52 enum hipChannelFormatKind f;
54#define HIP_TRSA_OVERRIDE_FORMAT 0x01
55#define HIP_TRSF_READ_AS_INTEGER 0x01
56#define HIP_TRSF_NORMALIZED_COORDINATES 0x02
57#define HIP_TRSF_SRGB 0x10
58typedef enum hipArray_Format {
59 HIP_AD_FORMAT_UNSIGNED_INT8 = 0x01,
60 HIP_AD_FORMAT_UNSIGNED_INT16 = 0x02,
61 HIP_AD_FORMAT_UNSIGNED_INT32 = 0x03,
62 HIP_AD_FORMAT_SIGNED_INT8 = 0x08,
63 HIP_AD_FORMAT_SIGNED_INT16 = 0x09,
64 HIP_AD_FORMAT_SIGNED_INT32 = 0x0a,
65 HIP_AD_FORMAT_HALF = 0x10,
66 HIP_AD_FORMAT_FLOAT = 0x20
71 enum hipArray_Format Format;
72 unsigned int NumChannels;
78 enum hipArray_Format Format;
79 unsigned int NumChannels;
89 enum hipArray_Format Format;
90 unsigned int NumChannels;
92 unsigned int textureType;
94#if !defined(__HIPCC_RTC__)
100 hipDeviceptr_t srcDevice;
107 hipDeviceptr_t dstDevice;
124 unsigned int min_mipmap_level;
125 unsigned int max_mipmap_level;
127 enum hipArray_Format format;
134typedef enum hipResourceType {
135 hipResourceTypeArray = 0x00,
136 hipResourceTypeMipmappedArray = 0x01,
137 hipResourceTypeLinear = 0x02,
138 hipResourceTypePitch2D = 0x03
140typedef enum HIPresourcetype_enum {
141 HIP_RESOURCE_TYPE_ARRAY = 0x00,
142 HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY = 0x01,
143 HIP_RESOURCE_TYPE_LINEAR = 0x02,
144 HIP_RESOURCE_TYPE_PITCH2D = 0x03
149typedef enum HIPaddress_mode_enum {
150 HIP_TR_ADDRESS_MODE_WRAP = 0,
151 HIP_TR_ADDRESS_MODE_CLAMP = 1,
152 HIP_TR_ADDRESS_MODE_MIRROR = 2,
153 HIP_TR_ADDRESS_MODE_BORDER = 3
158typedef enum HIPfilter_mode_enum {
159 HIP_TR_FILTER_MODE_POINT = 0,
160 HIP_TR_FILTER_MODE_LINEAR = 1
180typedef enum hipResourceViewFormat {
181 hipResViewFormatNone = 0x00,
182 hipResViewFormatUnsignedChar1 = 0x01,
183 hipResViewFormatUnsignedChar2 = 0x02,
184 hipResViewFormatUnsignedChar4 = 0x03,
185 hipResViewFormatSignedChar1 = 0x04,
186 hipResViewFormatSignedChar2 = 0x05,
187 hipResViewFormatSignedChar4 = 0x06,
188 hipResViewFormatUnsignedShort1 = 0x07,
189 hipResViewFormatUnsignedShort2 = 0x08,
190 hipResViewFormatUnsignedShort4 = 0x09,
191 hipResViewFormatSignedShort1 = 0x0a,
192 hipResViewFormatSignedShort2 = 0x0b,
193 hipResViewFormatSignedShort4 = 0x0c,
194 hipResViewFormatUnsignedInt1 = 0x0d,
195 hipResViewFormatUnsignedInt2 = 0x0e,
196 hipResViewFormatUnsignedInt4 = 0x0f,
197 hipResViewFormatSignedInt1 = 0x10,
198 hipResViewFormatSignedInt2 = 0x11,
199 hipResViewFormatSignedInt4 = 0x12,
200 hipResViewFormatHalf1 = 0x13,
201 hipResViewFormatHalf2 = 0x14,
202 hipResViewFormatHalf4 = 0x15,
203 hipResViewFormatFloat1 = 0x16,
204 hipResViewFormatFloat2 = 0x17,
205 hipResViewFormatFloat4 = 0x18,
206 hipResViewFormatUnsignedBlockCompressed1 = 0x19,
207 hipResViewFormatUnsignedBlockCompressed2 = 0x1a,
208 hipResViewFormatUnsignedBlockCompressed3 = 0x1b,
209 hipResViewFormatUnsignedBlockCompressed4 = 0x1c,
210 hipResViewFormatSignedBlockCompressed4 = 0x1d,
211 hipResViewFormatUnsignedBlockCompressed5 = 0x1e,
212 hipResViewFormatSignedBlockCompressed5 = 0x1f,
213 hipResViewFormatUnsignedBlockCompressed6H = 0x20,
214 hipResViewFormatSignedBlockCompressed6H = 0x21,
215 hipResViewFormatUnsignedBlockCompressed7 = 0x22
216}hipResourceViewFormat;
217typedef enum HIPresourceViewFormat_enum
219 HIP_RES_VIEW_FORMAT_NONE = 0x00,
220 HIP_RES_VIEW_FORMAT_UINT_1X8 = 0x01,
221 HIP_RES_VIEW_FORMAT_UINT_2X8 = 0x02,
222 HIP_RES_VIEW_FORMAT_UINT_4X8 = 0x03,
223 HIP_RES_VIEW_FORMAT_SINT_1X8 = 0x04,
224 HIP_RES_VIEW_FORMAT_SINT_2X8 = 0x05,
225 HIP_RES_VIEW_FORMAT_SINT_4X8 = 0x06,
226 HIP_RES_VIEW_FORMAT_UINT_1X16 = 0x07,
227 HIP_RES_VIEW_FORMAT_UINT_2X16 = 0x08,
228 HIP_RES_VIEW_FORMAT_UINT_4X16 = 0x09,
229 HIP_RES_VIEW_FORMAT_SINT_1X16 = 0x0a,
230 HIP_RES_VIEW_FORMAT_SINT_2X16 = 0x0b,
231 HIP_RES_VIEW_FORMAT_SINT_4X16 = 0x0c,
232 HIP_RES_VIEW_FORMAT_UINT_1X32 = 0x0d,
233 HIP_RES_VIEW_FORMAT_UINT_2X32 = 0x0e,
234 HIP_RES_VIEW_FORMAT_UINT_4X32 = 0x0f,
235 HIP_RES_VIEW_FORMAT_SINT_1X32 = 0x10,
236 HIP_RES_VIEW_FORMAT_SINT_2X32 = 0x11,
237 HIP_RES_VIEW_FORMAT_SINT_4X32 = 0x12,
238 HIP_RES_VIEW_FORMAT_FLOAT_1X16 = 0x13,
239 HIP_RES_VIEW_FORMAT_FLOAT_2X16 = 0x14,
240 HIP_RES_VIEW_FORMAT_FLOAT_4X16 = 0x15,
241 HIP_RES_VIEW_FORMAT_FLOAT_1X32 = 0x16,
242 HIP_RES_VIEW_FORMAT_FLOAT_2X32 = 0x17,
243 HIP_RES_VIEW_FORMAT_FLOAT_4X32 = 0x18,
244 HIP_RES_VIEW_FORMAT_UNSIGNED_BC1 = 0x19,
245 HIP_RES_VIEW_FORMAT_UNSIGNED_BC2 = 0x1a,
246 HIP_RES_VIEW_FORMAT_UNSIGNED_BC3 = 0x1b,
247 HIP_RES_VIEW_FORMAT_UNSIGNED_BC4 = 0x1c,
248 HIP_RES_VIEW_FORMAT_SIGNED_BC4 = 0x1d,
249 HIP_RES_VIEW_FORMAT_UNSIGNED_BC5 = 0x1e,
250 HIP_RES_VIEW_FORMAT_SIGNED_BC5 = 0x1f,
251 HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H = 0x20,
252 HIP_RES_VIEW_FORMAT_SIGNED_BC6H = 0x21,
253 HIP_RES_VIEW_FORMAT_UNSIGNED_BC7 = 0x22
254} HIPresourceViewFormat;
259 enum hipResourceType resType;
315 enum hipResourceViewFormat format;
319 unsigned int firstMipmapLevel;
320 unsigned int lastMipmapLevel;
321 unsigned int firstLayer;
322 unsigned int lastLayer;
337 unsigned int reserved[16];
343#if !defined(__HIPCC_RTC__)
344typedef enum hipMemcpyKind {
345 hipMemcpyHostToHost = 0,
346 hipMemcpyHostToDevice = 1,
347 hipMemcpyDeviceToHost = 2,
348 hipMemcpyDeviceToDevice = 3,
377 enum hipMemcpyKind kind;
380 unsigned int srcXInBytes;
386 hipDeviceptr_t srcDevice;
388 unsigned int srcPitch;
389 unsigned int srcHeight;
390 unsigned int dstXInBytes;
396 hipDeviceptr_t dstDevice;
398 unsigned int dstPitch;
399 unsigned int dstHeight;
400 unsigned int WidthInBytes;
404static inline struct hipPitchedPtr make_hipPitchedPtr(void* d,
size_t p,
size_t xsz,
413static inline struct hipPos make_hipPos(size_t x, size_t y, size_t z) {
420static inline struct hipExtent make_hipExtent(size_t w, size_t h, size_t d) {
427typedef enum hipFunction_attribute {
428 HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK,
429 HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES,
430 HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES,
431 HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES,
432 HIP_FUNC_ATTRIBUTE_NUM_REGS,
433 HIP_FUNC_ATTRIBUTE_PTX_VERSION,
434 HIP_FUNC_ATTRIBUTE_BINARY_VERSION,
435 HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA,
436 HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES,
437 HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT,
438 HIP_FUNC_ATTRIBUTE_MAX
439} hipFunction_attribute;
441typedef enum hipPointer_attribute {
442 HIP_POINTER_ATTRIBUTE_CONTEXT = 1,
444 HIP_POINTER_ATTRIBUTE_MEMORY_TYPE,
445 HIP_POINTER_ATTRIBUTE_DEVICE_POINTER,
446 HIP_POINTER_ATTRIBUTE_HOST_POINTER,
447 HIP_POINTER_ATTRIBUTE_P2P_TOKENS,
449 HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS,
451 HIP_POINTER_ATTRIBUTE_BUFFER_ID,
452 HIP_POINTER_ATTRIBUTE_IS_MANAGED,
453 HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL,
455 HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE,
458 HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR,
459 HIP_POINTER_ATTRIBUTE_RANGE_SIZE,
460 HIP_POINTER_ATTRIBUTE_MAPPED,
462 HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES,
464 HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE,
467 HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS,
469 HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE
472} hipPointer_attribute;
476#error("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
hipMemoryType
Definition hip_runtime_api.h:159
Definition driver_types.h:74
Definition driver_types.h:68
Definition driver_types.h:379
Definition driver_types.h:282
hipArray_t hArray
Definition driver_types.h:286
HIPresourcetype resType
Definition driver_types.h:283
unsigned int numChannels
Definition driver_types.h:294
hipMipmappedArray_t hMipmappedArray
Definition driver_types.h:289
hipArray_Format format
Definition driver_types.h:293
unsigned int flags
Definition driver_types.h:309
size_t pitchInBytes
Definition driver_types.h:303
size_t width
Definition driver_types.h:301
size_t height
Definition driver_types.h:302
size_t sizeInBytes
Definition driver_types.h:295
hipDeviceptr_t devPtr
Definition driver_types.h:292
Definition driver_types.h:328
size_t width
Definition driver_types.h:330
unsigned int firstLayer
Definition driver_types.h:335
unsigned int lastMipmapLevel
Definition driver_types.h:334
size_t depth
Definition driver_types.h:332
unsigned int lastLayer
Definition driver_types.h:336
unsigned int firstMipmapLevel
Definition driver_types.h:333
size_t height
Definition driver_types.h:331
HIPresourceViewFormat format
Definition driver_types.h:329
Definition driver_types.h:165
float maxMipmapLevelClamp
Definition driver_types.h:173
unsigned int maxAnisotropy
Definition driver_types.h:169
float mipmapLevelBias
Definition driver_types.h:171
unsigned int flags
Definition driver_types.h:168
float borderColor[4]
Definition driver_types.h:174
HIPaddress_mode addressMode[3]
Definition driver_types.h:166
HIPfilter_mode mipmapFilterMode
Definition driver_types.h:170
float minMipmapLevelClamp
Definition driver_types.h:172
HIPfilter_mode filterMode
Definition driver_types.h:167
Definition driver_types.h:82
Definition driver_types.h:358
Definition driver_types.h:369
Definition driver_types.h:117
Definition driver_types.h:352
Definition driver_types.h:364
Definition driver_types.h:258
Definition driver_types.h:314
Definition driver_types.h:95