1 module rocm.hip_runtime_api;
2 
3 extern (C):
4 @nogc:
5 nothrow:
6 
7 enum
8 {
9     HIP_SUCCESS = 0,
10     HIP_ERROR_INVALID_VALUE = 1,
11     HIP_ERROR_NOT_INITIALIZED = 2,
12     HIP_ERROR_LAUNCH_OUT_OF_RESOURCES = 3
13 }
14 
15 struct hipDeviceArch_t
16 {
17     import std.bitmanip : bitfields;
18 
19     mixin(bitfields!(uint, "hasGlobalInt32Atomics", 1, uint, "hasGlobalFloatAtomicExch", 1, uint,
20             "hasSharedInt32Atomics", 1, uint, "hasSharedFloatAtomicExch", 1, uint, "hasFloatAtomicAdd", 1, uint,
21             "hasGlobalInt64Atomics", 1, uint, "hasSharedInt64Atomics", 1, uint, "hasDoubles", 1, uint,
22             "hasWarpVote", 1, uint, "hasWarpBallot", 1, uint, "hasWarpShuffle", 1, uint, "hasFunnelShift",
23             1, uint, "hasThreadFenceSystem", 1, uint, "hasSyncThreadsExt", 1, uint,
24             "hasSurfaceFuncs", 1, uint, "has3dGrid", 1, uint,
25             "hasDynamicParallelism", 1, uint, "", 15));
26 }
27 
28 struct hipUUID_t
29 {
30     char[16] bytes;
31 }
32 
33 alias hipUUID = hipUUID_t;
34 
35 struct hipDeviceProp_t
36 {
37     char[256] name;
38     size_t totalGlobalMem;
39     size_t sharedMemPerBlock;
40     int regsPerBlock;
41     int warpSize;
42     int maxThreadsPerBlock;
43     int[3] maxThreadsDim;
44     int[3] maxGridSize;
45     int clockRate;
46     int memoryClockRate;
47     int memoryBusWidth;
48     size_t totalConstMem;
49     int major;
50 
51     int minor;
52 
53     int multiProcessorCount;
54     int l2CacheSize;
55     int maxThreadsPerMultiProcessor;
56     int computeMode;
57     int clockInstructionRate;
58 
59     hipDeviceArch_t arch;
60     int concurrentKernels;
61     int pciDomainID;
62     int pciBusID;
63     int pciDeviceID;
64     size_t maxSharedMemoryPerMultiProcessor;
65     int isMultiGpuBoard;
66     int canMapHostMemory;
67     int gcnArch;
68     char[256] gcnArchName;
69     int integrated;
70     int cooperativeLaunch;
71     int cooperativeMultiDeviceLaunch;
72     int maxTexture1DLinear;
73     int maxTexture1D;
74     int[2] maxTexture2D;
75     int[3] maxTexture3D;
76     uint* hdpMemFlushCntl;
77     uint* hdpRegFlushCntl;
78     size_t memPitch;
79     size_t textureAlignment;
80     size_t texturePitchAlignment;
81     int kernelExecTimeoutEnabled;
82     int ECCEnabled;
83     int tccDriver;
84     int cooperativeMultiDeviceUnmatchedFunc;
85 
86     int cooperativeMultiDeviceUnmatchedGridDim;
87 
88     int cooperativeMultiDeviceUnmatchedBlockDim;
89 
90     int cooperativeMultiDeviceUnmatchedSharedMem;
91 
92     int isLargeBar;
93     int asicRevision;
94     int managedMemory;
95     int directManagedMemAccessFromHost;
96     int concurrentManagedAccess;
97     int pageableMemoryAccess;
98 
99     int pageableMemoryAccessUsesHostPageTables;
100 }
101 
102 enum hipMemoryType
103 {
104     hipMemoryTypeHost = 0,
105     hipMemoryTypeDevice = 1,
106 
107     hipMemoryTypeArray = 2,
108 
109     hipMemoryTypeUnified = 3
110 }
111 
112 enum hipKernelNodeAttrID
113 {
114     hipKernelNodeAttributeAccessPolicyWindow = 1,
115     hipKernelNodeAttributeCooperative = 2
116 }
117 
118 enum hipAccessProperty
119 {
120     hipAccessPropertyNormal = 0,
121     hipAccessPropertyStreaming = 1,
122     hipAccessPropertyPersisting = 2
123 }
124 
125 struct hipAccessPolicyWindow
126 {
127     void* base_ptr;
128     hipAccessProperty hitProp;
129     float hitRatio;
130     hipAccessProperty missProp;
131     size_t num_bytes;
132 }
133 
134 union hipKernelNodeAttrValue
135 {
136     hipAccessPolicyWindow accessPolicyWindow;
137     int cooperative;
138 }
139 
140 struct hipPointerAttribute_t
141 {
142     hipMemoryType memoryType;
143     int device;
144     void* devicePointer;
145     void* hostPointer;
146     int isManaged;
147     uint allocationFlags;
148 }
149 
150 enum hipError_t
151 {
152     hipSuccess = 0,
153     hipErrorInvalidValue = 1,
154 
155     hipErrorOutOfMemory = 2,
156 
157     hipErrorMemoryAllocation = 2,
158     hipErrorNotInitialized = 3,
159 
160     hipErrorInitializationError = 3,
161     hipErrorDeinitialized = 4,
162     hipErrorProfilerDisabled = 5,
163     hipErrorProfilerNotInitialized = 6,
164     hipErrorProfilerAlreadyStarted = 7,
165     hipErrorProfilerAlreadyStopped = 8,
166     hipErrorInvalidConfiguration = 9,
167     hipErrorInvalidPitchValue = 12,
168     hipErrorInvalidSymbol = 13,
169     hipErrorInvalidDevicePointer = 17,
170     hipErrorInvalidMemcpyDirection = 21,
171     hipErrorInsufficientDriver = 35,
172     hipErrorMissingConfiguration = 52,
173     hipErrorPriorLaunchFailure = 53,
174     hipErrorInvalidDeviceFunction = 98,
175     hipErrorNoDevice = 100,
176     hipErrorInvalidDevice = 101,
177     hipErrorInvalidImage = 200,
178     hipErrorInvalidContext = 201,
179     hipErrorContextAlreadyCurrent = 202,
180     hipErrorMapFailed = 205,
181 
182     hipErrorMapBufferObjectFailed = 205,
183     hipErrorUnmapFailed = 206,
184     hipErrorArrayIsMapped = 207,
185     hipErrorAlreadyMapped = 208,
186     hipErrorNoBinaryForGpu = 209,
187     hipErrorAlreadyAcquired = 210,
188     hipErrorNotMapped = 211,
189     hipErrorNotMappedAsArray = 212,
190     hipErrorNotMappedAsPointer = 213,
191     hipErrorECCNotCorrectable = 214,
192     hipErrorUnsupportedLimit = 215,
193     hipErrorContextAlreadyInUse = 216,
194     hipErrorPeerAccessUnsupported = 217,
195     hipErrorInvalidKernelFile = 218,
196     hipErrorInvalidGraphicsContext = 219,
197     hipErrorInvalidSource = 300,
198     hipErrorFileNotFound = 301,
199     hipErrorSharedObjectSymbolNotFound = 302,
200     hipErrorSharedObjectInitFailed = 303,
201     hipErrorOperatingSystem = 304,
202     hipErrorInvalidHandle = 400,
203 
204     hipErrorInvalidResourceHandle = 400,
205     hipErrorIllegalState = 401,
206     hipErrorNotFound = 500,
207     hipErrorNotReady = 600,
208 
209     hipErrorIllegalAddress = 700,
210     hipErrorLaunchOutOfResources = 701,
211     hipErrorLaunchTimeOut = 702,
212     hipErrorPeerAccessAlreadyEnabled = 704,
213     hipErrorPeerAccessNotEnabled = 705,
214     hipErrorSetOnActiveProcess = 708,
215     hipErrorContextIsDestroyed = 709,
216     hipErrorAssert = 710,
217     hipErrorHostMemoryAlreadyRegistered = 712,
218     hipErrorHostMemoryNotRegistered = 713,
219     hipErrorLaunchFailure = 719,
220     hipErrorCooperativeLaunchTooLarge = 720,
221 
222     hipErrorNotSupported = 801,
223     hipErrorStreamCaptureUnsupported = 900,
224 
225     hipErrorStreamCaptureInvalidated = 901,
226 
227     hipErrorStreamCaptureMerge = 902,
228 
229     hipErrorStreamCaptureUnmatched = 903,
230     hipErrorStreamCaptureUnjoined = 904,
231 
232     hipErrorStreamCaptureIsolation = 905,
233 
234     hipErrorStreamCaptureImplicit = 906,
235 
236     hipErrorCapturedEvent = 907,
237 
238     hipErrorStreamCaptureWrongThread = 908,
239 
240     hipErrorGraphExecUpdateFailure = 910,
241 
242     hipErrorUnknown = 999,
243 
244     hipErrorRuntimeMemory = 1052,
245 
246     hipErrorRuntimeOther = 1053,
247 
248     hipErrorTbd = 1054
249 }
250 
251 enum hipDeviceAttribute_t
252 {
253     hipDeviceAttributeCudaCompatibleBegin = 0,
254 
255     hipDeviceAttributeEccEnabled = hipDeviceAttributeCudaCompatibleBegin,
256     hipDeviceAttributeAccessPolicyMaxWindowSize = 1,
257     hipDeviceAttributeAsyncEngineCount = 2,
258     hipDeviceAttributeCanMapHostMemory = 3,
259     hipDeviceAttributeCanUseHostPointerForRegisteredMem = 4,
260 
261     hipDeviceAttributeClockRate = 5,
262     hipDeviceAttributeComputeMode = 6,
263     hipDeviceAttributeComputePreemptionSupported = 7,
264     hipDeviceAttributeConcurrentKernels = 8,
265     hipDeviceAttributeConcurrentManagedAccess = 9,
266     hipDeviceAttributeCooperativeLaunch = 10,
267     hipDeviceAttributeCooperativeMultiDeviceLaunch = 11,
268     hipDeviceAttributeDeviceOverlap = 12,
269 
270     hipDeviceAttributeDirectManagedMemAccessFromHost = 13,
271 
272     hipDeviceAttributeGlobalL1CacheSupported = 14,
273     hipDeviceAttributeHostNativeAtomicSupported = 15,
274     hipDeviceAttributeIntegrated = 16,
275     hipDeviceAttributeIsMultiGpuBoard = 17,
276     hipDeviceAttributeKernelExecTimeout = 18,
277     hipDeviceAttributeL2CacheSize = 19,
278     hipDeviceAttributeLocalL1CacheSupported = 20,
279     hipDeviceAttributeLuid = 21,
280     hipDeviceAttributeLuidDeviceNodeMask = 22,
281     hipDeviceAttributeComputeCapabilityMajor = 23,
282     hipDeviceAttributeManagedMemory = 24,
283     hipDeviceAttributeMaxBlocksPerMultiProcessor = 25,
284     hipDeviceAttributeMaxBlockDimX = 26,
285     hipDeviceAttributeMaxBlockDimY = 27,
286     hipDeviceAttributeMaxBlockDimZ = 28,
287     hipDeviceAttributeMaxGridDimX = 29,
288     hipDeviceAttributeMaxGridDimY = 30,
289     hipDeviceAttributeMaxGridDimZ = 31,
290     hipDeviceAttributeMaxSurface1D = 32,
291     hipDeviceAttributeMaxSurface1DLayered = 33,
292     hipDeviceAttributeMaxSurface2D = 34,
293     hipDeviceAttributeMaxSurface2DLayered = 35,
294     hipDeviceAttributeMaxSurface3D = 36,
295     hipDeviceAttributeMaxSurfaceCubemap = 37,
296     hipDeviceAttributeMaxSurfaceCubemapLayered = 38,
297     hipDeviceAttributeMaxTexture1DWidth = 39,
298     hipDeviceAttributeMaxTexture1DLayered = 40,
299     hipDeviceAttributeMaxTexture1DLinear = 41,
300 
301     hipDeviceAttributeMaxTexture1DMipmap = 42,
302     hipDeviceAttributeMaxTexture2DWidth = 43,
303     hipDeviceAttributeMaxTexture2DHeight = 44,
304     hipDeviceAttributeMaxTexture2DGather = 45,
305     hipDeviceAttributeMaxTexture2DLayered = 46,
306     hipDeviceAttributeMaxTexture2DLinear = 47,
307     hipDeviceAttributeMaxTexture2DMipmap = 48,
308     hipDeviceAttributeMaxTexture3DWidth = 49,
309     hipDeviceAttributeMaxTexture3DHeight = 50,
310     hipDeviceAttributeMaxTexture3DDepth = 51,
311     hipDeviceAttributeMaxTexture3DAlt = 52,
312     hipDeviceAttributeMaxTextureCubemap = 53,
313     hipDeviceAttributeMaxTextureCubemapLayered = 54,
314     hipDeviceAttributeMaxThreadsDim = 55,
315     hipDeviceAttributeMaxThreadsPerBlock = 56,
316     hipDeviceAttributeMaxThreadsPerMultiProcessor = 57,
317     hipDeviceAttributeMaxPitch = 58,
318     hipDeviceAttributeMemoryBusWidth = 59,
319     hipDeviceAttributeMemoryClockRate = 60,
320     hipDeviceAttributeComputeCapabilityMinor = 61,
321     hipDeviceAttributeMultiGpuBoardGroupID = 62,
322     hipDeviceAttributeMultiprocessorCount = 63,
323     hipDeviceAttributeName = 64,
324     hipDeviceAttributePageableMemoryAccess = 65,
325 
326     hipDeviceAttributePageableMemoryAccessUsesHostPageTables = 66,
327     hipDeviceAttributePciBusId = 67,
328     hipDeviceAttributePciDeviceId = 68,
329     hipDeviceAttributePciDomainID = 69,
330     hipDeviceAttributePersistingL2CacheMaxSize = 70,
331     hipDeviceAttributeMaxRegistersPerBlock = 71,
332 
333     hipDeviceAttributeMaxRegistersPerMultiprocessor = 72,
334     hipDeviceAttributeReservedSharedMemPerBlock = 73,
335     hipDeviceAttributeMaxSharedMemoryPerBlock = 74,
336     hipDeviceAttributeSharedMemPerBlockOptin = 75,
337     hipDeviceAttributeSharedMemPerMultiprocessor = 76,
338     hipDeviceAttributeSingleToDoublePrecisionPerfRatio = 77,
339     hipDeviceAttributeStreamPrioritiesSupported = 78,
340     hipDeviceAttributeSurfaceAlignment = 79,
341     hipDeviceAttributeTccDriver = 80,
342     hipDeviceAttributeTextureAlignment = 81,
343     hipDeviceAttributeTexturePitchAlignment = 82,
344     hipDeviceAttributeTotalConstantMemory = 83,
345     hipDeviceAttributeTotalGlobalMem = 84,
346     hipDeviceAttributeUnifiedAddressing = 85,
347     hipDeviceAttributeUuid = 86,
348     hipDeviceAttributeWarpSize = 87,
349     hipDeviceAttributeMemoryPoolsSupported = 88,
350 
351     hipDeviceAttributeCudaCompatibleEnd = 9999,
352     hipDeviceAttributeAmdSpecificBegin = 10000,
353 
354     hipDeviceAttributeClockInstructionRate = hipDeviceAttributeAmdSpecificBegin,
355     hipDeviceAttributeArch = 10001,
356     hipDeviceAttributeMaxSharedMemoryPerMultiprocessor = 10002,
357     hipDeviceAttributeGcnArch = 10003,
358     hipDeviceAttributeGcnArchName = 10004,
359     hipDeviceAttributeHdpMemFlushCntl = 10005,
360     hipDeviceAttributeHdpRegFlushCntl = 10006,
361     hipDeviceAttributeCooperativeMultiDeviceUnmatchedFunc = 10007,
362 
363     hipDeviceAttributeCooperativeMultiDeviceUnmatchedGridDim = 10008,
364 
365     hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim = 10009,
366 
367     hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem = 10010,
368 
369     hipDeviceAttributeIsLargeBar = 10011,
370     hipDeviceAttributeAsicRevision = 10012,
371     hipDeviceAttributeCanUseStreamWaitValue = 10013,
372 
373     hipDeviceAttributeImageSupport = 10014,
374     hipDeviceAttributePhysicalMultiProcessorCount = 10015,
375 
376     hipDeviceAttributeFineGrainSupport = 10016,
377 
378     hipDeviceAttributeAmdSpecificEnd = 19999,
379     hipDeviceAttributeVendorSpecificBegin = 20000
380 }
381 
382 enum hipComputeMode
383 {
384     hipComputeModeDefault = 0,
385     hipComputeModeExclusive = 1,
386     hipComputeModeProhibited = 2,
387     hipComputeModeExclusiveProcess = 3
388 }
389 
390 alias hipDeviceptr_t = void*;
391 
392 enum hipChannelFormatKind
393 {
394     hipChannelFormatKindSigned = 0,
395     hipChannelFormatKindUnsigned = 1,
396     hipChannelFormatKindFloat = 2,
397     hipChannelFormatKindNone = 3
398 }
399 
400 struct hipChannelFormatDesc
401 {
402     int x;
403     int y;
404     int z;
405     int w;
406     hipChannelFormatKind f;
407 }
408 
409 enum hipArray_Format
410 {
411     HIP_AD_FORMAT_UNSIGNED_INT8 = 0x01,
412     HIP_AD_FORMAT_UNSIGNED_INT16 = 0x02,
413     HIP_AD_FORMAT_UNSIGNED_INT32 = 0x03,
414     HIP_AD_FORMAT_SIGNED_INT8 = 0x08,
415     HIP_AD_FORMAT_SIGNED_INT16 = 0x09,
416     HIP_AD_FORMAT_SIGNED_INT32 = 0x0a,
417     HIP_AD_FORMAT_HALF = 0x10,
418     HIP_AD_FORMAT_FLOAT = 0x20
419 }
420 
421 struct HIP_ARRAY_DESCRIPTOR
422 {
423     size_t Width;
424     size_t Height;
425     hipArray_Format Format;
426     uint NumChannels;
427 }
428 
429 struct HIP_ARRAY3D_DESCRIPTOR
430 {
431     size_t Width;
432     size_t Height;
433     size_t Depth;
434     hipArray_Format Format;
435     uint NumChannels;
436     uint Flags;
437 }
438 
439 struct hipArray
440 {
441     void* data;
442     hipChannelFormatDesc desc;
443     uint type;
444     uint width;
445     uint height;
446     uint depth;
447     hipArray_Format Format;
448     uint NumChannels;
449     bool isDrv;
450     uint textureType;
451 }
452 
453 struct hip_Memcpy2D
454 {
455     size_t srcXInBytes;
456     size_t srcY;
457     hipMemoryType srcMemoryType;
458     const(void)* srcHost;
459     hipDeviceptr_t srcDevice;
460     hipArray* srcArray;
461     size_t srcPitch;
462     size_t dstXInBytes;
463     size_t dstY;
464     hipMemoryType dstMemoryType;
465     void* dstHost;
466     hipDeviceptr_t dstDevice;
467     hipArray* dstArray;
468     size_t dstPitch;
469     size_t WidthInBytes;
470     size_t Height;
471 }
472 
473 alias hipArray_t = hipArray*;
474 alias hiparray = hipArray*;
475 alias hipArray_const_t = const(hipArray)*;
476 
477 struct hipMipmappedArray
478 {
479     void* data;
480     hipChannelFormatDesc desc;
481     uint type;
482     uint width;
483     uint height;
484     uint depth;
485     uint min_mipmap_level;
486     uint max_mipmap_level;
487     uint flags;
488     hipArray_Format format;
489 }
490 
491 alias hipMipmappedArray_t = hipMipmappedArray*;
492 alias hipMipmappedArray_const_t = const(hipMipmappedArray)*;
493 
494 enum hipResourceType
495 {
496     hipResourceTypeArray = 0x00,
497     hipResourceTypeMipmappedArray = 0x01,
498     hipResourceTypeLinear = 0x02,
499     hipResourceTypePitch2D = 0x03
500 }
501 
502 enum HIPresourcetype_enum
503 {
504     HIP_RESOURCE_TYPE_ARRAY = 0x00,
505     HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY = 0x01,
506     HIP_RESOURCE_TYPE_LINEAR = 0x02,
507     HIP_RESOURCE_TYPE_PITCH2D = 0x03
508 }
509 
510 alias HIPresourcetype = HIPresourcetype_enum;
511 
512 enum HIPaddress_mode_enum
513 {
514     HIP_TR_ADDRESS_MODE_WRAP = 0,
515     HIP_TR_ADDRESS_MODE_CLAMP = 1,
516     HIP_TR_ADDRESS_MODE_MIRROR = 2,
517     HIP_TR_ADDRESS_MODE_BORDER = 3
518 }
519 
520 alias HIPaddress_mode = HIPaddress_mode_enum;
521 
522 enum HIPfilter_mode_enum
523 {
524     HIP_TR_FILTER_MODE_POINT = 0,
525     HIP_TR_FILTER_MODE_LINEAR = 1
526 }
527 
528 alias HIPfilter_mode = HIPfilter_mode_enum;
529 
530 struct HIP_TEXTURE_DESC_st
531 {
532     HIPaddress_mode[3] addressMode;
533     HIPfilter_mode filterMode;
534     uint flags;
535     uint maxAnisotropy;
536     HIPfilter_mode mipmapFilterMode;
537     float mipmapLevelBias;
538     float minMipmapLevelClamp;
539     float maxMipmapLevelClamp;
540     float[4] borderColor;
541     int[12] reserved;
542 }
543 
544 alias HIP_TEXTURE_DESC = HIP_TEXTURE_DESC_st;
545 
546 enum hipResourceViewFormat
547 {
548     hipResViewFormatNone = 0x00,
549     hipResViewFormatUnsignedChar1 = 0x01,
550     hipResViewFormatUnsignedChar2 = 0x02,
551     hipResViewFormatUnsignedChar4 = 0x03,
552     hipResViewFormatSignedChar1 = 0x04,
553     hipResViewFormatSignedChar2 = 0x05,
554     hipResViewFormatSignedChar4 = 0x06,
555     hipResViewFormatUnsignedShort1
556         = 0x07, hipResViewFormatUnsignedShort2 = 0x08,
557         hipResViewFormatUnsignedShort4 = 0x09, hipResViewFormatSignedShort1 = 0x0a,
558         hipResViewFormatSignedShort2 = 0x0b,
559         hipResViewFormatSignedShort4 = 0x0c, hipResViewFormatUnsignedInt1 = 0x0d,
560         hipResViewFormatUnsignedInt2 = 0x0e, hipResViewFormatUnsignedInt4 = 0x0f,
561         hipResViewFormatSignedInt1 = 0x10,
562         hipResViewFormatSignedInt2 = 0x11, hipResViewFormatSignedInt4 = 0x12,
563         hipResViewFormatHalf1 = 0x13, hipResViewFormatHalf2 = 0x14,
564         hipResViewFormatHalf4 = 0x15, hipResViewFormatFloat1 = 0x16,
565         hipResViewFormatFloat2 = 0x17,
566         hipResViewFormatFloat4 = 0x18,
567         hipResViewFormatUnsignedBlockCompressed1 = 0x19,
568         hipResViewFormatUnsignedBlockCompressed2 = 0x1a, hipResViewFormatUnsignedBlockCompressed3 = 0x1b,
569         hipResViewFormatUnsignedBlockCompressed4 = 0x1c,
570         hipResViewFormatSignedBlockCompressed4 = 0x1d,
571         hipResViewFormatUnsignedBlockCompressed5 = 0x1e,
572         hipResViewFormatSignedBlockCompressed5 = 0x1f,
573         hipResViewFormatUnsignedBlockCompressed6H = 0x20,
574         hipResViewFormatSignedBlockCompressed6H = 0x21,
575         hipResViewFormatUnsignedBlockCompressed7 = 0x22
576 }
577 
578 enum HIPresourceViewFormat_enum
579 {
580     HIP_RES_VIEW_FORMAT_NONE = 0x00,
581     HIP_RES_VIEW_FORMAT_UINT_1X8 = 0x01,
582     HIP_RES_VIEW_FORMAT_UINT_2X8 = 0x02,
583     HIP_RES_VIEW_FORMAT_UINT_4X8 = 0x03,
584     HIP_RES_VIEW_FORMAT_SINT_1X8 = 0x04,
585     HIP_RES_VIEW_FORMAT_SINT_2X8 = 0x05,
586     HIP_RES_VIEW_FORMAT_SINT_4X8 = 0x06,
587     HIP_RES_VIEW_FORMAT_UINT_1X16 = 0x07,
588     HIP_RES_VIEW_FORMAT_UINT_2X16 = 0x08,
589     HIP_RES_VIEW_FORMAT_UINT_4X16 = 0x09,
590     HIP_RES_VIEW_FORMAT_SINT_1X16 = 0x0a,
591     HIP_RES_VIEW_FORMAT_SINT_2X16 = 0x0b,
592     HIP_RES_VIEW_FORMAT_SINT_4X16 = 0x0c,
593     HIP_RES_VIEW_FORMAT_UINT_1X32 = 0x0d,
594     HIP_RES_VIEW_FORMAT_UINT_2X32 = 0x0e,
595     HIP_RES_VIEW_FORMAT_UINT_4X32 = 0x0f,
596     HIP_RES_VIEW_FORMAT_SINT_1X32 = 0x10,
597     HIP_RES_VIEW_FORMAT_SINT_2X32 = 0x11,
598     HIP_RES_VIEW_FORMAT_SINT_4X32 = 0x12,
599     HIP_RES_VIEW_FORMAT_FLOAT_1X16 = 0x13,
600     HIP_RES_VIEW_FORMAT_FLOAT_2X16 = 0x14,
601     HIP_RES_VIEW_FORMAT_FLOAT_4X16 = 0x15,
602     HIP_RES_VIEW_FORMAT_FLOAT_1X32 = 0x16,
603     HIP_RES_VIEW_FORMAT_FLOAT_2X32 = 0x17,
604     HIP_RES_VIEW_FORMAT_FLOAT_4X32 = 0x18,
605     HIP_RES_VIEW_FORMAT_UNSIGNED_BC1 = 0x19,
606     HIP_RES_VIEW_FORMAT_UNSIGNED_BC2 = 0x1a,
607     HIP_RES_VIEW_FORMAT_UNSIGNED_BC3 = 0x1b,
608     HIP_RES_VIEW_FORMAT_UNSIGNED_BC4 = 0x1c,
609     HIP_RES_VIEW_FORMAT_SIGNED_BC4 = 0x1d,
610     HIP_RES_VIEW_FORMAT_UNSIGNED_BC5 = 0x1e,
611     HIP_RES_VIEW_FORMAT_SIGNED_BC5 = 0x1f,
612     HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H = 0x20,
613     HIP_RES_VIEW_FORMAT_SIGNED_BC6H = 0x21,
614     HIP_RES_VIEW_FORMAT_UNSIGNED_BC7 = 0x22
615 }
616 
617 alias HIPresourceViewFormat = HIPresourceViewFormat_enum;
618 
619 struct hipResourceDesc
620 {
621     hipResourceType resType;
622 
623     union _Anonymous_0
624     {
625         struct _Anonymous_1
626         {
627             hipArray_t array;
628         }
629 
630         _Anonymous_1 array;
631 
632         struct _Anonymous_2
633         {
634             hipMipmappedArray_t mipmap;
635         }
636 
637         _Anonymous_2 mipmap;
638 
639         struct _Anonymous_3
640         {
641             void* devPtr;
642             hipChannelFormatDesc desc;
643             size_t sizeInBytes;
644         }
645 
646         _Anonymous_3 linear;
647 
648         struct _Anonymous_4
649         {
650             void* devPtr;
651             hipChannelFormatDesc desc;
652             size_t width;
653             size_t height;
654             size_t pitchInBytes;
655         }
656 
657         _Anonymous_4 pitch2D;
658     }
659 
660     _Anonymous_0 res;
661 }
662 
663 struct HIP_RESOURCE_DESC_st
664 {
665     HIPresourcetype resType;
666 
667     union _Anonymous_5
668     {
669         struct _Anonymous_6
670         {
671             hipArray_t hArray;
672         }
673 
674         _Anonymous_6 array;
675 
676         struct _Anonymous_7
677         {
678             hipMipmappedArray_t hMipmappedArray;
679         }
680 
681         _Anonymous_7 mipmap;
682 
683         struct _Anonymous_8
684         {
685             hipDeviceptr_t devPtr;
686             hipArray_Format format;
687             uint numChannels;
688             size_t sizeInBytes;
689         }
690 
691         _Anonymous_8 linear;
692 
693         struct _Anonymous_9
694         {
695             hipDeviceptr_t devPtr;
696             hipArray_Format format;
697             uint numChannels;
698             size_t width;
699             size_t height;
700             size_t pitchInBytes;
701         }
702 
703         _Anonymous_9 pitch2D;
704 
705         struct _Anonymous_10
706         {
707             int[32] reserved;
708         }
709 
710         _Anonymous_10 reserved;
711     }
712 
713     _Anonymous_5 res;
714     uint flags;
715 }
716 
717 alias HIP_RESOURCE_DESC = HIP_RESOURCE_DESC_st;
718 
719 struct hipResourceViewDesc
720 {
721     hipResourceViewFormat format;
722     size_t width;
723     size_t height;
724     size_t depth;
725     uint firstMipmapLevel;
726     uint lastMipmapLevel;
727     uint firstLayer;
728     uint lastLayer;
729 }
730 
731 struct HIP_RESOURCE_VIEW_DESC_st
732 {
733     HIPresourceViewFormat format;
734     size_t width;
735     size_t height;
736     size_t depth;
737     uint firstMipmapLevel;
738     uint lastMipmapLevel;
739     uint firstLayer;
740     uint lastLayer;
741     uint[16] reserved;
742 }
743 
744 alias HIP_RESOURCE_VIEW_DESC = HIP_RESOURCE_VIEW_DESC_st;
745 
746 enum hipMemcpyKind
747 {
748     hipMemcpyHostToHost = 0,
749     hipMemcpyHostToDevice = 1,
750     hipMemcpyDeviceToHost = 2,
751     hipMemcpyDeviceToDevice = 3,
752     hipMemcpyDefault = 4
753 }
754 
755 struct hipPitchedPtr
756 {
757     void* ptr;
758     size_t pitch;
759     size_t xsize;
760     size_t ysize;
761 }
762 
763 struct hipExtent
764 {
765     size_t width;
766 
767     size_t height;
768     size_t depth;
769 }
770 
771 struct hipPos
772 {
773     size_t x;
774     size_t y;
775     size_t z;
776 }
777 
778 struct hipMemcpy3DParms
779 {
780     hipArray_t srcArray;
781     hipPos srcPos;
782     hipPitchedPtr srcPtr;
783     hipArray_t dstArray;
784     hipPos dstPos;
785     hipPitchedPtr dstPtr;
786     hipExtent extent;
787     hipMemcpyKind kind;
788 }
789 
790 struct HIP_MEMCPY3D
791 {
792     uint srcXInBytes;
793     uint srcY;
794     uint srcZ;
795     uint srcLOD;
796     hipMemoryType srcMemoryType;
797     const(void)* srcHost;
798     hipDeviceptr_t srcDevice;
799     hipArray_t srcArray;
800     uint srcPitch;
801     uint srcHeight;
802     uint dstXInBytes;
803     uint dstY;
804     uint dstZ;
805     uint dstLOD;
806     hipMemoryType dstMemoryType;
807     void* dstHost;
808     hipDeviceptr_t dstDevice;
809     hipArray_t dstArray;
810     uint dstPitch;
811     uint dstHeight;
812     uint WidthInBytes;
813     uint Height;
814     uint Depth;
815 }
816 
817 hipPitchedPtr make_hipPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz);
818 hipPos make_hipPos(size_t x, size_t y, size_t z);
819 hipExtent make_hipExtent(size_t w, size_t h, size_t d);
820 
821 enum hipFunction_attribute
822 {
823     HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0,
824     HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1,
825     HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = 2,
826     HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = 3,
827     HIP_FUNC_ATTRIBUTE_NUM_REGS = 4,
828     HIP_FUNC_ATTRIBUTE_PTX_VERSION = 5,
829     HIP_FUNC_ATTRIBUTE_BINARY_VERSION = 6,
830     HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA = 7,
831     HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = 8,
832     HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 9,
833     HIP_FUNC_ATTRIBUTE_MAX = 10
834 }
835 
836 enum hipPointer_attribute
837 {
838     HIP_POINTER_ATTRIBUTE_CONTEXT = 1,
839 
840     HIP_POINTER_ATTRIBUTE_MEMORY_TYPE = 2,
841     HIP_POINTER_ATTRIBUTE_DEVICE_POINTER = 3,
842     HIP_POINTER_ATTRIBUTE_HOST_POINTER = 4,
843     HIP_POINTER_ATTRIBUTE_P2P_TOKENS = 5,
844 
845     HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS = 6,
846 
847     HIP_POINTER_ATTRIBUTE_BUFFER_ID = 7,
848     HIP_POINTER_ATTRIBUTE_IS_MANAGED = 8,
849     HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL = 9,
850 
851     HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE = 10,
852 
853     HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR = 11,
854     HIP_POINTER_ATTRIBUTE_RANGE_SIZE = 12,
855     HIP_POINTER_ATTRIBUTE_MAPPED = 13,
856 
857     HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = 14,
858 
859     HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = 15,
860 
861     HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS = 16,
862 
863     HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = 17
864 }
865 
866 hipChannelFormatDesc hipCreateChannelDesc(int x, int y, int z, int w, hipChannelFormatKind f);
867 
868 struct __hip_texture;
869 alias hipTextureObject_t = __hip_texture*;
870 
871 enum hipTextureAddressMode
872 {
873     hipAddressModeWrap = 0,
874     hipAddressModeClamp = 1,
875     hipAddressModeMirror = 2,
876     hipAddressModeBorder = 3
877 }
878 
879 enum hipTextureFilterMode
880 {
881     hipFilterModePoint = 0,
882     hipFilterModeLinear = 1
883 }
884 
885 enum hipTextureReadMode
886 {
887     hipReadModeElementType = 0,
888     hipReadModeNormalizedFloat = 1
889 }
890 
891 struct textureReference
892 {
893     int normalized;
894     hipTextureReadMode readMode;
895     hipTextureFilterMode filterMode;
896     hipTextureAddressMode[3] addressMode;
897     hipChannelFormatDesc channelDesc;
898     int sRGB;
899     uint maxAnisotropy;
900     hipTextureFilterMode mipmapFilterMode;
901     float mipmapLevelBias;
902     float minMipmapLevelClamp;
903     float maxMipmapLevelClamp;
904 
905     hipTextureObject_t textureObject;
906     int numChannels;
907     hipArray_Format format;
908 }
909 
910 struct hipTextureDesc
911 {
912     hipTextureAddressMode[3] addressMode;
913     hipTextureFilterMode filterMode;
914     hipTextureReadMode readMode;
915     int sRGB;
916     float[4] borderColor;
917     int normalizedCoords;
918     uint maxAnisotropy;
919     hipTextureFilterMode mipmapFilterMode;
920     float mipmapLevelBias;
921     float minMipmapLevelClamp;
922     float maxMipmapLevelClamp;
923 }
924 
925 struct __hip_surface;
926 alias hipSurfaceObject_t = __hip_surface*;
927 
928 struct surfaceReference
929 {
930     hipSurfaceObject_t surfaceObject;
931 }
932 
933 enum hipSurfaceBoundaryMode
934 {
935     hipBoundaryModeZero = 0,
936     hipBoundaryModeTrap = 1,
937     hipBoundaryModeClamp = 2
938 }
939 
940 struct ihipCtx_t;
941 alias hipCtx_t = ihipCtx_t*;
942 
943 alias hipDevice_t = int;
944 
945 enum hipDeviceP2PAttr
946 {
947     hipDevP2PAttrPerformanceRank = 0,
948     hipDevP2PAttrAccessSupported = 1,
949     hipDevP2PAttrNativeAtomicSupported = 2,
950     hipDevP2PAttrHipArrayAccessSupported = 3
951 }
952 
953 struct ihipStream_t;
954 alias hipStream_t = ihipStream_t*;
955 
956 struct hipIpcMemHandle_st
957 {
958     char[64] reserved;
959 }
960 
961 alias hipIpcMemHandle_t = hipIpcMemHandle_st;
962 
963 struct hipIpcEventHandle_st
964 {
965     char[64] reserved;
966 }
967 
968 alias hipIpcEventHandle_t = hipIpcEventHandle_st;
969 struct ihipModule_t;
970 alias hipModule_t = ihipModule_t*;
971 struct ihipModuleSymbol_t;
972 alias hipFunction_t = ihipModuleSymbol_t*;
973 
974 struct ihipMemPoolHandle_t;
975 alias hipMemPool_t = ihipMemPoolHandle_t*;
976 
977 struct hipFuncAttributes
978 {
979     int binaryVersion;
980     int cacheModeCA;
981     size_t constSizeBytes;
982     size_t localSizeBytes;
983     int maxDynamicSharedSizeBytes;
984     int maxThreadsPerBlock;
985     int numRegs;
986     int preferredShmemCarveout;
987     int ptxVersion;
988     size_t sharedSizeBytes;
989 }
990 
991 struct ihipEvent_t;
992 alias hipEvent_t = ihipEvent_t*;
993 
994 enum hipLimit_t
995 {
996     hipLimitPrintfFifoSize = 0x01,
997     hipLimitMallocHeapSize = 0x02
998 }
999 
1000 enum hipMemoryAdvise
1001 {
1002     hipMemAdviseSetReadMostly = 1,
1003 
1004     hipMemAdviseUnsetReadMostly = 2,
1005     hipMemAdviseSetPreferredLocation = 3,
1006 
1007     hipMemAdviseUnsetPreferredLocation = 4,
1008     hipMemAdviseSetAccessedBy = 5,
1009 
1010     hipMemAdviseUnsetAccessedBy = 6,
1011 
1012     hipMemAdviseSetCoarseGrain = 100,
1013 
1014     hipMemAdviseUnsetCoarseGrain = 101
1015 }
1016 
1017 enum hipMemRangeCoherencyMode
1018 {
1019     hipMemRangeCoherencyModeFineGrain = 0,
1020 
1021     hipMemRangeCoherencyModeCoarseGrain = 1,
1022 
1023     hipMemRangeCoherencyModeIndeterminate = 2
1024 }
1025 
1026 enum hipMemRangeAttribute
1027 {
1028     hipMemRangeAttributeReadMostly = 1,
1029 
1030     hipMemRangeAttributePreferredLocation = 2,
1031     hipMemRangeAttributeAccessedBy = 3,
1032 
1033     hipMemRangeAttributeLastPrefetchLocation = 4,
1034 
1035     hipMemRangeAttributeCoherencyMode = 100
1036 }
1037 
1038 enum hipMemPoolAttr
1039 {
1040     hipMemPoolReuseFollowEventDependencies = 0x1,
1041 
1042     hipMemPoolReuseAllowOpportunistic = 0x2,
1043 
1044     hipMemPoolReuseAllowInternalDependencies = 0x3,
1045 
1046     hipMemPoolAttrReleaseThreshold = 0x4,
1047 
1048     hipMemPoolAttrReservedMemCurrent = 0x5,
1049 
1050     hipMemPoolAttrReservedMemHigh = 0x6,
1051 
1052     hipMemPoolAttrUsedMemCurrent = 0x7,
1053 
1054     hipMemPoolAttrUsedMemHigh = 0x8
1055 }
1056 
1057 enum hipMemLocationType
1058 {
1059     hipMemLocationTypeInvalid = 0,
1060     hipMemLocationTypeDevice = 1
1061 }
1062 
1063 struct hipMemLocation
1064 {
1065     hipMemLocationType type;
1066     int id;
1067 }
1068 
1069 enum hipMemAccessFlags
1070 {
1071     hipMemAccessFlagsProtNone = 0,
1072     hipMemAccessFlagsProtRead = 1,
1073     hipMemAccessFlagsProtReadWrite = 3
1074 }
1075 
1076 struct hipMemAccessDesc
1077 {
1078     hipMemLocation location;
1079     hipMemAccessFlags flags;
1080 }
1081 
1082 enum hipMemAllocationType
1083 {
1084     hipMemAllocationTypeInvalid = 0x0,
1085 
1086     hipMemAllocationTypePinned = 0x1,
1087     hipMemAllocationTypeMax = 0x7FFFFFFF
1088 }
1089 
1090 enum hipMemAllocationHandleType
1091 {
1092     hipMemHandleTypeNone = 0x0,
1093     hipMemHandleTypePosixFileDescriptor = 0x1,
1094     hipMemHandleTypeWin32 = 0x2,
1095     hipMemHandleTypeWin32Kmt = 0x4
1096 }
1097 
1098 struct hipMemPoolProps
1099 {
1100     hipMemAllocationType allocType;
1101     hipMemAllocationHandleType handleTypes;
1102     hipMemLocation location;
1103 
1104     void* win32SecurityAttributes;
1105     ubyte[64] reserved;
1106 }
1107 
1108 struct hipMemPoolPtrExportData
1109 {
1110     ubyte[64] reserved;
1111 }
1112 
1113 enum hipJitOption
1114 {
1115     hipJitOptionMaxRegisters = 0,
1116     hipJitOptionThreadsPerBlock = 1,
1117     hipJitOptionWallTime = 2,
1118     hipJitOptionInfoLogBuffer = 3,
1119     hipJitOptionInfoLogBufferSizeBytes = 4,
1120     hipJitOptionErrorLogBuffer = 5,
1121     hipJitOptionErrorLogBufferSizeBytes = 6,
1122     hipJitOptionOptimizationLevel = 7,
1123     hipJitOptionTargetFromContext = 8,
1124     hipJitOptionTarget = 9,
1125     hipJitOptionFallbackStrategy = 10,
1126     hipJitOptionGenerateDebugInfo = 11,
1127     hipJitOptionLogVerbose = 12,
1128     hipJitOptionGenerateLineInfo = 13,
1129     hipJitOptionCacheMode = 14,
1130     hipJitOptionSm3xOpt = 15,
1131     hipJitOptionFastCompile = 16,
1132     hipJitOptionNumOptions = 17
1133 }
1134 
1135 enum hipFuncAttribute
1136 {
1137     hipFuncAttributeMaxDynamicSharedMemorySize = 8,
1138     hipFuncAttributePreferredSharedMemoryCarveout = 9,
1139     hipFuncAttributeMax = 10
1140 }
1141 
1142 enum hipFuncCache_t
1143 {
1144     hipFuncCachePreferNone = 0,
1145     hipFuncCachePreferShared = 1,
1146     hipFuncCachePreferL1 = 2,
1147     hipFuncCachePreferEqual = 3
1148 }
1149 
1150 enum hipSharedMemConfig
1151 {
1152     hipSharedMemBankSizeDefault = 0,
1153     hipSharedMemBankSizeFourByte = 1,
1154 
1155     hipSharedMemBankSizeEightByte = 2
1156 }
1157 
1158 struct dim3
1159 {
1160     uint x;
1161     uint y;
1162     uint z;
1163 }
1164 
1165 struct hipLaunchParams_t
1166 {
1167     void* func;
1168     dim3 gridDim;
1169     dim3 blockDim;
1170     void** args;
1171     size_t sharedMem;
1172     hipStream_t stream;
1173 }
1174 
1175 alias hipLaunchParams = hipLaunchParams_t;
1176 
1177 enum hipExternalMemoryHandleType_enum
1178 {
1179     hipExternalMemoryHandleTypeOpaqueFd = 1,
1180     hipExternalMemoryHandleTypeOpaqueWin32 = 2,
1181     hipExternalMemoryHandleTypeOpaqueWin32Kmt = 3,
1182     hipExternalMemoryHandleTypeD3D12Heap = 4,
1183     hipExternalMemoryHandleTypeD3D12Resource = 5,
1184     hipExternalMemoryHandleTypeD3D11Resource = 6,
1185     hipExternalMemoryHandleTypeD3D11ResourceKmt = 7
1186 }
1187 
1188 alias hipExternalMemoryHandleType = hipExternalMemoryHandleType_enum;
1189 
1190 struct hipExternalMemoryHandleDesc_st
1191 {
1192     hipExternalMemoryHandleType type;
1193 
1194     union _Anonymous_11
1195     {
1196         int fd;
1197 
1198         struct _Anonymous_12
1199         {
1200             void* handle;
1201             const(void)* name;
1202         }
1203 
1204         _Anonymous_12 win32;
1205     }
1206 
1207     _Anonymous_11 handle;
1208     ulong size;
1209     uint flags;
1210 }
1211 
1212 alias hipExternalMemoryHandleDesc = hipExternalMemoryHandleDesc_st;
1213 
1214 struct hipExternalMemoryBufferDesc_st
1215 {
1216     ulong offset;
1217     ulong size;
1218     uint flags;
1219 }
1220 
1221 alias hipExternalMemoryBufferDesc = hipExternalMemoryBufferDesc_st;
1222 alias hipExternalMemory_t = void*;
1223 
1224 enum hipExternalSemaphoreHandleType_enum
1225 {
1226     hipExternalSemaphoreHandleTypeOpaqueFd = 1,
1227     hipExternalSemaphoreHandleTypeOpaqueWin32 = 2,
1228     hipExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3,
1229     hipExternalSemaphoreHandleTypeD3D12Fence = 4
1230 }
1231 
1232 alias hipExternalSemaphoreHandleType = hipExternalSemaphoreHandleType_enum;
1233 
1234 struct hipExternalSemaphoreHandleDesc_st
1235 {
1236     hipExternalSemaphoreHandleType type;
1237 
1238     union _Anonymous_13
1239     {
1240         int fd;
1241 
1242         struct _Anonymous_14
1243         {
1244             void* handle;
1245             const(void)* name;
1246         }
1247 
1248         _Anonymous_14 win32;
1249     }
1250 
1251     _Anonymous_13 handle;
1252     uint flags;
1253 }
1254 
1255 alias hipExternalSemaphoreHandleDesc = hipExternalSemaphoreHandleDesc_st;
1256 alias hipExternalSemaphore_t = void*;
1257 
1258 struct hipExternalSemaphoreSignalParams_st
1259 {
1260     struct _Anonymous_15
1261     {
1262         struct _Anonymous_16
1263         {
1264             ulong value;
1265         }
1266 
1267         _Anonymous_16 fence;
1268 
1269         struct _Anonymous_17
1270         {
1271             ulong key;
1272         }
1273 
1274         _Anonymous_17 keyedMutex;
1275         uint[12] reserved;
1276     }
1277 
1278     _Anonymous_15 params;
1279     uint flags;
1280     uint[16] reserved;
1281 }
1282 
1283 alias hipExternalSemaphoreSignalParams = hipExternalSemaphoreSignalParams_st;
1284 
1285 struct hipExternalSemaphoreWaitParams_st
1286 {
1287     struct _Anonymous_18
1288     {
1289         struct _Anonymous_19
1290         {
1291             ulong value;
1292         }
1293 
1294         _Anonymous_19 fence;
1295 
1296         struct _Anonymous_20
1297         {
1298             ulong key;
1299             uint timeoutMs;
1300         }
1301 
1302         _Anonymous_20 keyedMutex;
1303         uint[10] reserved;
1304     }
1305 
1306     _Anonymous_18 params;
1307     uint flags;
1308     uint[16] reserved;
1309 }
1310 
1311 alias hipExternalSemaphoreWaitParams = hipExternalSemaphoreWaitParams_st;
1312 
1313 void __hipGetPCH(const(char*)* pch, uint* size);
1314 
1315 enum hipGLDeviceList
1316 {
1317     hipGLDeviceListAll = 1,
1318     hipGLDeviceListCurrentFrame = 2,
1319 
1320     hipGLDeviceListNextFrame = 3
1321 }
1322 
1323 enum hipGraphicsRegisterFlags
1324 {
1325     hipGraphicsRegisterFlagsNone = 0,
1326     hipGraphicsRegisterFlagsReadOnly = 1,
1327     hipGraphicsRegisterFlagsWriteDiscard = 2,
1328     hipGraphicsRegisterFlagsSurfaceLoadStore = 4,
1329     hipGraphicsRegisterFlagsTextureGather = 8
1330 }
1331 
1332 struct _hipGraphicsResource;
1333 alias hipGraphicsResource = _hipGraphicsResource;
1334 
1335 alias hipGraphicsResource_t = _hipGraphicsResource*;
1336 
1337 struct ihipGraph;
1338 alias hipGraph_t = ihipGraph*;
1339 
1340 struct hipGraphNode;
1341 alias hipGraphNode_t = hipGraphNode*;
1342 
1343 struct hipGraphExec;
1344 alias hipGraphExec_t = hipGraphExec*;
1345 
1346 enum hipGraphNodeType
1347 {
1348     hipGraphNodeTypeKernel = 1,
1349     hipGraphNodeTypeMemcpy = 2,
1350     hipGraphNodeTypeMemset = 3,
1351     hipGraphNodeTypeHost = 4,
1352     hipGraphNodeTypeGraph = 5,
1353     hipGraphNodeTypeEmpty = 6,
1354     hipGraphNodeTypeWaitEvent = 7,
1355     hipGraphNodeTypeEventRecord = 8,
1356     hipGraphNodeTypeMemcpy1D = 9,
1357     hipGraphNodeTypeMemcpyFromSymbol = 10,
1358     hipGraphNodeTypeMemcpyToSymbol = 11,
1359     hipGraphNodeTypeCount = 12
1360 }
1361 
1362 alias hipHostFn_t = void function(void* userData);
1363 
1364 struct hipHostNodeParams
1365 {
1366     hipHostFn_t fn;
1367     void* userData;
1368 }
1369 
1370 struct hipKernelNodeParams
1371 {
1372     dim3 blockDim;
1373     void** extra;
1374     void* func;
1375     dim3 gridDim;
1376     void** kernelParams;
1377     uint sharedMemBytes;
1378 }
1379 
1380 struct hipMemsetParams
1381 {
1382     void* dst;
1383     uint elementSize;
1384     size_t height;
1385     size_t pitch;
1386     uint value;
1387     size_t width;
1388 }
1389 
1390 enum hipGraphExecUpdateResult
1391 {
1392     hipGraphExecUpdateSuccess = 0x0,
1393     hipGraphExecUpdateError = 0x1,
1394 
1395     hipGraphExecUpdateErrorTopologyChanged = 0x2,
1396     hipGraphExecUpdateErrorNodeTypeChanged = 0x3,
1397     hipGraphExecUpdateErrorFunctionChanged = 0x4,
1398     hipGraphExecUpdateErrorParametersChanged = 0x5,
1399     hipGraphExecUpdateErrorNotSupported = 0x6,
1400     hipGraphExecUpdateErrorUnsupportedFunctionChange = 0x7
1401 }
1402 
1403 enum hipStreamCaptureMode
1404 {
1405     hipStreamCaptureModeGlobal = 0,
1406     hipStreamCaptureModeThreadLocal = 1,
1407     hipStreamCaptureModeRelaxed = 2
1408 }
1409 
1410 enum hipStreamCaptureStatus
1411 {
1412     hipStreamCaptureStatusNone = 0,
1413     hipStreamCaptureStatusActive = 1,
1414     hipStreamCaptureStatusInvalidated = 2
1415 }
1416 
1417 enum hipStreamUpdateCaptureDependenciesFlags
1418 {
1419     hipStreamAddCaptureDependencies = 0,
1420     hipStreamSetCaptureDependencies = 1
1421 }
1422 
1423 enum hipGraphInstantiateFlags
1424 {
1425     hipGraphInstantiateFlagAutoFreeOnLaunch = 1
1426 }
1427 
1428 hipError_t hipMemcpy_spt(void* dst, const(void)* src, size_t sizeBytes, hipMemcpyKind kind);
1429 
1430 hipError_t hipMemcpyToSymbol_spt(const(void)* symbol, const(void)* src,
1431         size_t sizeBytes, size_t offset, hipMemcpyKind kind);
1432 
1433 hipError_t hipMemcpyFromSymbol_spt(void* dst, const(void)* symbol,
1434         size_t sizeBytes, size_t offset, hipMemcpyKind kind);
1435 
1436 hipError_t hipMemcpy2D_spt(void* dst, size_t dpitch, const(void)* src,
1437         size_t spitch, size_t width, size_t height, hipMemcpyKind kind);
1438 
1439 hipError_t hipMemcpy2DToArray_spt(hipArray* dst, size_t wOffset, size_t hOffset,
1440         const(void)* src, size_t spitch, size_t width, size_t height, hipMemcpyKind kind);
1441 
1442 hipError_t hipMemcpy2DFromArray_spt(void* dst, size_t dpitch, hipArray_const_t src,
1443         size_t wOffset, size_t hOffset, size_t width, size_t height, hipMemcpyKind kind);
1444 
1445 hipError_t hipMemcpy3D_spt(const(hipMemcpy3DParms)* p);
1446 
1447 hipError_t hipMemset_spt(void* dst, int value, size_t sizeBytes);
1448 
1449 hipError_t hipMemset2D_spt(void* dst, size_t pitch, int value, size_t width, size_t height);
1450 
1451 hipError_t hipMemset3D_spt(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent);
1452 
1453 hipError_t hipMemcpyAsync_spt(void* dst, const(void)* src, size_t sizeBytes,
1454         hipMemcpyKind kind, hipStream_t stream);
1455 
1456 hipError_t hipStreamQuery_spt(hipStream_t stream);
1457 
1458 hipError_t hipStreamSynchronize_spt(hipStream_t stream);
1459 
1460 hipError_t hipStreamGetPriority_spt(hipStream_t stream, int* priority);
1461 
1462 hipError_t hipStreamWaitEvent_spt(hipStream_t stream, hipEvent_t event, uint flags);
1463 
1464 hipError_t hipStreamGetFlags_spt(hipStream_t stream, uint* flags);
1465 
1466 hipError_t hipLaunchCooperativeKernel_spt(const(void)* f, dim3 gridDim,
1467         dim3 blockDim, void** kernelParams, uint sharedMemBytes, hipStream_t hStream);
1468 
1469 hipError_t hipLaunchKernel_spt(const(void)* function_address, dim3 numBlocks,
1470         dim3 dimBlocks, void** args, size_t sharedMemBytes, hipStream_t stream);
1471 
1472 hipError_t hipInit(uint flags);
1473 
1474 hipError_t hipDriverGetVersion(int* driverVersion);
1475 
1476 hipError_t hipRuntimeGetVersion(int* runtimeVersion);
1477 
1478 hipError_t hipDeviceGet(hipDevice_t* device, int ordinal);
1479 
1480 hipError_t hipDeviceComputeCapability(int* major, int* minor, hipDevice_t device);
1481 
1482 hipError_t hipDeviceGetName(char* name, int len, hipDevice_t device);
1483 
1484 hipError_t hipDeviceGetUuid(hipUUID* uuid, hipDevice_t device);
1485 
1486 hipError_t hipDeviceGetP2PAttribute(int* value, hipDeviceP2PAttr attr, int srcDevice, int dstDevice);
1487 
1488 hipError_t hipDeviceGetPCIBusId(char* pciBusId, int len, int device);
1489 
1490 hipError_t hipDeviceGetByPCIBusId(int* device, const(char)* pciBusId);
1491 
1492 hipError_t hipDeviceTotalMem(size_t* bytes, hipDevice_t device);
1493 
1494 hipError_t hipDeviceSynchronize();
1495 
1496 hipError_t hipDeviceReset();
1497 
1498 hipError_t hipSetDevice(int deviceId);
1499 
1500 hipError_t hipGetDevice(int* deviceId);
1501 
1502 hipError_t hipGetDeviceCount(int* count);
1503 
1504 hipError_t hipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int deviceId);
1505 
1506 hipError_t hipDeviceGetDefaultMemPool(hipMemPool_t* mem_pool, int device);
1507 
1508 hipError_t hipDeviceSetMemPool(int device, hipMemPool_t mem_pool);
1509 
1510 hipError_t hipDeviceGetMemPool(hipMemPool_t* mem_pool, int device);
1511 
1512 hipError_t hipGetDeviceProperties(hipDeviceProp_t* prop, int deviceId);
1513 
1514 hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig);
1515 
1516 hipError_t hipDeviceGetCacheConfig(hipFuncCache_t* cacheConfig);
1517 
1518 hipError_t hipDeviceGetLimit(size_t* pValue, hipLimit_t limit);
1519 
1520 hipError_t hipDeviceGetSharedMemConfig(hipSharedMemConfig* pConfig);
1521 
1522 hipError_t hipGetDeviceFlags(uint* flags);
1523 
1524 hipError_t hipDeviceSetSharedMemConfig(hipSharedMemConfig config);
1525 
1526 hipError_t hipSetDeviceFlags(uint flags);
1527 
1528 hipError_t hipChooseDevice(int* device, const(hipDeviceProp_t)* prop);
1529 
1530 hipError_t hipExtGetLinkTypeAndHopCount(int device1, int device2, uint* linktype, uint* hopcount);
1531 
1532 hipError_t hipIpcGetMemHandle(hipIpcMemHandle_t* handle, void* devPtr);
1533 
1534 hipError_t hipIpcOpenMemHandle(void** devPtr, hipIpcMemHandle_t handle, uint flags);
1535 
1536 hipError_t hipIpcCloseMemHandle(void* devPtr);
1537 
1538 hipError_t hipIpcGetEventHandle(hipIpcEventHandle_t* handle, hipEvent_t event);
1539 
1540 hipError_t hipIpcOpenEventHandle(hipEvent_t* event, hipIpcEventHandle_t handle);
1541 
1542 hipError_t hipFuncSetAttribute(const(void)* func, hipFuncAttribute attr, int value);
1543 
1544 hipError_t hipFuncSetCacheConfig(const(void)* func, hipFuncCache_t config);
1545 
1546 hipError_t hipFuncSetSharedMemConfig(const(void)* func, hipSharedMemConfig config);
1547 
1548 hipError_t hipGetLastError();
1549 
1550 hipError_t hipPeekAtLastError();
1551 
1552 const(char)* hipGetErrorName(hipError_t hip_error);
1553 
1554 const(char)* hipGetErrorString(hipError_t hipError);
1555 
1556 hipError_t hipStreamCreate(hipStream_t* stream);
1557 
1558 hipError_t hipStreamCreateWithFlags(hipStream_t* stream, uint flags);
1559 
1560 hipError_t hipStreamCreateWithPriority(hipStream_t* stream, uint flags, int priority);
1561 
1562 hipError_t hipDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority);
1563 
1564 hipError_t hipStreamDestroy(hipStream_t stream);
1565 
1566 hipError_t hipStreamQuery(hipStream_t stream);
1567 
1568 hipError_t hipStreamSynchronize(hipStream_t stream);
1569 
1570 hipError_t hipStreamWaitEvent(hipStream_t stream, hipEvent_t event, uint flags);
1571 
1572 hipError_t hipStreamGetFlags(hipStream_t stream, uint* flags);
1573 
1574 hipError_t hipStreamGetPriority(hipStream_t stream, int* priority);
1575 
1576 hipError_t hipExtStreamCreateWithCUMask(hipStream_t* stream, uint cuMaskSize, const(uint)* cuMask);
1577 
1578 hipError_t hipExtStreamGetCUMask(hipStream_t stream, uint cuMaskSize, uint* cuMask);
1579 
1580 alias hipStreamCallback_t = void function(hipStream_t stream, hipError_t status, void* userData);
1581 
1582 hipError_t hipStreamAddCallback(hipStream_t stream, hipStreamCallback_t callback,
1583         void* userData, uint flags);
1584 
1585 hipError_t hipStreamWaitValue32(hipStream_t stream, void* ptr, uint value, uint flags, uint mask);
1586 
1587 hipError_t hipStreamWaitValue64(hipStream_t stream, void* ptr, ulong value, uint flags, ulong mask);
1588 
1589 hipError_t hipStreamWriteValue32(hipStream_t stream, void* ptr, uint value, uint flags);
1590 
1591 hipError_t hipStreamWriteValue64(hipStream_t stream, void* ptr, ulong value, uint flags);
1592 
1593 hipError_t hipEventCreateWithFlags(hipEvent_t* event, uint flags);
1594 
1595 hipError_t hipEventCreate(hipEvent_t* event);
1596 
1597 hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream);
1598 
1599 hipError_t hipEventDestroy(hipEvent_t event);
1600 
1601 hipError_t hipEventSynchronize(hipEvent_t event);
1602 
1603 hipError_t hipEventElapsedTime(float* ms, hipEvent_t start, hipEvent_t stop);
1604 
1605 hipError_t hipEventQuery(hipEvent_t event);
1606 
1607 hipError_t hipPointerGetAttributes(hipPointerAttribute_t* attributes, const(void)* ptr);
1608 
1609 hipError_t hipPointerGetAttribute(void* data, hipPointer_attribute attribute, hipDeviceptr_t ptr);
1610 
1611 hipError_t hipDrvPointerGetAttributes(uint numAttributes,
1612         hipPointer_attribute* attributes, void** data, hipDeviceptr_t ptr);
1613 
1614 hipError_t hipImportExternalSemaphore(hipExternalSemaphore_t* extSem_out,
1615         const(hipExternalSemaphoreHandleDesc)* semHandleDesc);
1616 
1617 hipError_t hipSignalExternalSemaphoresAsync(const(hipExternalSemaphore_t)* extSemArray,
1618         const(hipExternalSemaphoreSignalParams)* paramsArray, uint numExtSems, hipStream_t stream);
1619 
1620 hipError_t hipWaitExternalSemaphoresAsync(const(hipExternalSemaphore_t)* extSemArray,
1621         const(hipExternalSemaphoreWaitParams)* paramsArray, uint numExtSems, hipStream_t stream);
1622 
1623 hipError_t hipDestroyExternalSemaphore(hipExternalSemaphore_t extSem);
1624 
1625 hipError_t hipImportExternalMemory(hipExternalMemory_t* extMem_out,
1626         const(hipExternalMemoryHandleDesc)* memHandleDesc);
1627 
1628 hipError_t hipExternalMemoryGetMappedBuffer(void** devPtr,
1629         hipExternalMemory_t extMem, const(hipExternalMemoryBufferDesc)* bufferDesc);
1630 
1631 hipError_t hipDestroyExternalMemory(hipExternalMemory_t extMem);
1632 
1633 hipError_t hipMalloc(void** ptr, size_t size);
1634 
1635 hipError_t hipExtMallocWithFlags(void** ptr, size_t sizeBytes, uint flags);
1636 
1637 hipError_t hipMallocHost(void** ptr, size_t size);
1638 
1639 hipError_t hipMemAllocHost(void** ptr, size_t size);
1640 
1641 hipError_t hipHostMalloc(void** ptr, size_t size, uint flags);
1642 
1643 hipError_t hipMallocManaged(void** dev_ptr, size_t size, uint flags);
1644 
1645 hipError_t hipMemPrefetchAsync(const(void)* dev_ptr, size_t count, int device, hipStream_t stream);
1646 
1647 hipError_t hipMemAdvise(const(void)* dev_ptr, size_t count, hipMemoryAdvise advice, int device);
1648 
1649 hipError_t hipMemRangeGetAttribute(void* data, size_t data_size,
1650         hipMemRangeAttribute attribute, const(void)* dev_ptr, size_t count);
1651 
1652 hipError_t hipMemRangeGetAttributes(void** data, size_t* data_sizes,
1653         hipMemRangeAttribute* attributes, size_t num_attributes, const(void)* dev_ptr, size_t count);
1654 
1655 hipError_t hipStreamAttachMemAsync(hipStream_t stream, void* dev_ptr, size_t length, uint flags);
1656 
1657 hipError_t hipMallocAsync(void** dev_ptr, size_t size, hipStream_t stream);
1658 
1659 hipError_t hipFreeAsync(void* dev_ptr, hipStream_t stream);
1660 
1661 hipError_t hipMemPoolTrimTo(hipMemPool_t mem_pool, size_t min_bytes_to_hold);
1662 
1663 hipError_t hipMemPoolSetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void* value);
1664 
1665 hipError_t hipMemPoolGetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void* value);
1666 
1667 hipError_t hipMemPoolSetAccess(hipMemPool_t mem_pool,
1668         const(hipMemAccessDesc)* desc_list, size_t count);
1669 
1670 hipError_t hipMemPoolGetAccess(hipMemAccessFlags* flags, hipMemPool_t mem_pool,
1671         hipMemLocation* location);
1672 
1673 hipError_t hipMemPoolCreate(hipMemPool_t* mem_pool, const(hipMemPoolProps)* pool_props);
1674 
1675 hipError_t hipMemPoolDestroy(hipMemPool_t mem_pool);
1676 
1677 hipError_t hipMallocFromPoolAsync(void** dev_ptr, size_t size,
1678         hipMemPool_t mem_pool, hipStream_t stream);
1679 
1680 hipError_t hipMemPoolExportToShareableHandle(void* shared_handle,
1681         hipMemPool_t mem_pool, hipMemAllocationHandleType handle_type, uint flags);
1682 
1683 hipError_t hipMemPoolImportFromShareableHandle(hipMemPool_t* mem_pool,
1684         void* shared_handle, hipMemAllocationHandleType handle_type, uint flags);
1685 
1686 hipError_t hipMemPoolExportPointer(hipMemPoolPtrExportData* export_data, void* dev_ptr);
1687 
1688 hipError_t hipMemPoolImportPointer(void** dev_ptr, hipMemPool_t mem_pool,
1689         hipMemPoolPtrExportData* export_data);
1690 
1691 hipError_t hipHostAlloc(void** ptr, size_t size, uint flags);
1692 
1693 hipError_t hipHostGetDevicePointer(void** devPtr, void* hstPtr, uint flags);
1694 
1695 hipError_t hipHostGetFlags(uint* flagsPtr, void* hostPtr);
1696 
1697 hipError_t hipHostRegister(void* hostPtr, size_t sizeBytes, uint flags);
1698 
1699 hipError_t hipHostUnregister(void* hostPtr);
1700 
1701 hipError_t hipMallocPitch(void** ptr, size_t* pitch, size_t width, size_t height);
1702 
1703 hipError_t hipMemAllocPitch(hipDeviceptr_t* dptr, size_t* pitch,
1704         size_t widthInBytes, size_t height, uint elementSizeBytes);
1705 
1706 hipError_t hipFree(void* ptr);
1707 
1708 hipError_t hipFreeHost(void* ptr);
1709 
1710 hipError_t hipHostFree(void* ptr);
1711 
1712 hipError_t hipMemcpy(void* dst, const(void)* src, size_t sizeBytes, hipMemcpyKind kind);
1713 
1714 hipError_t hipMemcpyWithStream(void* dst, const(void)* src, size_t sizeBytes,
1715         hipMemcpyKind kind, hipStream_t stream);
1716 
1717 hipError_t hipMemcpyHtoD(hipDeviceptr_t dst, void* src, size_t sizeBytes);
1718 
1719 hipError_t hipMemcpyDtoH(void* dst, hipDeviceptr_t src, size_t sizeBytes);
1720 
1721 hipError_t hipMemcpyDtoD(hipDeviceptr_t dst, hipDeviceptr_t src, size_t sizeBytes);
1722 
1723 hipError_t hipMemcpyHtoDAsync(hipDeviceptr_t dst, void* src, size_t sizeBytes, hipStream_t stream);
1724 
1725 hipError_t hipMemcpyDtoHAsync(void* dst, hipDeviceptr_t src, size_t sizeBytes, hipStream_t stream);
1726 
1727 hipError_t hipMemcpyDtoDAsync(hipDeviceptr_t dst, hipDeviceptr_t src,
1728         size_t sizeBytes, hipStream_t stream);
1729 
1730 hipError_t hipModuleGetGlobal(hipDeviceptr_t* dptr, size_t* bytes,
1731         hipModule_t hmod, const(char)* name);
1732 
1733 hipError_t hipGetSymbolAddress(void** devPtr, const(void)* symbol);
1734 
1735 hipError_t hipGetSymbolSize(size_t* size, const(void)* symbol);
1736 
1737 hipError_t hipMemcpyToSymbol(const(void)* symbol, const(void)* src,
1738         size_t sizeBytes, size_t offset, hipMemcpyKind kind);
1739 
1740 hipError_t hipMemcpyToSymbolAsync(const(void)* symbol, const(void)* src,
1741         size_t sizeBytes, size_t offset, hipMemcpyKind kind, hipStream_t stream);
1742 
1743 hipError_t hipMemcpyFromSymbol(void* dst, const(void)* symbol, size_t sizeBytes,
1744         size_t offset, hipMemcpyKind kind);
1745 
1746 hipError_t hipMemcpyFromSymbolAsync(void* dst, const(void)* symbol,
1747         size_t sizeBytes, size_t offset, hipMemcpyKind kind, hipStream_t stream);
1748 
1749 hipError_t hipMemcpyAsync(void* dst, const(void)* src, size_t sizeBytes,
1750         hipMemcpyKind kind, hipStream_t stream);
1751 
1752 hipError_t hipMemset(void* dst, int value, size_t sizeBytes);
1753 
1754 hipError_t hipMemsetD8(hipDeviceptr_t dest, ubyte value, size_t count);
1755 
1756 hipError_t hipMemsetD8Async(hipDeviceptr_t dest, ubyte value, size_t count, hipStream_t stream);
1757 
1758 hipError_t hipMemsetD16(hipDeviceptr_t dest, ushort value, size_t count);
1759 
1760 hipError_t hipMemsetD16Async(hipDeviceptr_t dest, ushort value, size_t count, hipStream_t stream);
1761 
1762 hipError_t hipMemsetD32(hipDeviceptr_t dest, int value, size_t count);
1763 
1764 hipError_t hipMemsetAsync(void* dst, int value, size_t sizeBytes, hipStream_t stream);
1765 
1766 hipError_t hipMemsetD32Async(hipDeviceptr_t dst, int value, size_t count, hipStream_t stream);
1767 
1768 hipError_t hipMemset2D(void* dst, size_t pitch, int value, size_t width, size_t height);
1769 
1770 hipError_t hipMemset2DAsync(void* dst, size_t pitch, int value, size_t width,
1771         size_t height, hipStream_t stream);
1772 
1773 hipError_t hipMemset3D(hipPitchedPtr pitchedDevPtr, int value, hipExtent extent);
1774 
1775 hipError_t hipMemset3DAsync(hipPitchedPtr pitchedDevPtr, int value,
1776         hipExtent extent, hipStream_t stream);
1777 
1778 hipError_t hipMemGetInfo(size_t* free, size_t* total);
1779 hipError_t hipMemPtrGetInfo(void* ptr, size_t* size);
1780 
1781 hipError_t hipMallocArray(hipArray** array, const(hipChannelFormatDesc)* desc,
1782         size_t width, size_t height, uint flags);
1783 hipError_t hipArrayCreate(hipArray** pHandle, const(HIP_ARRAY_DESCRIPTOR)* pAllocateArray);
1784 hipError_t hipArrayDestroy(hipArray* array);
1785 hipError_t hipArray3DCreate(hipArray** array, const(HIP_ARRAY3D_DESCRIPTOR)* pAllocateArray);
1786 hipError_t hipMalloc3D(hipPitchedPtr* pitchedDevPtr, hipExtent extent);
1787 
1788 hipError_t hipFreeArray(hipArray* array);
1789 
1790 hipError_t hipFreeMipmappedArray(hipMipmappedArray_t mipmappedArray);
1791 
1792 hipError_t hipMalloc3DArray(hipArray** array,
1793         const(hipChannelFormatDesc)* desc, hipExtent extent, uint flags);
1794 
1795 hipError_t hipMallocMipmappedArray(hipMipmappedArray_t* mipmappedArray,
1796         const(hipChannelFormatDesc)* desc, hipExtent extent, uint numLevels, uint flags);
1797 
1798 hipError_t hipGetMipmappedArrayLevel(hipArray_t* levelArray,
1799         hipMipmappedArray_const_t mipmappedArray, uint level);
1800 
1801 hipError_t hipMemcpy2D(void* dst, size_t dpitch, const(void)* src, size_t spitch,
1802         size_t width, size_t height, hipMemcpyKind kind);
1803 
1804 hipError_t hipMemcpyParam2D(const(hip_Memcpy2D)* pCopy);
1805 
1806 hipError_t hipMemcpyParam2DAsync(const(hip_Memcpy2D)* pCopy, hipStream_t stream);
1807 
1808 hipError_t hipMemcpy2DAsync(void* dst, size_t dpitch, const(void)* src,
1809         size_t spitch, size_t width, size_t height, hipMemcpyKind kind, hipStream_t stream);
1810 
1811 hipError_t hipMemcpy2DToArray(hipArray* dst, size_t wOffset, size_t hOffset,
1812         const(void)* src, size_t spitch, size_t width, size_t height, hipMemcpyKind kind);
1813 
1814 hipError_t hipMemcpy2DToArrayAsync(hipArray* dst, size_t wOffset, size_t hOffset, const(void)* src,
1815         size_t spitch, size_t width, size_t height, hipMemcpyKind kind, hipStream_t stream);
1816 
1817 hipError_t hipMemcpyToArray(hipArray* dst, size_t wOffset, size_t hOffset,
1818         const(void)* src, size_t count, hipMemcpyKind kind);
1819 
1820 hipError_t hipMemcpyFromArray(void* dst, hipArray_const_t srcArray,
1821         size_t wOffset, size_t hOffset, size_t count, hipMemcpyKind kind);
1822 
1823 hipError_t hipMemcpy2DFromArray(void* dst, size_t dpitch, hipArray_const_t src,
1824         size_t wOffset, size_t hOffset, size_t width, size_t height, hipMemcpyKind kind);
1825 
1826 hipError_t hipMemcpy2DFromArrayAsync(void* dst, size_t dpitch, hipArray_const_t src, size_t wOffset,
1827         size_t hOffset, size_t width, size_t height, hipMemcpyKind kind, hipStream_t stream);
1828 
1829 hipError_t hipMemcpyAtoH(void* dst, hipArray* srcArray, size_t srcOffset, size_t count);
1830 
1831 hipError_t hipMemcpyHtoA(hipArray* dstArray, size_t dstOffset, const(void)* srcHost, size_t count);
1832 
1833 hipError_t hipMemcpy3D(const(hipMemcpy3DParms)* p);
1834 
1835 hipError_t hipMemcpy3DAsync(const(hipMemcpy3DParms)* p, hipStream_t stream);
1836 
1837 hipError_t hipDrvMemcpy3D(const(HIP_MEMCPY3D)* pCopy);
1838 
1839 hipError_t hipDrvMemcpy3DAsync(const(HIP_MEMCPY3D)* pCopy, hipStream_t stream);
1840 
1841 hipError_t hipDeviceCanAccessPeer(int* canAccessPeer, int deviceId, int peerDeviceId);
1842 
1843 hipError_t hipDeviceEnablePeerAccess(int peerDeviceId, uint flags);
1844 
1845 hipError_t hipDeviceDisablePeerAccess(int peerDeviceId);
1846 
1847 hipError_t hipMemGetAddressRange(hipDeviceptr_t* pbase, size_t* psize, hipDeviceptr_t dptr);
1848 
1849 hipError_t hipMemcpyPeer(void* dst, int dstDeviceId, const(void)* src,
1850         int srcDeviceId, size_t sizeBytes);
1851 
1852 hipError_t hipMemcpyPeerAsync(void* dst, int dstDeviceId, const(void)* src,
1853         int srcDevice, size_t sizeBytes, hipStream_t stream);
1854 
1855 hipError_t hipCtxCreate(hipCtx_t* ctx, uint flags, hipDevice_t device);
1856 
1857 hipError_t hipCtxDestroy(hipCtx_t ctx);
1858 
1859 hipError_t hipCtxPopCurrent(hipCtx_t* ctx);
1860 
1861 hipError_t hipCtxPushCurrent(hipCtx_t ctx);
1862 
1863 hipError_t hipCtxSetCurrent(hipCtx_t ctx);
1864 
1865 hipError_t hipCtxGetCurrent(hipCtx_t* ctx);
1866 
1867 hipError_t hipCtxGetDevice(hipDevice_t* device);
1868 
1869 hipError_t hipCtxGetApiVersion(hipCtx_t ctx, int* apiVersion);
1870 
1871 hipError_t hipCtxGetCacheConfig(hipFuncCache_t* cacheConfig);
1872 
1873 hipError_t hipCtxSetCacheConfig(hipFuncCache_t cacheConfig);
1874 
1875 hipError_t hipCtxSetSharedMemConfig(hipSharedMemConfig config);
1876 
1877 hipError_t hipCtxGetSharedMemConfig(hipSharedMemConfig* pConfig);
1878 
1879 hipError_t hipCtxSynchronize();
1880 
1881 hipError_t hipCtxGetFlags(uint* flags);
1882 
1883 hipError_t hipCtxEnablePeerAccess(hipCtx_t peerCtx, uint flags);
1884 
1885 hipError_t hipCtxDisablePeerAccess(hipCtx_t peerCtx);
1886 
1887 hipError_t hipDevicePrimaryCtxGetState(hipDevice_t dev, uint* flags, int* active);
1888 
1889 hipError_t hipDevicePrimaryCtxRelease(hipDevice_t dev);
1890 
1891 hipError_t hipDevicePrimaryCtxRetain(hipCtx_t* pctx, hipDevice_t dev);
1892 
1893 hipError_t hipDevicePrimaryCtxReset(hipDevice_t dev);
1894 
1895 hipError_t hipDevicePrimaryCtxSetFlags(hipDevice_t dev, uint flags);
1896 
1897 hipError_t hipModuleLoad(hipModule_t* module_, const(char)* fname);
1898 
1899 hipError_t hipModuleUnload(hipModule_t module_);
1900 
1901 hipError_t hipModuleGetFunction(hipFunction_t* function_, hipModule_t module_, const(char)* kname);
1902 
1903 hipError_t hipFuncGetAttributes(hipFuncAttributes* attr, const(void)* func);
1904 
1905 hipError_t hipFuncGetAttribute(int* value, hipFunction_attribute attrib, hipFunction_t hfunc);
1906 
1907 hipError_t hipModuleGetTexRef(textureReference** texRef, hipModule_t hmod, const(char)* name);
1908 
1909 hipError_t hipModuleLoadData(hipModule_t* module_, const(void)* image);
1910 
1911 hipError_t hipModuleLoadDataEx(hipModule_t* module_, const(void)* image,
1912         uint numOptions, hipJitOption* options, void** optionValues);
1913 
1914 hipError_t hipModuleLaunchKernel(hipFunction_t f, uint gridDimX, uint gridDimY, uint gridDimZ, uint blockDimX,
1915         uint blockDimY, uint blockDimZ, uint sharedMemBytes, hipStream_t stream,
1916         void** kernelParams, void** extra);
1917 
1918 hipError_t hipLaunchCooperativeKernel(const(void)* f, dim3 gridDim,
1919         dim3 blockDimX, void** kernelParams, uint sharedMemBytes, hipStream_t stream);
1920 
1921 hipError_t hipLaunchCooperativeKernelMultiDevice(hipLaunchParams* launchParamsList,
1922         int numDevices, uint flags);
1923 
1924 hipError_t hipExtLaunchMultiKernelMultiDevice(hipLaunchParams* launchParamsList,
1925         int numDevices, uint flags);
1926 
1927 hipError_t hipModuleOccupancyMaxPotentialBlockSize(int* gridSize,
1928         int* blockSize, hipFunction_t f, size_t dynSharedMemPerBlk, int blockSizeLimit);
1929 
1930 hipError_t hipModuleOccupancyMaxPotentialBlockSizeWithFlags(int* gridSize,
1931         int* blockSize, hipFunction_t f, size_t dynSharedMemPerBlk, int blockSizeLimit, uint flags);
1932 
1933 hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks,
1934         hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk);
1935 
1936 hipError_t hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks,
1937         hipFunction_t f, int blockSize, size_t dynSharedMemPerBlk, uint flags);
1938 
1939 hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks,
1940         const(void)* f, int blockSize, size_t dynSharedMemPerBlk);
1941 
1942 hipError_t hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks,
1943         const(void)* f, int blockSize, size_t dynSharedMemPerBlk, uint flags);
1944 
1945 hipError_t hipOccupancyMaxPotentialBlockSize(int* gridSize, int* blockSize,
1946         const(void)* f, size_t dynSharedMemPerBlk, int blockSizeLimit);
1947 
1948 hipError_t hipProfilerStart();
1949 
1950 hipError_t hipProfilerStop();
1951 
1952 hipError_t hipConfigureCall(dim3 gridDim, dim3 blockDim, size_t sharedMem, hipStream_t stream);
1953 
1954 hipError_t hipSetupArgument(const(void)* arg, size_t size, size_t offset);
1955 
1956 hipError_t hipLaunchByPtr(const(void)* func);
1957 
1958 hipError_t __hipPushCallConfiguration(dim3 gridDim, dim3 blockDim,
1959         size_t sharedMem, hipStream_t stream);
1960 
1961 hipError_t __hipPopCallConfiguration(dim3* gridDim, dim3* blockDim,
1962         size_t* sharedMem, hipStream_t* stream);
1963 
1964 hipError_t hipLaunchKernel(const(void)* function_address, dim3 numBlocks,
1965         dim3 dimBlocks, void** args, size_t sharedMemBytes, hipStream_t stream);
1966 
1967 hipError_t hipDrvMemcpy2DUnaligned(const(hip_Memcpy2D)* pCopy);
1968 
1969 hipError_t hipExtLaunchKernel(const(void)* function_address, dim3 numBlocks, dim3 dimBlocks, void** args,
1970         size_t sharedMemBytes, hipStream_t stream, hipEvent_t startEvent,
1971         hipEvent_t stopEvent, int flags);
1972 
1973 hipError_t hipBindTextureToMipmappedArray(const(textureReference)* tex,
1974         hipMipmappedArray_const_t mipmappedArray, const(hipChannelFormatDesc)* desc);
1975 
1976 hipError_t hipGetTextureReference(const(textureReference*)* texref, const(void)* symbol);
1977 
1978 hipError_t hipCreateTextureObject(hipTextureObject_t* pTexObject, const(hipResourceDesc)* pResDesc,
1979         const(hipTextureDesc)* pTexDesc, const(hipResourceViewDesc)* pResViewDesc);
1980 
1981 hipError_t hipDestroyTextureObject(hipTextureObject_t textureObject);
1982 
1983 hipError_t hipGetChannelDesc(hipChannelFormatDesc* desc, hipArray_const_t array);
1984 
1985 hipError_t hipGetTextureObjectResourceDesc(hipResourceDesc* pResDesc,
1986         hipTextureObject_t textureObject);
1987 
1988 hipError_t hipGetTextureObjectResourceViewDesc(hipResourceViewDesc* pResViewDesc,
1989         hipTextureObject_t textureObject);
1990 
1991 hipError_t hipGetTextureObjectTextureDesc(hipTextureDesc* pTexDesc, hipTextureObject_t textureObject);
1992 
1993 hipError_t hipTexRefSetAddressMode(textureReference* texRef, int dim, hipTextureAddressMode am);
1994 hipError_t hipTexRefSetArray(textureReference* tex, hipArray_const_t array, uint flags);
1995 hipError_t hipTexRefSetFilterMode(textureReference* texRef, hipTextureFilterMode fm);
1996 hipError_t hipTexRefSetFlags(textureReference* texRef, uint Flags);
1997 hipError_t hipTexRefSetFormat(textureReference* texRef, hipArray_Format fmt,
1998         int NumPackedComponents);
1999 hipError_t hipTexObjectCreate(hipTextureObject_t* pTexObject, const(HIP_RESOURCE_DESC)* pResDesc,
2000         const(HIP_TEXTURE_DESC)* pTexDesc, const(HIP_RESOURCE_VIEW_DESC)* pResViewDesc);
2001 hipError_t hipTexObjectDestroy(hipTextureObject_t texObject);
2002 hipError_t hipTexObjectGetResourceDesc(HIP_RESOURCE_DESC* pResDesc, hipTextureObject_t texObject);
2003 hipError_t hipTexObjectGetResourceViewDesc(HIP_RESOURCE_VIEW_DESC* pResViewDesc,
2004         hipTextureObject_t texObject);
2005 hipError_t hipTexObjectGetTextureDesc(HIP_TEXTURE_DESC* pTexDesc, hipTextureObject_t texObject);
2006 
2007 hipError_t hipBindTexture(size_t* offset, const(textureReference)* tex,
2008         const(void)* devPtr, const(hipChannelFormatDesc)* desc, size_t size);
2009 hipError_t hipBindTexture2D(size_t* offset, const(textureReference)* tex,
2010         const(void)* devPtr, const(hipChannelFormatDesc)* desc, size_t width,
2011         size_t height, size_t pitch);
2012 hipError_t hipBindTextureToArray(const(textureReference)* tex,
2013         hipArray_const_t array, const(hipChannelFormatDesc)* desc);
2014 hipError_t hipGetTextureAlignmentOffset(size_t* offset, const(textureReference)* texref);
2015 hipError_t hipUnbindTexture(const(textureReference)* tex);
2016 hipError_t hipTexRefGetAddress(hipDeviceptr_t* dev_ptr, const(textureReference)* texRef);
2017 hipError_t hipTexRefGetAddressMode(hipTextureAddressMode* pam,
2018         const(textureReference)* texRef, int dim);
2019 hipError_t hipTexRefGetFilterMode(hipTextureFilterMode* pfm, const(textureReference)* texRef);
2020 hipError_t hipTexRefGetFlags(uint* pFlags, const(textureReference)* texRef);
2021 hipError_t hipTexRefGetFormat(hipArray_Format* pFormat, int* pNumChannels,
2022         const(textureReference)* texRef);
2023 hipError_t hipTexRefGetMaxAnisotropy(int* pmaxAnsio, const(textureReference)* texRef);
2024 hipError_t hipTexRefGetMipmapFilterMode(hipTextureFilterMode* pfm, const(textureReference)* texRef);
2025 hipError_t hipTexRefGetMipmapLevelBias(float* pbias, const(textureReference)* texRef);
2026 hipError_t hipTexRefGetMipmapLevelClamp(float* pminMipmapLevelClamp,
2027         float* pmaxMipmapLevelClamp, const(textureReference)* texRef);
2028 hipError_t hipTexRefGetMipMappedArray(hipMipmappedArray_t* pArray, const(textureReference)* texRef);
2029 hipError_t hipTexRefSetAddress(size_t* ByteOffset, textureReference* texRef,
2030         hipDeviceptr_t dptr, size_t bytes);
2031 hipError_t hipTexRefSetAddress2D(textureReference* texRef,
2032         const(HIP_ARRAY_DESCRIPTOR)* desc, hipDeviceptr_t dptr, size_t Pitch);
2033 hipError_t hipTexRefSetMaxAnisotropy(textureReference* texRef, uint maxAniso);
2034 
2035 hipError_t hipTexRefSetBorderColor(textureReference* texRef, float* pBorderColor);
2036 hipError_t hipTexRefSetMipmapFilterMode(textureReference* texRef, hipTextureFilterMode fm);
2037 hipError_t hipTexRefSetMipmapLevelBias(textureReference* texRef, float bias);
2038 hipError_t hipTexRefSetMipmapLevelClamp(textureReference* texRef,
2039         float minMipMapLevelClamp, float maxMipMapLevelClamp);
2040 hipError_t hipTexRefSetMipmappedArray(textureReference* texRef,
2041         hipMipmappedArray* mipmappedArray, uint Flags);
2042 hipError_t hipMipmappedArrayCreate(hipMipmappedArray_t* pHandle,
2043         HIP_ARRAY3D_DESCRIPTOR* pMipmappedArrayDesc, uint numMipmapLevels);
2044 hipError_t hipMipmappedArrayDestroy(hipMipmappedArray_t hMipmappedArray);
2045 hipError_t hipMipmappedArrayGetLevel(hipArray_t* pLevelArray,
2046         hipMipmappedArray_t hMipMappedArray, uint level);
2047 
2048 hipError_t hipRegisterApiCallback(uint id, void* fun, void* arg);
2049 hipError_t hipRemoveApiCallback(uint id);
2050 hipError_t hipRegisterActivityCallback(uint id, void* fun, void* arg);
2051 hipError_t hipRemoveActivityCallback(uint id);
2052 const(char)* hipApiName(uint id);
2053 const(char)* hipKernelNameRef(const hipFunction_t f);
2054 const(char)* hipKernelNameRefByPtr(const(void)* hostFunction, hipStream_t stream);
2055 int hipGetStreamDeviceId(hipStream_t stream);
2056 
2057 hipError_t hipStreamBeginCapture(hipStream_t stream, hipStreamCaptureMode mode);
2058 
2059 hipError_t hipStreamEndCapture(hipStream_t stream, hipGraph_t* pGraph);
2060 
2061 hipError_t hipStreamGetCaptureInfo(hipStream_t stream,
2062         hipStreamCaptureStatus* pCaptureStatus, ulong* pId);
2063 
2064 hipError_t hipStreamGetCaptureInfo_v2(hipStream_t stream, hipStreamCaptureStatus* captureStatus_out, ulong* id_out,
2065         hipGraph_t* graph_out, const(hipGraphNode_t*)* dependencies_out,
2066         size_t* numDependencies_out);
2067 
2068 hipError_t hipStreamIsCapturing(hipStream_t stream, hipStreamCaptureStatus* pCaptureStatus);
2069 
2070 hipError_t hipStreamUpdateCaptureDependencies(hipStream_t stream,
2071         hipGraphNode_t* dependencies, size_t numDependencies, uint flags);
2072 
2073 hipError_t hipLaunchHostFunc(hipStream_t stream, hipHostFn_t fn, void* userData);
2074 
2075 hipError_t hipThreadExchangeStreamCaptureMode(hipStreamCaptureMode* mode);
2076 
2077 hipError_t hipGraphCreate(hipGraph_t* pGraph, uint flags);
2078 
2079 hipError_t hipGraphDestroy(hipGraph_t graph);
2080 
2081 hipError_t hipGraphAddDependencies(hipGraph_t graph, const(hipGraphNode_t)* from,
2082         const(hipGraphNode_t)* to, size_t numDependencies);
2083 
2084 hipError_t hipGraphRemoveDependencies(hipGraph_t graph,
2085         const(hipGraphNode_t)* from, const(hipGraphNode_t)* to, size_t numDependencies);
2086 
2087 hipError_t hipGraphGetEdges(hipGraph_t graph, hipGraphNode_t* from,
2088         hipGraphNode_t* to, size_t* numEdges);
2089 
2090 hipError_t hipGraphGetNodes(hipGraph_t graph, hipGraphNode_t* nodes, size_t* numNodes);
2091 
2092 hipError_t hipGraphGetRootNodes(hipGraph_t graph, hipGraphNode_t* pRootNodes,
2093         size_t* pNumRootNodes);
2094 
2095 hipError_t hipGraphNodeGetDependencies(hipGraphNode_t node,
2096         hipGraphNode_t* pDependencies, size_t* pNumDependencies);
2097 
2098 hipError_t hipGraphNodeGetDependentNodes(hipGraphNode_t node,
2099         hipGraphNode_t* pDependentNodes, size_t* pNumDependentNodes);
2100 
2101 hipError_t hipGraphNodeGetType(hipGraphNode_t node, hipGraphNodeType* pType);
2102 
2103 hipError_t hipGraphDestroyNode(hipGraphNode_t node);
2104 
2105 hipError_t hipGraphClone(hipGraph_t* pGraphClone, hipGraph_t originalGraph);
2106 
2107 hipError_t hipGraphNodeFindInClone(hipGraphNode_t* pNode,
2108         hipGraphNode_t originalNode, hipGraph_t clonedGraph);
2109 
2110 hipError_t hipGraphInstantiate(hipGraphExec_t* pGraphExec, hipGraph_t graph,
2111         hipGraphNode_t* pErrorNode, char* pLogBuffer, size_t bufferSize);
2112 
2113 hipError_t hipGraphInstantiateWithFlags(hipGraphExec_t* pGraphExec, hipGraph_t graph, ulong flags);
2114 
2115 hipError_t hipGraphLaunch(hipGraphExec_t graphExec, hipStream_t stream);
2116 
2117 hipError_t hipGraphExecDestroy(hipGraphExec_t graphExec);
2118 
2119 hipError_t hipGraphExecUpdate(hipGraphExec_t hGraphExec, hipGraph_t hGraph,
2120         hipGraphNode_t* hErrorNode_out, hipGraphExecUpdateResult* updateResult_out);
2121 
2122 hipError_t hipGraphAddKernelNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
2123         const(hipGraphNode_t)* pDependencies, size_t numDependencies,
2124         const(hipKernelNodeParams)* pNodeParams);
2125 
2126 hipError_t hipGraphKernelNodeGetParams(hipGraphNode_t node, hipKernelNodeParams* pNodeParams);
2127 
2128 hipError_t hipGraphKernelNodeSetParams(hipGraphNode_t node, const(hipKernelNodeParams)* pNodeParams);
2129 
2130 hipError_t hipGraphExecKernelNodeSetParams(hipGraphExec_t hGraphExec,
2131         hipGraphNode_t node, const(hipKernelNodeParams)* pNodeParams);
2132 
2133 hipError_t hipGraphAddMemcpyNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
2134         const(hipGraphNode_t)* pDependencies, size_t numDependencies,
2135         const(hipMemcpy3DParms)* pCopyParams);
2136 
2137 hipError_t hipGraphMemcpyNodeGetParams(hipGraphNode_t node, hipMemcpy3DParms* pNodeParams);
2138 
2139 hipError_t hipGraphMemcpyNodeSetParams(hipGraphNode_t node, const(hipMemcpy3DParms)* pNodeParams);
2140 
2141 hipError_t hipGraphKernelNodeSetAttribute(hipGraphNode_t hNode,
2142         hipKernelNodeAttrID attr, const(hipKernelNodeAttrValue)* value);
2143 
2144 hipError_t hipGraphKernelNodeGetAttribute(hipGraphNode_t hNode,
2145         hipKernelNodeAttrID attr, hipKernelNodeAttrValue* value);
2146 
2147 hipError_t hipGraphExecMemcpyNodeSetParams(hipGraphExec_t hGraphExec,
2148         hipGraphNode_t node, hipMemcpy3DParms* pNodeParams);
2149 
2150 hipError_t hipGraphAddMemcpyNode1D(hipGraphNode_t* pGraphNode, hipGraph_t graph,
2151         const(hipGraphNode_t)* pDependencies, size_t numDependencies, void* dst,
2152         const(void)* src, size_t count, hipMemcpyKind kind);
2153 
2154 hipError_t hipGraphMemcpyNodeSetParams1D(hipGraphNode_t node, void* dst,
2155         const(void)* src, size_t count, hipMemcpyKind kind);
2156 
2157 hipError_t hipGraphExecMemcpyNodeSetParams1D(hipGraphExec_t hGraphExec,
2158         hipGraphNode_t node, void* dst, const(void)* src, size_t count, hipMemcpyKind kind);
2159 
2160 hipError_t hipGraphAddMemcpyNodeFromSymbol(hipGraphNode_t* pGraphNode, hipGraph_t graph,
2161         const(hipGraphNode_t)* pDependencies, size_t numDependencies, void* dst,
2162         const(void)* symbol, size_t count, size_t offset, hipMemcpyKind kind);
2163 
2164 hipError_t hipGraphMemcpyNodeSetParamsFromSymbol(hipGraphNode_t node, void* dst,
2165         const(void)* symbol, size_t count, size_t offset, hipMemcpyKind kind);
2166 
2167 hipError_t hipGraphExecMemcpyNodeSetParamsFromSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node,
2168         void* dst, const(void)* symbol, size_t count, size_t offset, hipMemcpyKind kind);
2169 
2170 hipError_t hipGraphAddMemcpyNodeToSymbol(hipGraphNode_t* pGraphNode, hipGraph_t graph,
2171         const(hipGraphNode_t)* pDependencies, size_t numDependencies, const(void)* symbol,
2172         const(void)* src, size_t count, size_t offset, hipMemcpyKind kind);
2173 
2174 hipError_t hipGraphMemcpyNodeSetParamsToSymbol(hipGraphNode_t node,
2175         const(void)* symbol, const(void)* src, size_t count, size_t offset, hipMemcpyKind kind);
2176 
2177 hipError_t hipGraphExecMemcpyNodeSetParamsToSymbol(hipGraphExec_t hGraphExec, hipGraphNode_t node,
2178         const(void)* symbol, const(void)* src, size_t count, size_t offset, hipMemcpyKind kind);
2179 
2180 hipError_t hipGraphAddMemsetNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
2181         const(hipGraphNode_t)* pDependencies, size_t numDependencies,
2182         const(hipMemsetParams)* pMemsetParams);
2183 
2184 hipError_t hipGraphMemsetNodeGetParams(hipGraphNode_t node, hipMemsetParams* pNodeParams);
2185 
2186 hipError_t hipGraphMemsetNodeSetParams(hipGraphNode_t node, const(hipMemsetParams)* pNodeParams);
2187 
2188 hipError_t hipGraphExecMemsetNodeSetParams(hipGraphExec_t hGraphExec,
2189         hipGraphNode_t node, const(hipMemsetParams)* pNodeParams);
2190 
2191 hipError_t hipGraphAddHostNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
2192         const(hipGraphNode_t)* pDependencies, size_t numDependencies,
2193         const(hipHostNodeParams)* pNodeParams);
2194 
2195 hipError_t hipGraphHostNodeGetParams(hipGraphNode_t node, hipHostNodeParams* pNodeParams);
2196 
2197 hipError_t hipGraphHostNodeSetParams(hipGraphNode_t node, const(hipHostNodeParams)* pNodeParams);
2198 
2199 hipError_t hipGraphExecHostNodeSetParams(hipGraphExec_t hGraphExec,
2200         hipGraphNode_t node, const(hipHostNodeParams)* pNodeParams);
2201 
2202 hipError_t hipGraphAddChildGraphNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
2203         const(hipGraphNode_t)* pDependencies, size_t numDependencies, hipGraph_t childGraph);
2204 
2205 hipError_t hipGraphChildGraphNodeGetGraph(hipGraphNode_t node, hipGraph_t* pGraph);
2206 
2207 hipError_t hipGraphExecChildGraphNodeSetParams(hipGraphExec_t hGraphExec,
2208         hipGraphNode_t node, hipGraph_t childGraph);
2209 
2210 hipError_t hipGraphAddEmptyNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
2211         const(hipGraphNode_t)* pDependencies, size_t numDependencies);
2212 
2213 hipError_t hipGraphAddEventRecordNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
2214         const(hipGraphNode_t)* pDependencies, size_t numDependencies, hipEvent_t event);
2215 
2216 hipError_t hipGraphEventRecordNodeGetEvent(hipGraphNode_t node, hipEvent_t* event_out);
2217 
2218 hipError_t hipGraphEventRecordNodeSetEvent(hipGraphNode_t node, hipEvent_t event);
2219 
2220 hipError_t hipGraphExecEventRecordNodeSetEvent(hipGraphExec_t hGraphExec,
2221         hipGraphNode_t hNode, hipEvent_t event);
2222 
2223 hipError_t hipGraphAddEventWaitNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
2224         const(hipGraphNode_t)* pDependencies, size_t numDependencies, hipEvent_t event);
2225 
2226 hipError_t hipGraphEventWaitNodeGetEvent(hipGraphNode_t node, hipEvent_t* event_out);
2227 
2228 hipError_t hipGraphEventWaitNodeSetEvent(hipGraphNode_t node, hipEvent_t event);
2229 
2230 hipError_t hipGraphExecEventWaitNodeSetEvent(hipGraphExec_t hGraphExec,
2231         hipGraphNode_t hNode, hipEvent_t event);
2232 
2233 struct hipMemAllocationProp
2234 {
2235     ubyte compressionType;
2236     hipMemLocation location;
2237     hipMemAllocationHandleType requestedHandleType;
2238     hipMemAllocationType type;
2239     ushort usage;
2240     void* win32HandleMetaData;
2241 }
2242 
2243 struct ihipMemGenericAllocationHandle;
2244 alias hipMemGenericAllocationHandle_t = ihipMemGenericAllocationHandle*;
2245 
2246 enum hipMemAllocationGranularity_flags
2247 {
2248     hipMemAllocationGranularityMinimum = 0x0,
2249     hipMemAllocationGranularityRecommended = 0x1
2250 }
2251 
2252 enum hipMemHandleType
2253 {
2254     hipMemHandleTypeGeneric = 0x0
2255 }
2256 
2257 enum hipMemOperationType
2258 {
2259     hipMemOperationTypeMap = 0x1,
2260     hipMemOperationTypeUnmap = 0x2
2261 }
2262 
2263 enum hipArraySparseSubresourceType
2264 {
2265     hipArraySparseSubresourceTypeSparseLevel = 0x0,
2266     hipArraySparseSubresourceTypeMiptail = 0x1
2267 }
2268 
2269 struct hipArrayMapInfo
2270 {
2271     hipResourceType resourceType;
2272 
2273     union _Anonymous_21
2274     {
2275         hipMipmappedArray mipmap;
2276         hipArray_t array;
2277     }
2278 
2279     _Anonymous_21 resource;
2280     hipArraySparseSubresourceType subresourceType;
2281 
2282     union _Anonymous_22
2283     {
2284         struct _Anonymous_23
2285         {
2286             uint level;
2287             uint layer;
2288             uint offsetX;
2289             uint offsetY;
2290             uint offsetZ;
2291             uint extentWidth;
2292             uint extentHeight;
2293             uint extentDepth;
2294         }
2295 
2296         _Anonymous_23 sparseLevel;
2297 
2298         struct _Anonymous_24
2299         {
2300             uint layer;
2301             ulong offset;
2302             ulong size;
2303         }
2304 
2305         _Anonymous_24 miptail;
2306     }
2307 
2308     _Anonymous_22 subresource;
2309     hipMemOperationType memOperationType;
2310     hipMemHandleType memHandleType;
2311 
2312     union _Anonymous_25
2313     {
2314         hipMemGenericAllocationHandle_t memHandle;
2315     }
2316 
2317     _Anonymous_25 memHandle;
2318     ulong offset;
2319     uint deviceBitMask;
2320     uint flags;
2321     uint[2] reserved;
2322 }
2323 
2324 hipError_t hipMemAddressFree(void* devPtr, size_t size);
2325 
2326 hipError_t hipMemAddressReserve(void** ptr, size_t size, size_t alignment, void* addr, ulong flags);
2327 
2328 hipError_t hipMemCreate(hipMemGenericAllocationHandle_t* handle, size_t size,
2329         const(hipMemAllocationProp)* prop, ulong flags);
2330 
2331 hipError_t hipMemExportToShareableHandle(void* shareableHandle,
2332         hipMemGenericAllocationHandle_t handle, hipMemAllocationHandleType handleType, ulong flags);
2333 
2334 hipError_t hipMemGetAccess(ulong* flags, const(hipMemLocation)* location, void* ptr);
2335 
2336 hipError_t hipMemGetAllocationGranularity(size_t* granularity,
2337         const(hipMemAllocationProp)* prop, hipMemAllocationGranularity_flags option);
2338 
2339 hipError_t hipMemGetAllocationPropertiesFromHandle(hipMemAllocationProp* prop,
2340         hipMemGenericAllocationHandle_t handle);
2341 
2342 hipError_t hipMemImportFromShareableHandle(hipMemGenericAllocationHandle_t* handle,
2343         void* osHandle, hipMemAllocationHandleType shHandleType);
2344 
2345 hipError_t hipMemMap(void* ptr, size_t size, size_t offset,
2346         hipMemGenericAllocationHandle_t handle, ulong flags);
2347 
2348 hipError_t hipMemMapArrayAsync(hipArrayMapInfo* mapInfoList, uint count, hipStream_t stream);
2349 
2350 hipError_t hipMemRelease(hipMemGenericAllocationHandle_t handle);
2351 
2352 hipError_t hipMemRetainAllocationHandle(hipMemGenericAllocationHandle_t* handle, void* addr);
2353 
2354 hipError_t hipMemSetAccess(void* ptr, size_t size, const(hipMemAccessDesc)* desc, size_t count);
2355 
2356 hipError_t hipMemUnmap(void* ptr, size_t size);
2357 
2358 alias GLuint = uint;
2359 alias GLenum = uint;
2360 
2361 hipError_t hipGLGetDevices(uint* pHipDeviceCount, int* pHipDevices,
2362         uint hipDeviceCount, hipGLDeviceList deviceList);
2363 
2364 hipError_t hipGraphicsGLRegisterBuffer(hipGraphicsResource** resource, GLuint buffer, uint flags);
2365 
2366 hipError_t hipGraphicsGLRegisterImage(hipGraphicsResource** resource,
2367         GLuint image, GLenum target, uint flags);
2368 
2369 hipError_t hipGraphicsMapResources(int count, hipGraphicsResource_t* resources, hipStream_t stream);
2370 
2371 hipError_t hipGraphicsSubResourceGetMappedArray(hipArray_t* array,
2372         hipGraphicsResource_t resource, uint arrayIndex, uint mipLevel);
2373 
2374 hipError_t hipGraphicsResourceGetMappedPointer(void** devPtr, size_t* size,
2375         hipGraphicsResource_t resource);
2376 
2377 hipError_t hipGraphicsUnmapResources(int count, hipGraphicsResource_t* resources, hipStream_t stream);
2378 
2379 hipError_t hipGraphicsUnregisterResource(hipGraphicsResource_t resource);