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
34 typedef void* hipDeviceptr_t;
35 typedef enum hipChannelFormatKind {
36 hipChannelFormatKindSigned = 0,
37 hipChannelFormatKindUnsigned = 1,
38 hipChannelFormatKindFloat = 2,
39 hipChannelFormatKindNone = 3
40 }hipChannelFormatKind;
47 enum hipChannelFormatKind f;
50 #define HIP_TRSA_OVERRIDE_FORMAT 0x01
51 #define HIP_TRSF_READ_AS_INTEGER 0x01
52 #define HIP_TRSF_NORMALIZED_COORDINATES 0x02
53 #define HIP_TRSF_SRGB 0x10
55 typedef enum hipArray_Format {
56 HIP_AD_FORMAT_UNSIGNED_INT8 = 0x01,
57 HIP_AD_FORMAT_UNSIGNED_INT16 = 0x02,
58 HIP_AD_FORMAT_UNSIGNED_INT32 = 0x03,
59 HIP_AD_FORMAT_SIGNED_INT8 = 0x08,
60 HIP_AD_FORMAT_SIGNED_INT16 = 0x09,
61 HIP_AD_FORMAT_SIGNED_INT32 = 0x0a,
62 HIP_AD_FORMAT_HALF = 0x10,
63 HIP_AD_FORMAT_FLOAT = 0x20
69 enum hipArray_Format Format;
70 unsigned int NumChannels;
77 enum hipArray_Format Format;
78 unsigned int NumChannels;
89 enum hipArray_Format Format;
90 unsigned int NumChannels;
92 unsigned int textureType;
100 hipDeviceptr_t srcDevice;
107 hipDeviceptr_t dstDevice;
135 typedef enum hipResourceType {
136 hipResourceTypeArray = 0x00,
137 hipResourceTypeMipmappedArray = 0x01,
138 hipResourceTypeLinear = 0x02,
139 hipResourceTypePitch2D = 0x03
142 typedef enum HIPresourcetype_enum {
143 HIP_RESOURCE_TYPE_ARRAY = 0x00,
144 HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY = 0x01,
145 HIP_RESOURCE_TYPE_LINEAR = 0x02,
146 HIP_RESOURCE_TYPE_PITCH2D = 0x03
152 typedef enum HIPaddress_mode_enum {
153 HIP_TR_ADDRESS_MODE_WRAP = 0,
154 HIP_TR_ADDRESS_MODE_CLAMP = 1,
155 HIP_TR_ADDRESS_MODE_MIRROR = 2,
156 HIP_TR_ADDRESS_MODE_BORDER = 3
162 typedef enum HIPfilter_mode_enum {
163 HIP_TR_FILTER_MODE_POINT = 0,
164 HIP_TR_FILTER_MODE_LINEAR = 1
186 typedef enum hipResourceViewFormat {
187 hipResViewFormatNone = 0x00,
188 hipResViewFormatUnsignedChar1 = 0x01,
189 hipResViewFormatUnsignedChar2 = 0x02,
190 hipResViewFormatUnsignedChar4 = 0x03,
191 hipResViewFormatSignedChar1 = 0x04,
192 hipResViewFormatSignedChar2 = 0x05,
193 hipResViewFormatSignedChar4 = 0x06,
194 hipResViewFormatUnsignedShort1 = 0x07,
195 hipResViewFormatUnsignedShort2 = 0x08,
196 hipResViewFormatUnsignedShort4 = 0x09,
197 hipResViewFormatSignedShort1 = 0x0a,
198 hipResViewFormatSignedShort2 = 0x0b,
199 hipResViewFormatSignedShort4 = 0x0c,
200 hipResViewFormatUnsignedInt1 = 0x0d,
201 hipResViewFormatUnsignedInt2 = 0x0e,
202 hipResViewFormatUnsignedInt4 = 0x0f,
203 hipResViewFormatSignedInt1 = 0x10,
204 hipResViewFormatSignedInt2 = 0x11,
205 hipResViewFormatSignedInt4 = 0x12,
206 hipResViewFormatHalf1 = 0x13,
207 hipResViewFormatHalf2 = 0x14,
208 hipResViewFormatHalf4 = 0x15,
209 hipResViewFormatFloat1 = 0x16,
210 hipResViewFormatFloat2 = 0x17,
211 hipResViewFormatFloat4 = 0x18,
212 hipResViewFormatUnsignedBlockCompressed1 = 0x19,
213 hipResViewFormatUnsignedBlockCompressed2 = 0x1a,
214 hipResViewFormatUnsignedBlockCompressed3 = 0x1b,
215 hipResViewFormatUnsignedBlockCompressed4 = 0x1c,
216 hipResViewFormatSignedBlockCompressed4 = 0x1d,
217 hipResViewFormatUnsignedBlockCompressed5 = 0x1e,
218 hipResViewFormatSignedBlockCompressed5 = 0x1f,
219 hipResViewFormatUnsignedBlockCompressed6H = 0x20,
220 hipResViewFormatSignedBlockCompressed6H = 0x21,
221 hipResViewFormatUnsignedBlockCompressed7 = 0x22
222 }hipResourceViewFormat;
224 typedef enum HIPresourceViewFormat_enum
226 HIP_RES_VIEW_FORMAT_NONE = 0x00,
227 HIP_RES_VIEW_FORMAT_UINT_1X8 = 0x01,
228 HIP_RES_VIEW_FORMAT_UINT_2X8 = 0x02,
229 HIP_RES_VIEW_FORMAT_UINT_4X8 = 0x03,
230 HIP_RES_VIEW_FORMAT_SINT_1X8 = 0x04,
231 HIP_RES_VIEW_FORMAT_SINT_2X8 = 0x05,
232 HIP_RES_VIEW_FORMAT_SINT_4X8 = 0x06,
233 HIP_RES_VIEW_FORMAT_UINT_1X16 = 0x07,
234 HIP_RES_VIEW_FORMAT_UINT_2X16 = 0x08,
235 HIP_RES_VIEW_FORMAT_UINT_4X16 = 0x09,
236 HIP_RES_VIEW_FORMAT_SINT_1X16 = 0x0a,
237 HIP_RES_VIEW_FORMAT_SINT_2X16 = 0x0b,
238 HIP_RES_VIEW_FORMAT_SINT_4X16 = 0x0c,
239 HIP_RES_VIEW_FORMAT_UINT_1X32 = 0x0d,
240 HIP_RES_VIEW_FORMAT_UINT_2X32 = 0x0e,
241 HIP_RES_VIEW_FORMAT_UINT_4X32 = 0x0f,
242 HIP_RES_VIEW_FORMAT_SINT_1X32 = 0x10,
243 HIP_RES_VIEW_FORMAT_SINT_2X32 = 0x11,
244 HIP_RES_VIEW_FORMAT_SINT_4X32 = 0x12,
245 HIP_RES_VIEW_FORMAT_FLOAT_1X16 = 0x13,
246 HIP_RES_VIEW_FORMAT_FLOAT_2X16 = 0x14,
247 HIP_RES_VIEW_FORMAT_FLOAT_4X16 = 0x15,
248 HIP_RES_VIEW_FORMAT_FLOAT_1X32 = 0x16,
249 HIP_RES_VIEW_FORMAT_FLOAT_2X32 = 0x17,
250 HIP_RES_VIEW_FORMAT_FLOAT_4X32 = 0x18,
251 HIP_RES_VIEW_FORMAT_UNSIGNED_BC1 = 0x19,
252 HIP_RES_VIEW_FORMAT_UNSIGNED_BC2 = 0x1a,
253 HIP_RES_VIEW_FORMAT_UNSIGNED_BC3 = 0x1b,
254 HIP_RES_VIEW_FORMAT_UNSIGNED_BC4 = 0x1c,
255 HIP_RES_VIEW_FORMAT_SIGNED_BC4 = 0x1d,
256 HIP_RES_VIEW_FORMAT_UNSIGNED_BC5 = 0x1e,
257 HIP_RES_VIEW_FORMAT_SIGNED_BC5 = 0x1f,
258 HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H = 0x20,
259 HIP_RES_VIEW_FORMAT_SIGNED_BC6H = 0x21,
260 HIP_RES_VIEW_FORMAT_UNSIGNED_BC7 = 0x22
261 } HIPresourceViewFormat;
267 enum hipResourceType resType;
328 enum hipResourceViewFormat format;
332 unsigned int firstMipmapLevel;
333 unsigned int lastMipmapLevel;
334 unsigned int firstLayer;
335 unsigned int lastLayer;
351 unsigned int reserved[16];
358 typedef enum hipMemcpyKind {
359 hipMemcpyHostToHost = 0,
360 hipMemcpyHostToDevice = 1,
361 hipMemcpyDeviceToHost = 2,
362 hipMemcpyDeviceToDevice = 3,
395 enum hipMemcpyKind kind;
399 unsigned int srcXInBytes;
405 hipDeviceptr_t srcDevice;
407 unsigned int srcPitch;
408 unsigned int srcHeight;
409 unsigned int dstXInBytes;
415 hipDeviceptr_t dstDevice;
417 unsigned int dstPitch;
418 unsigned int dstHeight;
419 unsigned int WidthInBytes;
424 static inline struct hipPitchedPtr make_hipPitchedPtr(void* d,
size_t p,
size_t xsz,
436 static inline struct hipPos make_hipPos(size_t x, size_t y, size_t z) {
446 static inline struct hipExtent make_hipExtent(size_t w, size_t h, size_t d) {
456 typedef enum hipFunction_attribute {
457 HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK,
458 HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES,
459 HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES,
460 HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES,
461 HIP_FUNC_ATTRIBUTE_NUM_REGS,
462 HIP_FUNC_ATTRIBUTE_PTX_VERSION,
463 HIP_FUNC_ATTRIBUTE_BINARY_VERSION,
464 HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA,
465 HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES,
466 HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT,
467 HIP_FUNC_ATTRIBUTE_MAX
468 }hipFunction_attribute;