23 #ifndef HIP_INCLUDE_HIP_HCC_DETAIL_DRIVER_TYPES_H
24 #define HIP_INCLUDE_HIP_HCC_DETAIL_DRIVER_TYPES_H
30 typedef void* hipDeviceptr_t;
31 typedef enum hipChannelFormatKind {
32 hipChannelFormatKindSigned = 0,
33 hipChannelFormatKindUnsigned = 1,
34 hipChannelFormatKindFloat = 2,
35 hipChannelFormatKindNone = 3
36 }hipChannelFormatKind;
43 enum hipChannelFormatKind f;
46 #define HIP_TRSA_OVERRIDE_FORMAT 0x01
47 #define HIP_TRSF_READ_AS_INTEGER 0x01
48 #define HIP_TRSF_NORMALIZED_COORDINATES 0x02
49 #define HIP_TRSF_SRGB 0x10
51 typedef enum hipArray_Format {
52 HIP_AD_FORMAT_UNSIGNED_INT8 = 0x01,
53 HIP_AD_FORMAT_UNSIGNED_INT16 = 0x02,
54 HIP_AD_FORMAT_UNSIGNED_INT32 = 0x03,
55 HIP_AD_FORMAT_SIGNED_INT8 = 0x08,
56 HIP_AD_FORMAT_SIGNED_INT16 = 0x09,
57 HIP_AD_FORMAT_SIGNED_INT32 = 0x0a,
58 HIP_AD_FORMAT_HALF = 0x10,
59 HIP_AD_FORMAT_FLOAT = 0x20
65 enum hipArray_Format Format;
66 unsigned int NumChannels;
73 enum hipArray_Format Format;
74 unsigned int NumChannels;
85 enum hipArray_Format Format;
86 unsigned int NumChannels;
88 unsigned int textureType;
96 hipDeviceptr_t srcDevice;
103 hipDeviceptr_t dstDevice;
131 typedef enum hipResourceType {
132 hipResourceTypeArray = 0x00,
133 hipResourceTypeMipmappedArray = 0x01,
134 hipResourceTypeLinear = 0x02,
135 hipResourceTypePitch2D = 0x03
138 typedef enum HIPresourcetype_enum {
139 HIP_RESOURCE_TYPE_ARRAY = 0x00,
140 HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY = 0x01,
141 HIP_RESOURCE_TYPE_LINEAR = 0x02,
142 HIP_RESOURCE_TYPE_PITCH2D = 0x03
148 typedef enum HIPaddress_mode_enum {
149 HIP_TR_ADDRESS_MODE_WRAP = 0,
150 HIP_TR_ADDRESS_MODE_CLAMP = 1,
151 HIP_TR_ADDRESS_MODE_MIRROR = 2,
152 HIP_TR_ADDRESS_MODE_BORDER = 3
158 typedef enum HIPfilter_mode_enum {
159 HIP_TR_FILTER_MODE_POINT = 0,
160 HIP_TR_FILTER_MODE_LINEAR = 1
182 typedef enum hipResourceViewFormat {
183 hipResViewFormatNone = 0x00,
184 hipResViewFormatUnsignedChar1 = 0x01,
185 hipResViewFormatUnsignedChar2 = 0x02,
186 hipResViewFormatUnsignedChar4 = 0x03,
187 hipResViewFormatSignedChar1 = 0x04,
188 hipResViewFormatSignedChar2 = 0x05,
189 hipResViewFormatSignedChar4 = 0x06,
190 hipResViewFormatUnsignedShort1 = 0x07,
191 hipResViewFormatUnsignedShort2 = 0x08,
192 hipResViewFormatUnsignedShort4 = 0x09,
193 hipResViewFormatSignedShort1 = 0x0a,
194 hipResViewFormatSignedShort2 = 0x0b,
195 hipResViewFormatSignedShort4 = 0x0c,
196 hipResViewFormatUnsignedInt1 = 0x0d,
197 hipResViewFormatUnsignedInt2 = 0x0e,
198 hipResViewFormatUnsignedInt4 = 0x0f,
199 hipResViewFormatSignedInt1 = 0x10,
200 hipResViewFormatSignedInt2 = 0x11,
201 hipResViewFormatSignedInt4 = 0x12,
202 hipResViewFormatHalf1 = 0x13,
203 hipResViewFormatHalf2 = 0x14,
204 hipResViewFormatHalf4 = 0x15,
205 hipResViewFormatFloat1 = 0x16,
206 hipResViewFormatFloat2 = 0x17,
207 hipResViewFormatFloat4 = 0x18,
208 hipResViewFormatUnsignedBlockCompressed1 = 0x19,
209 hipResViewFormatUnsignedBlockCompressed2 = 0x1a,
210 hipResViewFormatUnsignedBlockCompressed3 = 0x1b,
211 hipResViewFormatUnsignedBlockCompressed4 = 0x1c,
212 hipResViewFormatSignedBlockCompressed4 = 0x1d,
213 hipResViewFormatUnsignedBlockCompressed5 = 0x1e,
214 hipResViewFormatSignedBlockCompressed5 = 0x1f,
215 hipResViewFormatUnsignedBlockCompressed6H = 0x20,
216 hipResViewFormatSignedBlockCompressed6H = 0x21,
217 hipResViewFormatUnsignedBlockCompressed7 = 0x22
218 }hipResourceViewFormat;
220 typedef enum HIPresourceViewFormat_enum
222 HIP_RES_VIEW_FORMAT_NONE = 0x00,
223 HIP_RES_VIEW_FORMAT_UINT_1X8 = 0x01,
224 HIP_RES_VIEW_FORMAT_UINT_2X8 = 0x02,
225 HIP_RES_VIEW_FORMAT_UINT_4X8 = 0x03,
226 HIP_RES_VIEW_FORMAT_SINT_1X8 = 0x04,
227 HIP_RES_VIEW_FORMAT_SINT_2X8 = 0x05,
228 HIP_RES_VIEW_FORMAT_SINT_4X8 = 0x06,
229 HIP_RES_VIEW_FORMAT_UINT_1X16 = 0x07,
230 HIP_RES_VIEW_FORMAT_UINT_2X16 = 0x08,
231 HIP_RES_VIEW_FORMAT_UINT_4X16 = 0x09,
232 HIP_RES_VIEW_FORMAT_SINT_1X16 = 0x0a,
233 HIP_RES_VIEW_FORMAT_SINT_2X16 = 0x0b,
234 HIP_RES_VIEW_FORMAT_SINT_4X16 = 0x0c,
235 HIP_RES_VIEW_FORMAT_UINT_1X32 = 0x0d,
236 HIP_RES_VIEW_FORMAT_UINT_2X32 = 0x0e,
237 HIP_RES_VIEW_FORMAT_UINT_4X32 = 0x0f,
238 HIP_RES_VIEW_FORMAT_SINT_1X32 = 0x10,
239 HIP_RES_VIEW_FORMAT_SINT_2X32 = 0x11,
240 HIP_RES_VIEW_FORMAT_SINT_4X32 = 0x12,
241 HIP_RES_VIEW_FORMAT_FLOAT_1X16 = 0x13,
242 HIP_RES_VIEW_FORMAT_FLOAT_2X16 = 0x14,
243 HIP_RES_VIEW_FORMAT_FLOAT_4X16 = 0x15,
244 HIP_RES_VIEW_FORMAT_FLOAT_1X32 = 0x16,
245 HIP_RES_VIEW_FORMAT_FLOAT_2X32 = 0x17,
246 HIP_RES_VIEW_FORMAT_FLOAT_4X32 = 0x18,
247 HIP_RES_VIEW_FORMAT_UNSIGNED_BC1 = 0x19,
248 HIP_RES_VIEW_FORMAT_UNSIGNED_BC2 = 0x1a,
249 HIP_RES_VIEW_FORMAT_UNSIGNED_BC3 = 0x1b,
250 HIP_RES_VIEW_FORMAT_UNSIGNED_BC4 = 0x1c,
251 HIP_RES_VIEW_FORMAT_SIGNED_BC4 = 0x1d,
252 HIP_RES_VIEW_FORMAT_UNSIGNED_BC5 = 0x1e,
253 HIP_RES_VIEW_FORMAT_SIGNED_BC5 = 0x1f,
254 HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H = 0x20,
255 HIP_RES_VIEW_FORMAT_SIGNED_BC6H = 0x21,
256 HIP_RES_VIEW_FORMAT_UNSIGNED_BC7 = 0x22
257 } HIPresourceViewFormat;
263 enum hipResourceType resType;
324 enum hipResourceViewFormat format;
328 unsigned int firstMipmapLevel;
329 unsigned int lastMipmapLevel;
330 unsigned int firstLayer;
331 unsigned int lastLayer;
347 unsigned int reserved[16];
354 typedef enum hipMemcpyKind {
355 hipMemcpyHostToHost = 0,
356 hipMemcpyHostToDevice = 1,
357 hipMemcpyDeviceToHost = 2,
358 hipMemcpyDeviceToDevice = 3,
391 enum hipMemcpyKind kind;
395 unsigned int srcXInBytes;
401 hipDeviceptr_t srcDevice;
403 unsigned int srcPitch;
404 unsigned int srcHeight;
405 unsigned int dstXInBytes;
411 hipDeviceptr_t dstDevice;
413 unsigned int dstPitch;
414 unsigned int dstHeight;
415 unsigned int WidthInBytes;
420 static inline struct hipPitchedPtr make_hipPitchedPtr(void* d,
size_t p,
size_t xsz,
432 static inline struct hipPos make_hipPos(size_t x, size_t y, size_t z) {
442 static inline struct hipExtent make_hipExtent(size_t w, size_t h, size_t d) {
452 typedef enum hipFunction_attribute {
453 HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK,
454 HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES,
455 HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES,
456 HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES,
457 HIP_FUNC_ATTRIBUTE_NUM_REGS,
458 HIP_FUNC_ATTRIBUTE_PTX_VERSION,
459 HIP_FUNC_ATTRIBUTE_BINARY_VERSION,
460 HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA,
461 HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES,
462 HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT,
463 HIP_FUNC_ATTRIBUTE_MAX
464 }hipFunction_attribute;