3#ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_HSA_EXTENSION_HPP
4#define OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_HSA_EXTENSION_HPP
6#if defined(HAVE_OPENCL_SVM)
7#include "opencl_core.hpp"
9#ifndef CL_DEVICE_SVM_CAPABILITIES_AMD
40typedef cl_bitfield cl_device_svm_capabilities_amd;
41typedef cl_bitfield cl_svm_mem_flags_amd;
42typedef cl_uint cl_kernel_exec_info_amd;
45#define CL_DEVICE_SVM_CAPABILITIES_AMD 0x1053
46#define CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT_AMD 0x1054
49#define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER_AMD (1 << 0)
50#define CL_DEVICE_SVM_FINE_GRAIN_BUFFER_AMD (1 << 1)
51#define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM_AMD (1 << 2)
52#define CL_DEVICE_SVM_ATOMICS_AMD (1 << 3)
55#define CL_MEM_SVM_FINE_GRAIN_BUFFER_AMD (1 << 10)
56#define CL_MEM_SVM_ATOMICS_AMD (1 << 11)
59#define CL_MEM_USES_SVM_POINTER_AMD 0x1109
62#define CL_KERNEL_EXEC_INFO_SVM_PTRS_AMD 0x11B6
63#define CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM_AMD 0x11B7
66#define CL_COMMAND_SVM_FREE_AMD 0x1209
67#define CL_COMMAND_SVM_MEMCPY_AMD 0x120A
68#define CL_COMMAND_SVM_MEMFILL_AMD 0x120B
69#define CL_COMMAND_SVM_MAP_AMD 0x120C
70#define CL_COMMAND_SVM_UNMAP_AMD 0x120D
72typedef CL_API_ENTRY
void*
73(CL_API_CALL * clSVMAllocAMD_fn)(
75 cl_svm_mem_flags_amd ,
78) CL_EXT_SUFFIX__VERSION_1_2;
80typedef CL_API_ENTRY void
81(CL_API_CALL * clSVMFreeAMD_fn)(
84) CL_EXT_SUFFIX__VERSION_1_2;
86typedef CL_API_ENTRY cl_int
87(CL_API_CALL * clEnqueueSVMFreeAMD_fn)(
100) CL_EXT_SUFFIX__VERSION_1_2;
102typedef CL_API_ENTRY cl_int
103(CL_API_CALL * clEnqueueSVMMemcpyAMD_fn)(
112) CL_EXT_SUFFIX__VERSION_1_2;
114typedef CL_API_ENTRY cl_int
115(CL_API_CALL * clEnqueueSVMMemFillAMD_fn)(
124) CL_EXT_SUFFIX__VERSION_1_2;
126typedef CL_API_ENTRY cl_int
127(CL_API_CALL * clEnqueueSVMMapAMD_fn)(
136) CL_EXT_SUFFIX__VERSION_1_2;
138typedef CL_API_ENTRY cl_int
139(CL_API_CALL * clEnqueueSVMUnmapAMD_fn)(
145) CL_EXT_SUFFIX__VERSION_1_2;
147typedef CL_API_ENTRY cl_int
148(CL_API_CALL * clSetKernelArgSVMPointerAMD_fn)(
152) CL_EXT_SUFFIX__VERSION_1_2;
154typedef CL_API_ENTRY cl_int
155(CL_API_CALL * clSetKernelExecInfoAMD_fn)(
157 cl_kernel_exec_info_amd ,
160) CL_EXT_SUFFIX__VERSION_1_2;