23 #ifndef HIP_INCLUDE_HIP_AMD_DETAIL_DRIVER_TYPES_H
24 #define HIP_INCLUDE_HIP_AMD_DETAIL_DRIVER_TYPES_H
28 #define HIP_INCLUDE_HIP_HCC_DETAIL_DRIVER_TYPES_H
30 #if !defined(__HIPCC_RTC__)
34 #endif // !defined(__HIPCC_RTC__)
36 typedef void* hipDeviceptr_t;
37 typedef enum hipChannelFormatKind {
38 hipChannelFormatKindSigned = 0,
39 hipChannelFormatKindUnsigned = 1,
40 hipChannelFormatKindFloat = 2,
41 hipChannelFormatKindNone = 3
42 }hipChannelFormatKind;
49 enum hipChannelFormatKind f;
52 #define HIP_TRSA_OVERRIDE_FORMAT 0x01
53 #define HIP_TRSF_READ_AS_INTEGER 0x01
54 #define HIP_TRSF_NORMALIZED_COORDINATES 0x02
55 #define HIP_TRSF_SRGB 0x10
57 typedef enum hipArray_Format {
58 HIP_AD_FORMAT_UNSIGNED_INT8 = 0x01,
59 HIP_AD_FORMAT_UNSIGNED_INT16 = 0x02,
60 HIP_AD_FORMAT_UNSIGNED_INT32 = 0x03,
61 HIP_AD_FORMAT_SIGNED_INT8 = 0x08,
62 HIP_AD_FORMAT_SIGNED_INT16 = 0x09,
63 HIP_AD_FORMAT_SIGNED_INT32 = 0x0a,
64 HIP_AD_FORMAT_HALF = 0x10,
65 HIP_AD_FORMAT_FLOAT = 0x20
71 enum hipArray_Format Format;
72 unsigned int NumChannels;
79 enum hipArray_Format Format;
80 unsigned int NumChannels;
91 enum hipArray_Format Format;
92 unsigned int NumChannels;
94 unsigned int textureType;
97 #if !defined(__HIPCC_RTC__)
103 hipDeviceptr_t srcDevice;
110 hipDeviceptr_t dstDevice;
116 #endif // !defined(__HIPCC_RTC__)
129 unsigned int min_mipmap_level;
130 unsigned int max_mipmap_level;
132 enum hipArray_Format format;
142 typedef enum hipResourceType {
143 hipResourceTypeArray = 0x00,
144 hipResourceTypeMipmappedArray = 0x01,
145 hipResourceTypeLinear = 0x02,
146 hipResourceTypePitch2D = 0x03
149 typedef enum HIPresourcetype_enum {
150 HIP_RESOURCE_TYPE_ARRAY = 0x00,
151 HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY = 0x01,
152 HIP_RESOURCE_TYPE_LINEAR = 0x02,
153 HIP_RESOURCE_TYPE_PITCH2D = 0x03
159 typedef enum HIPaddress_mode_enum {
160 HIP_TR_ADDRESS_MODE_WRAP = 0,
161 HIP_TR_ADDRESS_MODE_CLAMP = 1,
162 HIP_TR_ADDRESS_MODE_MIRROR = 2,
163 HIP_TR_ADDRESS_MODE_BORDER = 3
169 typedef enum HIPfilter_mode_enum {
170 HIP_TR_FILTER_MODE_POINT = 0,
171 HIP_TR_FILTER_MODE_LINEAR = 1
193 typedef enum hipResourceViewFormat {
194 hipResViewFormatNone = 0x00,
195 hipResViewFormatUnsignedChar1 = 0x01,
196 hipResViewFormatUnsignedChar2 = 0x02,
197 hipResViewFormatUnsignedChar4 = 0x03,
198 hipResViewFormatSignedChar1 = 0x04,
199 hipResViewFormatSignedChar2 = 0x05,
200 hipResViewFormatSignedChar4 = 0x06,
201 hipResViewFormatUnsignedShort1 = 0x07,
202 hipResViewFormatUnsignedShort2 = 0x08,
203 hipResViewFormatUnsignedShort4 = 0x09,
204 hipResViewFormatSignedShort1 = 0x0a,
205 hipResViewFormatSignedShort2 = 0x0b,
206 hipResViewFormatSignedShort4 = 0x0c,
207 hipResViewFormatUnsignedInt1 = 0x0d,
208 hipResViewFormatUnsignedInt2 = 0x0e,
209 hipResViewFormatUnsignedInt4 = 0x0f,
210 hipResViewFormatSignedInt1 = 0x10,
211 hipResViewFormatSignedInt2 = 0x11,
212 hipResViewFormatSignedInt4 = 0x12,
213 hipResViewFormatHalf1 = 0x13,
214 hipResViewFormatHalf2 = 0x14,
215 hipResViewFormatHalf4 = 0x15,
216 hipResViewFormatFloat1 = 0x16,
217 hipResViewFormatFloat2 = 0x17,
218 hipResViewFormatFloat4 = 0x18,
219 hipResViewFormatUnsignedBlockCompressed1 = 0x19,
220 hipResViewFormatUnsignedBlockCompressed2 = 0x1a,
221 hipResViewFormatUnsignedBlockCompressed3 = 0x1b,
222 hipResViewFormatUnsignedBlockCompressed4 = 0x1c,
223 hipResViewFormatSignedBlockCompressed4 = 0x1d,
224 hipResViewFormatUnsignedBlockCompressed5 = 0x1e,
225 hipResViewFormatSignedBlockCompressed5 = 0x1f,
226 hipResViewFormatUnsignedBlockCompressed6H = 0x20,
227 hipResViewFormatSignedBlockCompressed6H = 0x21,
228 hipResViewFormatUnsignedBlockCompressed7 = 0x22
229 }hipResourceViewFormat;
231 typedef enum HIPresourceViewFormat_enum
233 HIP_RES_VIEW_FORMAT_NONE = 0x00,
234 HIP_RES_VIEW_FORMAT_UINT_1X8 = 0x01,
235 HIP_RES_VIEW_FORMAT_UINT_2X8 = 0x02,
236 HIP_RES_VIEW_FORMAT_UINT_4X8 = 0x03,
237 HIP_RES_VIEW_FORMAT_SINT_1X8 = 0x04,
238 HIP_RES_VIEW_FORMAT_SINT_2X8 = 0x05,
239 HIP_RES_VIEW_FORMAT_SINT_4X8 = 0x06,
240 HIP_RES_VIEW_FORMAT_UINT_1X16 = 0x07,
241 HIP_RES_VIEW_FORMAT_UINT_2X16 = 0x08,
242 HIP_RES_VIEW_FORMAT_UINT_4X16 = 0x09,
243 HIP_RES_VIEW_FORMAT_SINT_1X16 = 0x0a,
244 HIP_RES_VIEW_FORMAT_SINT_2X16 = 0x0b,
245 HIP_RES_VIEW_FORMAT_SINT_4X16 = 0x0c,
246 HIP_RES_VIEW_FORMAT_UINT_1X32 = 0x0d,
247 HIP_RES_VIEW_FORMAT_UINT_2X32 = 0x0e,
248 HIP_RES_VIEW_FORMAT_UINT_4X32 = 0x0f,
249 HIP_RES_VIEW_FORMAT_SINT_1X32 = 0x10,
250 HIP_RES_VIEW_FORMAT_SINT_2X32 = 0x11,
251 HIP_RES_VIEW_FORMAT_SINT_4X32 = 0x12,
252 HIP_RES_VIEW_FORMAT_FLOAT_1X16 = 0x13,
253 HIP_RES_VIEW_FORMAT_FLOAT_2X16 = 0x14,
254 HIP_RES_VIEW_FORMAT_FLOAT_4X16 = 0x15,
255 HIP_RES_VIEW_FORMAT_FLOAT_1X32 = 0x16,
256 HIP_RES_VIEW_FORMAT_FLOAT_2X32 = 0x17,
257 HIP_RES_VIEW_FORMAT_FLOAT_4X32 = 0x18,
258 HIP_RES_VIEW_FORMAT_UNSIGNED_BC1 = 0x19,
259 HIP_RES_VIEW_FORMAT_UNSIGNED_BC2 = 0x1a,
260 HIP_RES_VIEW_FORMAT_UNSIGNED_BC3 = 0x1b,
261 HIP_RES_VIEW_FORMAT_UNSIGNED_BC4 = 0x1c,
262 HIP_RES_VIEW_FORMAT_SIGNED_BC4 = 0x1d,
263 HIP_RES_VIEW_FORMAT_UNSIGNED_BC5 = 0x1e,
264 HIP_RES_VIEW_FORMAT_SIGNED_BC5 = 0x1f,
265 HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H = 0x20,
266 HIP_RES_VIEW_FORMAT_SIGNED_BC6H = 0x21,
267 HIP_RES_VIEW_FORMAT_UNSIGNED_BC7 = 0x22
268 } HIPresourceViewFormat;
274 enum hipResourceType resType;
335 enum hipResourceViewFormat format;
339 unsigned int firstMipmapLevel;
340 unsigned int lastMipmapLevel;
341 unsigned int firstLayer;
342 unsigned int lastLayer;
358 unsigned int reserved[16];
365 #if !defined(__HIPCC_RTC__)
366 typedef enum hipMemcpyKind {
367 hipMemcpyHostToHost = 0,
368 hipMemcpyHostToDevice = 1,
369 hipMemcpyDeviceToHost = 2,
370 hipMemcpyDeviceToDevice = 3,
403 enum hipMemcpyKind kind;
407 unsigned int srcXInBytes;
413 hipDeviceptr_t srcDevice;
415 unsigned int srcPitch;
416 unsigned int srcHeight;
417 unsigned int dstXInBytes;
423 hipDeviceptr_t dstDevice;
425 unsigned int dstPitch;
426 unsigned int dstHeight;
427 unsigned int WidthInBytes;
432 static inline struct hipPitchedPtr make_hipPitchedPtr(void* d,
size_t p,
size_t xsz,
444 static inline struct hipPos make_hipPos(size_t x, size_t y, size_t z) {
454 static inline struct hipExtent make_hipExtent(size_t w, size_t h, size_t d) {
464 typedef enum hipFunction_attribute {
465 HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK,
466 HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES,
467 HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES,
468 HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES,
469 HIP_FUNC_ATTRIBUTE_NUM_REGS,
470 HIP_FUNC_ATTRIBUTE_PTX_VERSION,
471 HIP_FUNC_ATTRIBUTE_BINARY_VERSION,
472 HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA,
473 HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES,
474 HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT,
475 HIP_FUNC_ATTRIBUTE_MAX
476 }hipFunction_attribute;
477 #endif // !defined(__HIPCC_RTC__)