Renesas GR-PEACH OpenCV Development / gr-peach-opencv-project-sd-card_update

Fork of gr-peach-opencv-project-sd-card by the do

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers opencl_svm_20.hpp Source File

opencl_svm_20.hpp

00001 /* See LICENSE file in the root OpenCV directory */
00002 
00003 #ifndef __OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_2_0_HPP__
00004 #define __OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_2_0_HPP__
00005 
00006 #if defined(HAVE_OPENCL_SVM)
00007 #include "opencl_core.hpp"
00008 
00009 #include "opencl_svm_definitions.hpp"
00010 
00011 #ifndef HAVE_OPENCL_STATIC
00012 
00013 #undef clSVMAlloc
00014 #define clSVMAlloc clSVMAlloc_pfn
00015 #undef clSVMFree
00016 #define clSVMFree clSVMFree_pfn
00017 #undef clSetKernelArgSVMPointer
00018 #define clSetKernelArgSVMPointer clSetKernelArgSVMPointer_pfn
00019 #undef clSetKernelExecInfo
00020 //#define clSetKernelExecInfo clSetKernelExecInfo_pfn
00021 #undef clEnqueueSVMFree
00022 //#define clEnqueueSVMFree clEnqueueSVMFree_pfn
00023 #undef clEnqueueSVMMemcpy
00024 #define clEnqueueSVMMemcpy clEnqueueSVMMemcpy_pfn
00025 #undef clEnqueueSVMMemFill
00026 #define clEnqueueSVMMemFill clEnqueueSVMMemFill_pfn
00027 #undef clEnqueueSVMMap
00028 #define clEnqueueSVMMap clEnqueueSVMMap_pfn
00029 #undef clEnqueueSVMUnmap
00030 #define clEnqueueSVMUnmap clEnqueueSVMUnmap_pfn
00031 
00032 extern CL_RUNTIME_EXPORT void* (CL_API_CALL *clSVMAlloc)(cl_context context, cl_svm_mem_flags flags, size_t size, unsigned int alignment);
00033 extern CL_RUNTIME_EXPORT void (CL_API_CALL *clSVMFree)(cl_context context, void* svm_pointer);
00034 extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clSetKernelArgSVMPointer)(cl_kernel kernel, cl_uint arg_index, const void* arg_value);
00035 //extern CL_RUNTIME_EXPORT void* (CL_API_CALL *clSetKernelExecInfo)(cl_kernel kernel, cl_kernel_exec_info param_name, size_t param_value_size, const void* param_value);
00036 //extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMFree)(cl_command_queue command_queue, cl_uint num_svm_pointers, void* svm_pointers[],
00037 //        void (CL_CALLBACK *pfn_free_func)(cl_command_queue queue, cl_uint num_svm_pointers, void* svm_pointers[], void* user_data), void* user_data,
00038 //        cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
00039 extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMMemcpy)(cl_command_queue command_queue, cl_bool blocking_copy, void* dst_ptr, const void* src_ptr, size_t size,
00040         cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
00041 extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMMemFill)(cl_command_queue command_queue, void* svm_ptr, const void* pattern, size_t pattern_size, size_t size,
00042         cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
00043 extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMMap)(cl_command_queue command_queue, cl_bool blocking_map, cl_map_flags map_flags, void* svm_ptr, size_t size,
00044         cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
00045 extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL *clEnqueueSVMUnmap)(cl_command_queue command_queue, void* svm_ptr,
00046         cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
00047 
00048 #endif // HAVE_OPENCL_STATIC
00049 
00050 #endif // HAVE_OPENCL_SVM
00051 
00052 #endif // __OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_2_0_HPP__
00053