From 04b2edcc8cb8e897bf1dd347751513c4cd483980 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 10 Jun 2015 14:15:34 +0300 Subject: [PATCH] ocl: autogenerated files for cl_gl.h --- .../opencl/runtime/autogenerated/opencl_gl.hpp | 58 ++++++ .../runtime/autogenerated/opencl_gl_wrappers.hpp | 38 ++++ .../runtime/autogenerated/opencl_gl_impl.hpp | 198 +++++++++++++++++++++ .../generator/filter/opencl_gl_functions.list | 11 ++ .../runtime/generator/template/opencl_gl.hpp.in | 2 - 5 files changed, 305 insertions(+), 2 deletions(-) create mode 100644 modules/core/include/opencv2/core/opencl/runtime/autogenerated/opencl_gl.hpp create mode 100644 modules/core/include/opencv2/core/opencl/runtime/autogenerated/opencl_gl_wrappers.hpp create mode 100644 modules/core/src/opencl/runtime/autogenerated/opencl_gl_impl.hpp create mode 100644 modules/core/src/opencl/runtime/generator/filter/opencl_gl_functions.list diff --git a/modules/core/include/opencv2/core/opencl/runtime/autogenerated/opencl_gl.hpp b/modules/core/include/opencv2/core/opencl/runtime/autogenerated/opencl_gl.hpp new file mode 100644 index 0000000..f37ad15 --- /dev/null +++ b/modules/core/include/opencv2/core/opencl/runtime/autogenerated/opencl_gl.hpp @@ -0,0 +1,58 @@ +// +// AUTOGENERATED, DO NOT EDIT +// +#ifndef __OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_HPP__ +#error "Invalid usage" +#endif + +// generated by parser_cl.py +#define clCreateFromGLBuffer clCreateFromGLBuffer_ +#define clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer_ +#define clCreateFromGLTexture clCreateFromGLTexture_ +#define clCreateFromGLTexture2D clCreateFromGLTexture2D_ +#define clCreateFromGLTexture3D clCreateFromGLTexture3D_ +#define clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects_ +#define clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects_ +#define clGetGLContextInfoKHR clGetGLContextInfoKHR_ +#define clGetGLObjectInfo clGetGLObjectInfo_ +#define clGetGLTextureInfo clGetGLTextureInfo_ + +#if defined __APPLE__ +#include +#else +#include +#endif + +// generated by parser_cl.py +#undef clCreateFromGLBuffer +#define clCreateFromGLBuffer clCreateFromGLBuffer_pfn +#undef clCreateFromGLRenderbuffer +#define clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer_pfn +#undef clCreateFromGLTexture +#define clCreateFromGLTexture clCreateFromGLTexture_pfn +#undef clCreateFromGLTexture2D +#define clCreateFromGLTexture2D clCreateFromGLTexture2D_pfn +#undef clCreateFromGLTexture3D +#define clCreateFromGLTexture3D clCreateFromGLTexture3D_pfn +#undef clEnqueueAcquireGLObjects +#define clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects_pfn +#undef clEnqueueReleaseGLObjects +#define clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects_pfn +#undef clGetGLContextInfoKHR +#define clGetGLContextInfoKHR clGetGLContextInfoKHR_pfn +#undef clGetGLObjectInfo +#define clGetGLObjectInfo clGetGLObjectInfo_pfn +#undef clGetGLTextureInfo +#define clGetGLTextureInfo clGetGLTextureInfo_pfn + +// generated by parser_cl.py +extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLBuffer)(cl_context, cl_mem_flags, cl_GLuint, int*); +extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLRenderbuffer)(cl_context, cl_mem_flags, cl_GLuint, cl_int*); +extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLTexture)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*); +extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLTexture2D)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*); +extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLTexture3D)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*); +extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueAcquireGLObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_uint, const cl_event*, cl_event*); +extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueReleaseGLObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_uint, const cl_event*, cl_event*); +extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetGLContextInfoKHR)(const cl_context_properties*, cl_gl_context_info, size_t, void*, size_t*); +extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetGLObjectInfo)(cl_mem, cl_gl_object_type*, cl_GLuint*); +extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetGLTextureInfo)(cl_mem, cl_gl_texture_info, size_t, void*, size_t*); diff --git a/modules/core/include/opencv2/core/opencl/runtime/autogenerated/opencl_gl_wrappers.hpp b/modules/core/include/opencv2/core/opencl/runtime/autogenerated/opencl_gl_wrappers.hpp new file mode 100644 index 0000000..105867f --- /dev/null +++ b/modules/core/include/opencv2/core/opencl/runtime/autogenerated/opencl_gl_wrappers.hpp @@ -0,0 +1,38 @@ +// +// AUTOGENERATED, DO NOT EDIT +// +#ifndef __OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP__ +#error "Invalid usage" +#endif + +// generated by parser_cl.py +#undef clCreateFromGLBuffer +#define clCreateFromGLBuffer clCreateFromGLBuffer_fn +inline cl_mem clCreateFromGLBuffer(cl_context p0, cl_mem_flags p1, cl_GLuint p2, int* p3) { return clCreateFromGLBuffer_pfn(p0, p1, p2, p3); } +#undef clCreateFromGLRenderbuffer +#define clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer_fn +inline cl_mem clCreateFromGLRenderbuffer(cl_context p0, cl_mem_flags p1, cl_GLuint p2, cl_int* p3) { return clCreateFromGLRenderbuffer_pfn(p0, p1, p2, p3); } +#undef clCreateFromGLTexture +#define clCreateFromGLTexture clCreateFromGLTexture_fn +inline cl_mem clCreateFromGLTexture(cl_context p0, cl_mem_flags p1, cl_GLenum p2, cl_GLint p3, cl_GLuint p4, cl_int* p5) { return clCreateFromGLTexture_pfn(p0, p1, p2, p3, p4, p5); } +#undef clCreateFromGLTexture2D +#define clCreateFromGLTexture2D clCreateFromGLTexture2D_fn +inline cl_mem clCreateFromGLTexture2D(cl_context p0, cl_mem_flags p1, cl_GLenum p2, cl_GLint p3, cl_GLuint p4, cl_int* p5) { return clCreateFromGLTexture2D_pfn(p0, p1, p2, p3, p4, p5); } +#undef clCreateFromGLTexture3D +#define clCreateFromGLTexture3D clCreateFromGLTexture3D_fn +inline cl_mem clCreateFromGLTexture3D(cl_context p0, cl_mem_flags p1, cl_GLenum p2, cl_GLint p3, cl_GLuint p4, cl_int* p5) { return clCreateFromGLTexture3D_pfn(p0, p1, p2, p3, p4, p5); } +#undef clEnqueueAcquireGLObjects +#define clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects_fn +inline cl_int clEnqueueAcquireGLObjects(cl_command_queue p0, cl_uint p1, const cl_mem* p2, cl_uint p3, const cl_event* p4, cl_event* p5) { return clEnqueueAcquireGLObjects_pfn(p0, p1, p2, p3, p4, p5); } +#undef clEnqueueReleaseGLObjects +#define clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects_fn +inline cl_int clEnqueueReleaseGLObjects(cl_command_queue p0, cl_uint p1, const cl_mem* p2, cl_uint p3, const cl_event* p4, cl_event* p5) { return clEnqueueReleaseGLObjects_pfn(p0, p1, p2, p3, p4, p5); } +#undef clGetGLContextInfoKHR +#define clGetGLContextInfoKHR clGetGLContextInfoKHR_fn +inline cl_int clGetGLContextInfoKHR(const cl_context_properties* p0, cl_gl_context_info p1, size_t p2, void* p3, size_t* p4) { return clGetGLContextInfoKHR_pfn(p0, p1, p2, p3, p4); } +#undef clGetGLObjectInfo +#define clGetGLObjectInfo clGetGLObjectInfo_fn +inline cl_int clGetGLObjectInfo(cl_mem p0, cl_gl_object_type* p1, cl_GLuint* p2) { return clGetGLObjectInfo_pfn(p0, p1, p2); } +#undef clGetGLTextureInfo +#define clGetGLTextureInfo clGetGLTextureInfo_fn +inline cl_int clGetGLTextureInfo(cl_mem p0, cl_gl_texture_info p1, size_t p2, void* p3, size_t* p4) { return clGetGLTextureInfo_pfn(p0, p1, p2, p3, p4); } diff --git a/modules/core/src/opencl/runtime/autogenerated/opencl_gl_impl.hpp b/modules/core/src/opencl/runtime/autogenerated/opencl_gl_impl.hpp new file mode 100644 index 0000000..6d97180 --- /dev/null +++ b/modules/core/src/opencl/runtime/autogenerated/opencl_gl_impl.hpp @@ -0,0 +1,198 @@ +// +// AUTOGENERATED, DO NOT EDIT +// +// generated by parser_cl.py +enum OPENCL_GL_FN_ID { + OPENCL_GL_FN_clCreateFromGLBuffer = 0, + OPENCL_GL_FN_clCreateFromGLRenderbuffer = 1, + OPENCL_GL_FN_clCreateFromGLTexture = 2, + OPENCL_GL_FN_clCreateFromGLTexture2D = 3, + OPENCL_GL_FN_clCreateFromGLTexture3D = 4, + OPENCL_GL_FN_clEnqueueAcquireGLObjects = 5, + OPENCL_GL_FN_clEnqueueReleaseGLObjects = 6, + OPENCL_GL_FN_clGetGLContextInfoKHR = 7, + OPENCL_GL_FN_clGetGLObjectInfo = 8, + OPENCL_GL_FN_clGetGLTextureInfo = 9, +}; + +namespace { +// generated by parser_cl.py +template +struct opencl_gl_fn0 +{ + typedef _R (CL_API_CALL*FN)(); + static _R CL_API_CALL switch_fn() + { return ((FN)opencl_gl_check_fn(ID))(); } +}; + +template +struct opencl_gl_fn1 +{ + typedef _R (CL_API_CALL*FN)(_T1); + static _R CL_API_CALL switch_fn(_T1 p1) + { return ((FN)opencl_gl_check_fn(ID))(p1); } +}; + +template +struct opencl_gl_fn2 +{ + typedef _R (CL_API_CALL*FN)(_T1, _T2); + static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2) + { return ((FN)opencl_gl_check_fn(ID))(p1, p2); } +}; + +template +struct opencl_gl_fn3 +{ + typedef _R (CL_API_CALL*FN)(_T1, _T2, _T3); + static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2, _T3 p3) + { return ((FN)opencl_gl_check_fn(ID))(p1, p2, p3); } +}; + +template +struct opencl_gl_fn4 +{ + typedef _R (CL_API_CALL*FN)(_T1, _T2, _T3, _T4); + static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2, _T3 p3, _T4 p4) + { return ((FN)opencl_gl_check_fn(ID))(p1, p2, p3, p4); } +}; + +template +struct opencl_gl_fn5 +{ + typedef _R (CL_API_CALL*FN)(_T1, _T2, _T3, _T4, _T5); + static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2, _T3 p3, _T4 p4, _T5 p5) + { return ((FN)opencl_gl_check_fn(ID))(p1, p2, p3, p4, p5); } +}; + +template +struct opencl_gl_fn6 +{ + typedef _R (CL_API_CALL*FN)(_T1, _T2, _T3, _T4, _T5, _T6); + static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2, _T3 p3, _T4 p4, _T5 p5, _T6 p6) + { return ((FN)opencl_gl_check_fn(ID))(p1, p2, p3, p4, p5, p6); } +}; + +template +struct opencl_gl_fn7 +{ + typedef _R (CL_API_CALL*FN)(_T1, _T2, _T3, _T4, _T5, _T6, _T7); + static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2, _T3 p3, _T4 p4, _T5 p5, _T6 p6, _T7 p7) + { return ((FN)opencl_gl_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7); } +}; + +template +struct opencl_gl_fn8 +{ + typedef _R (CL_API_CALL*FN)(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8); + static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2, _T3 p3, _T4 p4, _T5 p5, _T6 p6, _T7 p7, _T8 p8) + { return ((FN)opencl_gl_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8); } +}; + +template +struct opencl_gl_fn9 +{ + typedef _R (CL_API_CALL*FN)(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9); + static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2, _T3 p3, _T4 p4, _T5 p5, _T6 p6, _T7 p7, _T8 p8, _T9 p9) + { return ((FN)opencl_gl_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9); } +}; + +template +struct opencl_gl_fn10 +{ + typedef _R (CL_API_CALL*FN)(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10); + static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2, _T3 p3, _T4 p4, _T5 p5, _T6 p6, _T7 p7, _T8 p8, _T9 p9, _T10 p10) + { return ((FN)opencl_gl_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } +}; + +template +struct opencl_gl_fn11 +{ + typedef _R (CL_API_CALL*FN)(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11); + static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2, _T3 p3, _T4 p4, _T5 p5, _T6 p6, _T7 p7, _T8 p8, _T9 p9, _T10 p10, _T11 p11) + { return ((FN)opencl_gl_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } +}; + +template +struct opencl_gl_fn12 +{ + typedef _R (CL_API_CALL*FN)(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12); + static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2, _T3 p3, _T4 p4, _T5 p5, _T6 p6, _T7 p7, _T8 p8, _T9 p9, _T10 p10, _T11 p11, _T12 p12) + { return ((FN)opencl_gl_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } +}; + +template +struct opencl_gl_fn13 +{ + typedef _R (CL_API_CALL*FN)(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13); + static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2, _T3 p3, _T4 p4, _T5 p5, _T6 p6, _T7 p7, _T8 p8, _T9 p9, _T10 p10, _T11 p11, _T12 p12, _T13 p13) + { return ((FN)opencl_gl_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); } +}; + +template +struct opencl_gl_fn14 +{ + typedef _R (CL_API_CALL*FN)(_T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14); + static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2, _T3 p3, _T4 p4, _T5 p5, _T6 p6, _T7 p7, _T8 p8, _T9 p9, _T10 p10, _T11 p11, _T12 p12, _T13 p13, _T14 p14) + { return ((FN)opencl_gl_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); } +}; + +} // anonymous namespace + +// generated by parser_cl.py +cl_mem (CL_API_CALL*clCreateFromGLBuffer)(cl_context, cl_mem_flags, cl_GLuint, int*) = + opencl_gl_fn4::switch_fn; +static const struct DynamicFnEntry clCreateFromGLBuffer_definition = { "clCreateFromGLBuffer", (void**)&clCreateFromGLBuffer}; + +cl_mem (CL_API_CALL*clCreateFromGLRenderbuffer)(cl_context, cl_mem_flags, cl_GLuint, cl_int*) = + opencl_gl_fn4::switch_fn; +static const struct DynamicFnEntry clCreateFromGLRenderbuffer_definition = { "clCreateFromGLRenderbuffer", (void**)&clCreateFromGLRenderbuffer}; + +cl_mem (CL_API_CALL*clCreateFromGLTexture)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*) = + opencl_gl_fn6::switch_fn; +static const struct DynamicFnEntry clCreateFromGLTexture_definition = { "clCreateFromGLTexture", (void**)&clCreateFromGLTexture}; + +cl_mem (CL_API_CALL*clCreateFromGLTexture2D)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*) = + opencl_gl_fn6::switch_fn; +static const struct DynamicFnEntry clCreateFromGLTexture2D_definition = { "clCreateFromGLTexture2D", (void**)&clCreateFromGLTexture2D}; + +cl_mem (CL_API_CALL*clCreateFromGLTexture3D)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*) = + opencl_gl_fn6::switch_fn; +static const struct DynamicFnEntry clCreateFromGLTexture3D_definition = { "clCreateFromGLTexture3D", (void**)&clCreateFromGLTexture3D}; + +cl_int (CL_API_CALL*clEnqueueAcquireGLObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_uint, const cl_event*, cl_event*) = + opencl_gl_fn6::switch_fn; +static const struct DynamicFnEntry clEnqueueAcquireGLObjects_definition = { "clEnqueueAcquireGLObjects", (void**)&clEnqueueAcquireGLObjects}; + +cl_int (CL_API_CALL*clEnqueueReleaseGLObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_uint, const cl_event*, cl_event*) = + opencl_gl_fn6::switch_fn; +static const struct DynamicFnEntry clEnqueueReleaseGLObjects_definition = { "clEnqueueReleaseGLObjects", (void**)&clEnqueueReleaseGLObjects}; + +cl_int (CL_API_CALL*clGetGLContextInfoKHR)(const cl_context_properties*, cl_gl_context_info, size_t, void*, size_t*) = + opencl_gl_fn5::switch_fn; +static const struct DynamicFnEntry clGetGLContextInfoKHR_definition = { "clGetGLContextInfoKHR", (void**)&clGetGLContextInfoKHR}; + +cl_int (CL_API_CALL*clGetGLObjectInfo)(cl_mem, cl_gl_object_type*, cl_GLuint*) = + opencl_gl_fn3::switch_fn; +static const struct DynamicFnEntry clGetGLObjectInfo_definition = { "clGetGLObjectInfo", (void**)&clGetGLObjectInfo}; + +cl_int (CL_API_CALL*clGetGLTextureInfo)(cl_mem, cl_gl_texture_info, size_t, void*, size_t*) = + opencl_gl_fn5::switch_fn; +static const struct DynamicFnEntry clGetGLTextureInfo_definition = { "clGetGLTextureInfo", (void**)&clGetGLTextureInfo}; + + +// generated by parser_cl.py +static const struct DynamicFnEntry* opencl_gl_fn_list[] = { + &clCreateFromGLBuffer_definition, + &clCreateFromGLRenderbuffer_definition, + &clCreateFromGLTexture_definition, + &clCreateFromGLTexture2D_definition, + &clCreateFromGLTexture3D_definition, + &clEnqueueAcquireGLObjects_definition, + &clEnqueueReleaseGLObjects_definition, + &clGetGLContextInfoKHR_definition, + &clGetGLObjectInfo_definition, + &clGetGLTextureInfo_definition, +}; + +// number of enabled functions: 10 diff --git a/modules/core/src/opencl/runtime/generator/filter/opencl_gl_functions.list b/modules/core/src/opencl/runtime/generator/filter/opencl_gl_functions.list new file mode 100644 index 0000000..b2f9e62 --- /dev/null +++ b/modules/core/src/opencl/runtime/generator/filter/opencl_gl_functions.list @@ -0,0 +1,11 @@ +clCreateFromGLBuffer +clCreateFromGLRenderbuffer +clCreateFromGLTexture +clCreateFromGLTexture2D +clCreateFromGLTexture3D +clEnqueueAcquireGLObjects +clEnqueueReleaseGLObjects +clGetGLContextInfoKHR +clGetGLObjectInfo +clGetGLTextureInfo +#total 10 diff --git a/modules/core/src/opencl/runtime/generator/template/opencl_gl.hpp.in b/modules/core/src/opencl/runtime/generator/template/opencl_gl.hpp.in index 28c342f..24434d2 100644 --- a/modules/core/src/opencl/runtime/generator/template/opencl_gl.hpp.in +++ b/modules/core/src/opencl/runtime/generator/template/opencl_gl.hpp.in @@ -5,10 +5,8 @@ @CL_REMAP_ORIGIN@ #if defined __APPLE__ -#include #include #else -#include #include #endif -- 2.7.4