Commit b0a9220d authored by Andrey Pavlenko's avatar Andrey Pavlenko Committed by OpenCV Buildbot

Merge pull request #1889 from alalek:ocl_core_dynamic_runtime

parents ac1c6dac 3bbf51fb
...@@ -49,6 +49,8 @@ ...@@ -49,6 +49,8 @@
#include "opencv2/imgproc.hpp" #include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp" #include "opencv2/highgui.hpp"
#include "opencv2/core/ocl.hpp" // cv::ocl::haveOpenCL
#if defined(HAVE_OPENCV_OCL) #if defined(HAVE_OPENCV_OCL)
#include "opencv2/ocl.hpp" #include "opencv2/ocl.hpp"
...@@ -63,6 +65,7 @@ static double checkNear(const cv::Mat &m1, const cv::Mat &m2) ...@@ -63,6 +65,7 @@ static double checkNear(const cv::Mat &m1, const cv::Mat &m2)
#define GET_PARAM(k) std::tr1::get< k >(GetParam()) #define GET_PARAM(k) std::tr1::get< k >(GetParam())
static int oclInit = false; static int oclInit = false;
static int oclAvailable = false;
PARAM_TEST_CASE(Retina_OCL, bool, int, bool, double, double) PARAM_TEST_CASE(Retina_OCL, bool, int, bool, double, double)
{ {
...@@ -72,8 +75,6 @@ PARAM_TEST_CASE(Retina_OCL, bool, int, bool, double, double) ...@@ -72,8 +75,6 @@ PARAM_TEST_CASE(Retina_OCL, bool, int, bool, double, double)
double reductionFactor; double reductionFactor;
double samplingStrength; double samplingStrength;
cv::ocl::DevicesInfo infos;
virtual void SetUp() virtual void SetUp()
{ {
colorMode = GET_PARAM(0); colorMode = GET_PARAM(0);
...@@ -82,10 +83,21 @@ PARAM_TEST_CASE(Retina_OCL, bool, int, bool, double, double) ...@@ -82,10 +83,21 @@ PARAM_TEST_CASE(Retina_OCL, bool, int, bool, double, double)
reductionFactor = GET_PARAM(3); reductionFactor = GET_PARAM(3);
samplingStrength = GET_PARAM(4); samplingStrength = GET_PARAM(4);
if(!oclInit) if (!oclInit)
{
if (cv::ocl::haveOpenCL())
{
try
{
const cv::ocl::DeviceInfo& dev = cv::ocl::Context::getContext()->getDeviceInfo();
std::cout << "Device name:" << dev.deviceName << std::endl;
oclAvailable = true;
}
catch (...)
{ {
cv::ocl::getOpenCLDevices(infos); std::cout << "Device name: N/A" << std::endl;
std::cout << "Device name:" << infos[0]->deviceName << std::endl; }
}
oclInit = true; oclInit = true;
} }
} }
...@@ -93,6 +105,12 @@ PARAM_TEST_CASE(Retina_OCL, bool, int, bool, double, double) ...@@ -93,6 +105,12 @@ PARAM_TEST_CASE(Retina_OCL, bool, int, bool, double, double)
TEST_P(Retina_OCL, Accuracy) TEST_P(Retina_OCL, Accuracy)
{ {
if (!oclAvailable)
{
std::cout << "SKIP test" << std::endl;
return;
}
using namespace cv; using namespace cv;
Mat input = imread(cvtest::TS::ptr()->get_data_path() + "shared/lena.png", colorMode); Mat input = imread(cvtest::TS::ptr()->get_data_path() + "shared/lena.png", colorMode);
CV_Assert(!input.empty()); CV_Assert(!input.empty());
......
set(the_description "The Core Functionality") set(the_description "The Core Functionality")
ocv_add_module(core PRIVATE_REQUIRED ${ZLIB_LIBRARIES} OPTIONAL opencv_cudev) ocv_add_module(core PRIVATE_REQUIRED ${ZLIB_LIBRARIES} "${OPENCL_LIBRARIES}" OPTIONAL opencv_cudev)
ocv_module_include_directories(${ZLIB_INCLUDE_DIRS}) ocv_module_include_directories(${ZLIB_INCLUDE_DIRS})
if(HAVE_WINRT) if(HAVE_WINRT)
......
// //
// AUTOGENERATED, DO NOT EDIT // AUTOGENERATED, DO NOT EDIT
// //
#ifndef __OPENCV_OCL_CLAMDFFT_RUNTIME_HPP__ #ifndef __OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP__
#define __OPENCV_OCL_CLAMDFFT_RUNTIME_HPP__ #error "Invalid usage"
#endif
#ifdef HAVE_CLAMDFFT
// generated by parser_clamdfft.py // generated by parser_clamdfft.py
#define clAmdFftSetup clAmdFftSetup_
#define clAmdFftTeardown clAmdFftTeardown_
#define clAmdFftGetVersion clAmdFftGetVersion_
#define clAmdFftCreateDefaultPlan clAmdFftCreateDefaultPlan_
#define clAmdFftCopyPlan clAmdFftCopyPlan_
#define clAmdFftBakePlan clAmdFftBakePlan_ #define clAmdFftBakePlan clAmdFftBakePlan_
#define clAmdFftCopyPlan clAmdFftCopyPlan_
#define clAmdFftCreateDefaultPlan clAmdFftCreateDefaultPlan_
#define clAmdFftDestroyPlan clAmdFftDestroyPlan_ #define clAmdFftDestroyPlan clAmdFftDestroyPlan_
#define clAmdFftEnqueueTransform clAmdFftEnqueueTransform_
#define clAmdFftGetLayout clAmdFftGetLayout_
#define clAmdFftGetPlanBatchSize clAmdFftGetPlanBatchSize_
#define clAmdFftGetPlanContext clAmdFftGetPlanContext_ #define clAmdFftGetPlanContext clAmdFftGetPlanContext_
#define clAmdFftGetPlanDim clAmdFftGetPlanDim_
#define clAmdFftGetPlanDistance clAmdFftGetPlanDistance_
#define clAmdFftGetPlanInStride clAmdFftGetPlanInStride_
#define clAmdFftGetPlanLength clAmdFftGetPlanLength_
#define clAmdFftGetPlanOutStride clAmdFftGetPlanOutStride_
#define clAmdFftGetPlanPrecision clAmdFftGetPlanPrecision_ #define clAmdFftGetPlanPrecision clAmdFftGetPlanPrecision_
#define clAmdFftSetPlanPrecision clAmdFftSetPlanPrecision_
#define clAmdFftGetPlanScale clAmdFftGetPlanScale_ #define clAmdFftGetPlanScale clAmdFftGetPlanScale_
#define clAmdFftSetPlanScale clAmdFftSetPlanScale_ #define clAmdFftGetPlanTransposeResult clAmdFftGetPlanTransposeResult_
#define clAmdFftGetPlanBatchSize clAmdFftGetPlanBatchSize_ #define clAmdFftGetResultLocation clAmdFftGetResultLocation_
#define clAmdFftGetTmpBufSize clAmdFftGetTmpBufSize_
#define clAmdFftGetVersion clAmdFftGetVersion_
#define clAmdFftSetLayout clAmdFftSetLayout_
#define clAmdFftSetPlanBatchSize clAmdFftSetPlanBatchSize_ #define clAmdFftSetPlanBatchSize clAmdFftSetPlanBatchSize_
#define clAmdFftGetPlanDim clAmdFftGetPlanDim_
#define clAmdFftSetPlanDim clAmdFftSetPlanDim_ #define clAmdFftSetPlanDim clAmdFftSetPlanDim_
#define clAmdFftGetPlanLength clAmdFftGetPlanLength_ #define clAmdFftSetPlanDistance clAmdFftSetPlanDistance_
#define clAmdFftSetPlanLength clAmdFftSetPlanLength_
#define clAmdFftGetPlanInStride clAmdFftGetPlanInStride_
#define clAmdFftSetPlanInStride clAmdFftSetPlanInStride_ #define clAmdFftSetPlanInStride clAmdFftSetPlanInStride_
#define clAmdFftGetPlanOutStride clAmdFftGetPlanOutStride_ #define clAmdFftSetPlanLength clAmdFftSetPlanLength_
#define clAmdFftSetPlanOutStride clAmdFftSetPlanOutStride_ #define clAmdFftSetPlanOutStride clAmdFftSetPlanOutStride_
#define clAmdFftGetPlanDistance clAmdFftGetPlanDistance_ #define clAmdFftSetPlanPrecision clAmdFftSetPlanPrecision_
#define clAmdFftSetPlanDistance clAmdFftSetPlanDistance_ #define clAmdFftSetPlanScale clAmdFftSetPlanScale_
#define clAmdFftGetLayout clAmdFftGetLayout_
#define clAmdFftSetLayout clAmdFftSetLayout_
#define clAmdFftGetResultLocation clAmdFftGetResultLocation_
#define clAmdFftSetResultLocation clAmdFftSetResultLocation_
#define clAmdFftGetPlanTransposeResult clAmdFftGetPlanTransposeResult_
#define clAmdFftSetPlanTransposeResult clAmdFftSetPlanTransposeResult_ #define clAmdFftSetPlanTransposeResult clAmdFftSetPlanTransposeResult_
#define clAmdFftGetTmpBufSize clAmdFftGetTmpBufSize_ #define clAmdFftSetResultLocation clAmdFftSetResultLocation_
#define clAmdFftEnqueueTransform clAmdFftEnqueueTransform_ #define clAmdFftSetup clAmdFftSetup_
#define clAmdFftTeardown clAmdFftTeardown_
#include <clAmdFft.h> #include <clAmdFft.h>
// generated by parser_clamdfft.py // generated by parser_clamdfft.py
#undef clAmdFftSetup
#define clAmdFftSetup clAmdFftSetup_pfn
#undef clAmdFftTeardown
#define clAmdFftTeardown clAmdFftTeardown_pfn
#undef clAmdFftGetVersion
#define clAmdFftGetVersion clAmdFftGetVersion_pfn
#undef clAmdFftCreateDefaultPlan
#define clAmdFftCreateDefaultPlan clAmdFftCreateDefaultPlan_pfn
#undef clAmdFftCopyPlan
#define clAmdFftCopyPlan clAmdFftCopyPlan_pfn
#undef clAmdFftBakePlan #undef clAmdFftBakePlan
#define clAmdFftBakePlan clAmdFftBakePlan_pfn #define clAmdFftBakePlan clAmdFftBakePlan_pfn
#undef clAmdFftCopyPlan
//#define clAmdFftCopyPlan clAmdFftCopyPlan_pfn
#undef clAmdFftCreateDefaultPlan
#define clAmdFftCreateDefaultPlan clAmdFftCreateDefaultPlan_pfn
#undef clAmdFftDestroyPlan #undef clAmdFftDestroyPlan
#define clAmdFftDestroyPlan clAmdFftDestroyPlan_pfn #define clAmdFftDestroyPlan clAmdFftDestroyPlan_pfn
#undef clAmdFftEnqueueTransform
#define clAmdFftEnqueueTransform clAmdFftEnqueueTransform_pfn
#undef clAmdFftGetLayout
//#define clAmdFftGetLayout clAmdFftGetLayout_pfn
#undef clAmdFftGetPlanBatchSize
//#define clAmdFftGetPlanBatchSize clAmdFftGetPlanBatchSize_pfn
#undef clAmdFftGetPlanContext #undef clAmdFftGetPlanContext
#define clAmdFftGetPlanContext clAmdFftGetPlanContext_pfn //#define clAmdFftGetPlanContext clAmdFftGetPlanContext_pfn
#undef clAmdFftGetPlanDim
//#define clAmdFftGetPlanDim clAmdFftGetPlanDim_pfn
#undef clAmdFftGetPlanDistance
//#define clAmdFftGetPlanDistance clAmdFftGetPlanDistance_pfn
#undef clAmdFftGetPlanInStride
//#define clAmdFftGetPlanInStride clAmdFftGetPlanInStride_pfn
#undef clAmdFftGetPlanLength
//#define clAmdFftGetPlanLength clAmdFftGetPlanLength_pfn
#undef clAmdFftGetPlanOutStride
//#define clAmdFftGetPlanOutStride clAmdFftGetPlanOutStride_pfn
#undef clAmdFftGetPlanPrecision #undef clAmdFftGetPlanPrecision
#define clAmdFftGetPlanPrecision clAmdFftGetPlanPrecision_pfn //#define clAmdFftGetPlanPrecision clAmdFftGetPlanPrecision_pfn
#undef clAmdFftSetPlanPrecision
#define clAmdFftSetPlanPrecision clAmdFftSetPlanPrecision_pfn
#undef clAmdFftGetPlanScale #undef clAmdFftGetPlanScale
#define clAmdFftGetPlanScale clAmdFftGetPlanScale_pfn //#define clAmdFftGetPlanScale clAmdFftGetPlanScale_pfn
#undef clAmdFftSetPlanScale #undef clAmdFftGetPlanTransposeResult
#define clAmdFftSetPlanScale clAmdFftSetPlanScale_pfn //#define clAmdFftGetPlanTransposeResult clAmdFftGetPlanTransposeResult_pfn
#undef clAmdFftGetPlanBatchSize #undef clAmdFftGetResultLocation
#define clAmdFftGetPlanBatchSize clAmdFftGetPlanBatchSize_pfn //#define clAmdFftGetResultLocation clAmdFftGetResultLocation_pfn
#undef clAmdFftGetTmpBufSize
#define clAmdFftGetTmpBufSize clAmdFftGetTmpBufSize_pfn
#undef clAmdFftGetVersion
//#define clAmdFftGetVersion clAmdFftGetVersion_pfn
#undef clAmdFftSetLayout
#define clAmdFftSetLayout clAmdFftSetLayout_pfn
#undef clAmdFftSetPlanBatchSize #undef clAmdFftSetPlanBatchSize
#define clAmdFftSetPlanBatchSize clAmdFftSetPlanBatchSize_pfn #define clAmdFftSetPlanBatchSize clAmdFftSetPlanBatchSize_pfn
#undef clAmdFftGetPlanDim
#define clAmdFftGetPlanDim clAmdFftGetPlanDim_pfn
#undef clAmdFftSetPlanDim #undef clAmdFftSetPlanDim
#define clAmdFftSetPlanDim clAmdFftSetPlanDim_pfn //#define clAmdFftSetPlanDim clAmdFftSetPlanDim_pfn
#undef clAmdFftGetPlanLength #undef clAmdFftSetPlanDistance
#define clAmdFftGetPlanLength clAmdFftGetPlanLength_pfn #define clAmdFftSetPlanDistance clAmdFftSetPlanDistance_pfn
#undef clAmdFftSetPlanLength
#define clAmdFftSetPlanLength clAmdFftSetPlanLength_pfn
#undef clAmdFftGetPlanInStride
#define clAmdFftGetPlanInStride clAmdFftGetPlanInStride_pfn
#undef clAmdFftSetPlanInStride #undef clAmdFftSetPlanInStride
#define clAmdFftSetPlanInStride clAmdFftSetPlanInStride_pfn #define clAmdFftSetPlanInStride clAmdFftSetPlanInStride_pfn
#undef clAmdFftGetPlanOutStride #undef clAmdFftSetPlanLength
#define clAmdFftGetPlanOutStride clAmdFftGetPlanOutStride_pfn //#define clAmdFftSetPlanLength clAmdFftSetPlanLength_pfn
#undef clAmdFftSetPlanOutStride #undef clAmdFftSetPlanOutStride
#define clAmdFftSetPlanOutStride clAmdFftSetPlanOutStride_pfn #define clAmdFftSetPlanOutStride clAmdFftSetPlanOutStride_pfn
#undef clAmdFftGetPlanDistance #undef clAmdFftSetPlanPrecision
#define clAmdFftGetPlanDistance clAmdFftGetPlanDistance_pfn //#define clAmdFftSetPlanPrecision clAmdFftSetPlanPrecision_pfn
#undef clAmdFftSetPlanDistance #undef clAmdFftSetPlanScale
#define clAmdFftSetPlanDistance clAmdFftSetPlanDistance_pfn #define clAmdFftSetPlanScale clAmdFftSetPlanScale_pfn
#undef clAmdFftGetLayout #undef clAmdFftSetPlanTransposeResult
#define clAmdFftGetLayout clAmdFftGetLayout_pfn //#define clAmdFftSetPlanTransposeResult clAmdFftSetPlanTransposeResult_pfn
#undef clAmdFftSetLayout
#define clAmdFftSetLayout clAmdFftSetLayout_pfn
#undef clAmdFftGetResultLocation
#define clAmdFftGetResultLocation clAmdFftGetResultLocation_pfn
#undef clAmdFftSetResultLocation #undef clAmdFftSetResultLocation
#define clAmdFftSetResultLocation clAmdFftSetResultLocation_pfn #define clAmdFftSetResultLocation clAmdFftSetResultLocation_pfn
#undef clAmdFftGetPlanTransposeResult #undef clAmdFftSetup
#define clAmdFftGetPlanTransposeResult clAmdFftGetPlanTransposeResult_pfn #define clAmdFftSetup clAmdFftSetup_pfn
#undef clAmdFftSetPlanTransposeResult #undef clAmdFftTeardown
#define clAmdFftSetPlanTransposeResult clAmdFftSetPlanTransposeResult_pfn #define clAmdFftTeardown clAmdFftTeardown_pfn
#undef clAmdFftGetTmpBufSize
#define clAmdFftGetTmpBufSize clAmdFftGetTmpBufSize_pfn
#undef clAmdFftEnqueueTransform
#define clAmdFftEnqueueTransform clAmdFftEnqueueTransform_pfn
#ifndef CL_RUNTIME_EXPORT
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_OCL_SHARED)) && (defined WIN32 || defined _WIN32 || defined WINCE)
#define CL_RUNTIME_EXPORT __declspec(dllimport)
#else
#define CL_RUNTIME_EXPORT
#endif
#endif
// generated by parser_clamdfft.py // generated by parser_clamdfft.py
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetup)(const clAmdFftSetupData* setupData);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftTeardown)();
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetVersion)(cl_uint* major, cl_uint* minor, cl_uint* patch);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftCreateDefaultPlan)(clAmdFftPlanHandle* plHandle, cl_context context, const clAmdFftDim dim, const size_t* clLengths);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftCopyPlan)(clAmdFftPlanHandle* out_plHandle, cl_context new_context, clAmdFftPlanHandle in_plHandle);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftBakePlan)(clAmdFftPlanHandle plHandle, cl_uint numQueues, cl_command_queue* commQueueFFT, void (CL_CALLBACK* pfn_notify) (clAmdFftPlanHandle plHandle, void* user_data), void* user_data); extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftBakePlan)(clAmdFftPlanHandle plHandle, cl_uint numQueues, cl_command_queue* commQueueFFT, void (CL_CALLBACK* pfn_notify) (clAmdFftPlanHandle plHandle, void* user_data), void* user_data);
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftCopyPlan)(clAmdFftPlanHandle* out_plHandle, cl_context new_context, clAmdFftPlanHandle in_plHandle);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftCreateDefaultPlan)(clAmdFftPlanHandle* plHandle, cl_context context, const clAmdFftDim dim, const size_t* clLengths);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftDestroyPlan)(clAmdFftPlanHandle* plHandle); extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftDestroyPlan)(clAmdFftPlanHandle* plHandle);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanContext)(const clAmdFftPlanHandle plHandle, cl_context* context); extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftEnqueueTransform)(clAmdFftPlanHandle plHandle, clAmdFftDirection dir, cl_uint numQueuesAndEvents, cl_command_queue* commQueues, cl_uint numWaitEvents, const cl_event* waitEvents, cl_event* outEvents, cl_mem* inputBuffers, cl_mem* outputBuffers, cl_mem tmpBuffer);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanPrecision)(const clAmdFftPlanHandle plHandle, clAmdFftPrecision* precision); //extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetLayout)(const clAmdFftPlanHandle plHandle, clAmdFftLayout* iLayout, clAmdFftLayout* oLayout);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanPrecision)(clAmdFftPlanHandle plHandle, clAmdFftPrecision precision); //extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanBatchSize)(const clAmdFftPlanHandle plHandle, size_t* batchSize);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanScale)(const clAmdFftPlanHandle plHandle, clAmdFftDirection dir, cl_float* scale); //extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanContext)(const clAmdFftPlanHandle plHandle, cl_context* context);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanScale)(clAmdFftPlanHandle plHandle, clAmdFftDirection dir, cl_float scale); //extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanDim)(const clAmdFftPlanHandle plHandle, clAmdFftDim* dim, cl_uint* size);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanBatchSize)(const clAmdFftPlanHandle plHandle, size_t* batchSize); //extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanDistance)(const clAmdFftPlanHandle plHandle, size_t* iDist, size_t* oDist);
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanInStride)(const clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides);
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanLength)(const clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clLengths);
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanOutStride)(const clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides);
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanPrecision)(const clAmdFftPlanHandle plHandle, clAmdFftPrecision* precision);
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanScale)(const clAmdFftPlanHandle plHandle, clAmdFftDirection dir, cl_float* scale);
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanTransposeResult)(const clAmdFftPlanHandle plHandle, clAmdFftResultTransposed* transposed);
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetResultLocation)(const clAmdFftPlanHandle plHandle, clAmdFftResultLocation* placeness);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetTmpBufSize)(const clAmdFftPlanHandle plHandle, size_t* buffersize);
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetVersion)(cl_uint* major, cl_uint* minor, cl_uint* patch);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetLayout)(clAmdFftPlanHandle plHandle, clAmdFftLayout iLayout, clAmdFftLayout oLayout);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanBatchSize)(clAmdFftPlanHandle plHandle, size_t batchSize); extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanBatchSize)(clAmdFftPlanHandle plHandle, size_t batchSize);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanDim)(const clAmdFftPlanHandle plHandle, clAmdFftDim* dim, cl_uint* size); //extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanDim)(clAmdFftPlanHandle plHandle, const clAmdFftDim dim);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanDim)(clAmdFftPlanHandle plHandle, const clAmdFftDim dim); extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanDistance)(clAmdFftPlanHandle plHandle, size_t iDist, size_t oDist);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanLength)(const clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clLengths);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanLength)(clAmdFftPlanHandle plHandle, const clAmdFftDim dim, const size_t* clLengths);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanInStride)(const clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanInStride)(clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides); extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanInStride)(clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanOutStride)(const clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides); //extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanLength)(clAmdFftPlanHandle plHandle, const clAmdFftDim dim, const size_t* clLengths);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanOutStride)(clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides); extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanOutStride)(clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanDistance)(const clAmdFftPlanHandle plHandle, size_t* iDist, size_t* oDist); //extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanPrecision)(clAmdFftPlanHandle plHandle, clAmdFftPrecision precision);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanDistance)(clAmdFftPlanHandle plHandle, size_t iDist, size_t oDist); extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanScale)(clAmdFftPlanHandle plHandle, clAmdFftDirection dir, cl_float scale);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetLayout)(const clAmdFftPlanHandle plHandle, clAmdFftLayout* iLayout, clAmdFftLayout* oLayout); //extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanTransposeResult)(clAmdFftPlanHandle plHandle, clAmdFftResultTransposed transposed);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetLayout)(clAmdFftPlanHandle plHandle, clAmdFftLayout iLayout, clAmdFftLayout oLayout);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetResultLocation)(const clAmdFftPlanHandle plHandle, clAmdFftResultLocation* placeness);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetResultLocation)(clAmdFftPlanHandle plHandle, clAmdFftResultLocation placeness); extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetResultLocation)(clAmdFftPlanHandle plHandle, clAmdFftResultLocation placeness);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanTransposeResult)(const clAmdFftPlanHandle plHandle, clAmdFftResultTransposed* transposed); extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetup)(const clAmdFftSetupData* setupData);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanTransposeResult)(clAmdFftPlanHandle plHandle, clAmdFftResultTransposed transposed); extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftTeardown)();
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetTmpBufSize)(const clAmdFftPlanHandle plHandle, size_t* buffersize);
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftEnqueueTransform)(clAmdFftPlanHandle plHandle, clAmdFftDirection dir, cl_uint numQueuesAndEvents, cl_command_queue* commQueues, cl_uint numWaitEvents, const cl_event* waitEvents, cl_event* outEvents, cl_mem* inputBuffers, cl_mem* outputBuffers, cl_mem tmpBuffer);
#endif
#endif // __OPENCV_OCL_CLAMDFFT_RUNTIME_HPP__
// //
// AUTOGENERATED, DO NOT EDIT // AUTOGENERATED, DO NOT EDIT
// //
#ifndef __OPENCV_OCL_CL_RUNTIME_OPENCL_HPP__ #ifndef __OPENCV_CORE_OCL_RUNTIME_OPENCL_CORE_HPP__
#define __OPENCV_OCL_CL_RUNTIME_OPENCL_HPP__ #error "Invalid usage"
#endif
// generated by parser_cl.py // generated by parser_cl.py
#define clGetPlatformIDs clGetPlatformIDs_ #define clBuildProgram clBuildProgram_
#define clGetPlatformInfo clGetPlatformInfo_ #define clCompileProgram clCompileProgram_
#define clGetDeviceIDs clGetDeviceIDs_ #define clCreateBuffer clCreateBuffer_
#define clGetDeviceInfo clGetDeviceInfo_ #define clCreateCommandQueue clCreateCommandQueue_
#define clCreateSubDevices clCreateSubDevices_
#define clRetainDevice clRetainDevice_
#define clReleaseDevice clReleaseDevice_
#define clCreateContext clCreateContext_ #define clCreateContext clCreateContext_
#define clCreateContextFromType clCreateContextFromType_ #define clCreateContextFromType clCreateContextFromType_
#define clRetainContext clRetainContext_
#define clReleaseContext clReleaseContext_
#define clGetContextInfo clGetContextInfo_
#define clCreateCommandQueue clCreateCommandQueue_
#define clRetainCommandQueue clRetainCommandQueue_
#define clReleaseCommandQueue clReleaseCommandQueue_
#define clGetCommandQueueInfo clGetCommandQueueInfo_
#define clCreateBuffer clCreateBuffer_
#define clCreateSubBuffer clCreateSubBuffer_
#define clCreateImage clCreateImage_ #define clCreateImage clCreateImage_
#define clRetainMemObject clRetainMemObject_ #define clCreateImage2D clCreateImage2D_
#define clReleaseMemObject clReleaseMemObject_ #define clCreateImage3D clCreateImage3D_
#define clGetSupportedImageFormats clGetSupportedImageFormats_
#define clGetMemObjectInfo clGetMemObjectInfo_
#define clGetImageInfo clGetImageInfo_
#define clSetMemObjectDestructorCallback clSetMemObjectDestructorCallback_
#define clCreateSampler clCreateSampler_
#define clRetainSampler clRetainSampler_
#define clReleaseSampler clReleaseSampler_
#define clGetSamplerInfo clGetSamplerInfo_
#define clCreateProgramWithSource clCreateProgramWithSource_
#define clCreateProgramWithBinary clCreateProgramWithBinary_
#define clCreateProgramWithBuiltInKernels clCreateProgramWithBuiltInKernels_
#define clRetainProgram clRetainProgram_
#define clReleaseProgram clReleaseProgram_
#define clBuildProgram clBuildProgram_
#define clCompileProgram clCompileProgram_
#define clLinkProgram clLinkProgram_
#define clUnloadPlatformCompiler clUnloadPlatformCompiler_
#define clGetProgramInfo clGetProgramInfo_
#define clGetProgramBuildInfo clGetProgramBuildInfo_
#define clCreateKernel clCreateKernel_ #define clCreateKernel clCreateKernel_
#define clCreateKernelsInProgram clCreateKernelsInProgram_ #define clCreateKernelsInProgram clCreateKernelsInProgram_
#define clRetainKernel clRetainKernel_ #define clCreateProgramWithBinary clCreateProgramWithBinary_
#define clReleaseKernel clReleaseKernel_ #define clCreateProgramWithBuiltInKernels clCreateProgramWithBuiltInKernels_
#define clSetKernelArg clSetKernelArg_ #define clCreateProgramWithSource clCreateProgramWithSource_
#define clGetKernelInfo clGetKernelInfo_ #define clCreateSampler clCreateSampler_
#define clGetKernelArgInfo clGetKernelArgInfo_ #define clCreateSubBuffer clCreateSubBuffer_
#define clGetKernelWorkGroupInfo clGetKernelWorkGroupInfo_ #define clCreateSubDevices clCreateSubDevices_
#define clWaitForEvents clWaitForEvents_
#define clGetEventInfo clGetEventInfo_
#define clCreateUserEvent clCreateUserEvent_ #define clCreateUserEvent clCreateUserEvent_
#define clRetainEvent clRetainEvent_ #define clEnqueueBarrier clEnqueueBarrier_
#define clReleaseEvent clReleaseEvent_ #define clEnqueueBarrierWithWaitList clEnqueueBarrierWithWaitList_
#define clSetUserEventStatus clSetUserEventStatus_
#define clSetEventCallback clSetEventCallback_
#define clGetEventProfilingInfo clGetEventProfilingInfo_
#define clFlush clFlush_
#define clFinish clFinish_
#define clEnqueueReadBuffer clEnqueueReadBuffer_
#define clEnqueueReadBufferRect clEnqueueReadBufferRect_
#define clEnqueueWriteBuffer clEnqueueWriteBuffer_
#define clEnqueueWriteBufferRect clEnqueueWriteBufferRect_
#define clEnqueueFillBuffer clEnqueueFillBuffer_
#define clEnqueueCopyBuffer clEnqueueCopyBuffer_ #define clEnqueueCopyBuffer clEnqueueCopyBuffer_
#define clEnqueueCopyBufferRect clEnqueueCopyBufferRect_ #define clEnqueueCopyBufferRect clEnqueueCopyBufferRect_
#define clEnqueueReadImage clEnqueueReadImage_ #define clEnqueueCopyBufferToImage clEnqueueCopyBufferToImage_
#define clEnqueueWriteImage clEnqueueWriteImage_
#define clEnqueueFillImage clEnqueueFillImage_
#define clEnqueueCopyImage clEnqueueCopyImage_ #define clEnqueueCopyImage clEnqueueCopyImage_
#define clEnqueueCopyImageToBuffer clEnqueueCopyImageToBuffer_ #define clEnqueueCopyImageToBuffer clEnqueueCopyImageToBuffer_
#define clEnqueueCopyBufferToImage clEnqueueCopyBufferToImage_ #define clEnqueueFillBuffer clEnqueueFillBuffer_
#define clEnqueueFillImage clEnqueueFillImage_
#define clEnqueueMapBuffer clEnqueueMapBuffer_ #define clEnqueueMapBuffer clEnqueueMapBuffer_
#define clEnqueueMapImage clEnqueueMapImage_ #define clEnqueueMapImage clEnqueueMapImage_
#define clEnqueueUnmapMemObject clEnqueueUnmapMemObject_ #define clEnqueueMarker clEnqueueMarker_
#define clEnqueueMarkerWithWaitList clEnqueueMarkerWithWaitList_
#define clEnqueueMigrateMemObjects clEnqueueMigrateMemObjects_ #define clEnqueueMigrateMemObjects clEnqueueMigrateMemObjects_
#define clEnqueueNDRangeKernel clEnqueueNDRangeKernel_ #define clEnqueueNDRangeKernel clEnqueueNDRangeKernel_
#define clEnqueueTask clEnqueueTask_
#define clEnqueueNativeKernel clEnqueueNativeKernel_ #define clEnqueueNativeKernel clEnqueueNativeKernel_
#define clEnqueueMarkerWithWaitList clEnqueueMarkerWithWaitList_ #define clEnqueueReadBuffer clEnqueueReadBuffer_
#define clEnqueueBarrierWithWaitList clEnqueueBarrierWithWaitList_ #define clEnqueueReadBufferRect clEnqueueReadBufferRect_
#define clGetExtensionFunctionAddressForPlatform clGetExtensionFunctionAddressForPlatform_ #define clEnqueueReadImage clEnqueueReadImage_
#define clCreateImage2D clCreateImage2D_ #define clEnqueueTask clEnqueueTask_
#define clCreateImage3D clCreateImage3D_ #define clEnqueueUnmapMemObject clEnqueueUnmapMemObject_
#define clEnqueueMarker clEnqueueMarker_
#define clEnqueueWaitForEvents clEnqueueWaitForEvents_ #define clEnqueueWaitForEvents clEnqueueWaitForEvents_
#define clEnqueueBarrier clEnqueueBarrier_ #define clEnqueueWriteBuffer clEnqueueWriteBuffer_
#define clUnloadCompiler clUnloadCompiler_ #define clEnqueueWriteBufferRect clEnqueueWriteBufferRect_
#define clEnqueueWriteImage clEnqueueWriteImage_
#define clFinish clFinish_
#define clFlush clFlush_
#define clGetCommandQueueInfo clGetCommandQueueInfo_
#define clGetContextInfo clGetContextInfo_
#define clGetDeviceIDs clGetDeviceIDs_
#define clGetDeviceInfo clGetDeviceInfo_
#define clGetEventInfo clGetEventInfo_
#define clGetEventProfilingInfo clGetEventProfilingInfo_
#define clGetExtensionFunctionAddress clGetExtensionFunctionAddress_ #define clGetExtensionFunctionAddress clGetExtensionFunctionAddress_
#define clGetExtensionFunctionAddressForPlatform clGetExtensionFunctionAddressForPlatform_
#define clGetImageInfo clGetImageInfo_
#define clGetKernelArgInfo clGetKernelArgInfo_
#define clGetKernelInfo clGetKernelInfo_
#define clGetKernelWorkGroupInfo clGetKernelWorkGroupInfo_
#define clGetMemObjectInfo clGetMemObjectInfo_
#define clGetPlatformIDs clGetPlatformIDs_
#define clGetPlatformInfo clGetPlatformInfo_
#define clGetProgramBuildInfo clGetProgramBuildInfo_
#define clGetProgramInfo clGetProgramInfo_
#define clGetSamplerInfo clGetSamplerInfo_
#define clGetSupportedImageFormats clGetSupportedImageFormats_
#define clLinkProgram clLinkProgram_
#define clReleaseCommandQueue clReleaseCommandQueue_
#define clReleaseContext clReleaseContext_
#define clReleaseDevice clReleaseDevice_
#define clReleaseEvent clReleaseEvent_
#define clReleaseKernel clReleaseKernel_
#define clReleaseMemObject clReleaseMemObject_
#define clReleaseProgram clReleaseProgram_
#define clReleaseSampler clReleaseSampler_
#define clRetainCommandQueue clRetainCommandQueue_
#define clRetainContext clRetainContext_
#define clRetainDevice clRetainDevice_
#define clRetainEvent clRetainEvent_
#define clRetainKernel clRetainKernel_
#define clRetainMemObject clRetainMemObject_
#define clRetainProgram clRetainProgram_
#define clRetainSampler clRetainSampler_
#define clSetEventCallback clSetEventCallback_
#define clSetKernelArg clSetKernelArg_
#define clSetMemObjectDestructorCallback clSetMemObjectDestructorCallback_
#define clSetUserEventStatus clSetUserEventStatus_
#define clUnloadCompiler clUnloadCompiler_
#define clUnloadPlatformCompiler clUnloadPlatformCompiler_
#define clWaitForEvents clWaitForEvents_
#if defined __APPLE__ #if defined __APPLE__
#include <OpenCL/cl.h> #include <OpenCL/cl.h>
...@@ -101,279 +102,269 @@ ...@@ -101,279 +102,269 @@
#endif #endif
// generated by parser_cl.py // generated by parser_cl.py
#undef clGetPlatformIDs #undef clBuildProgram
#define clGetPlatformIDs clGetPlatformIDs_pfn #define clBuildProgram clBuildProgram_pfn
#undef clGetPlatformInfo #undef clCompileProgram
#define clGetPlatformInfo clGetPlatformInfo_pfn #define clCompileProgram clCompileProgram_pfn
#undef clGetDeviceIDs #undef clCreateBuffer
#define clGetDeviceIDs clGetDeviceIDs_pfn #define clCreateBuffer clCreateBuffer_pfn
#undef clGetDeviceInfo #undef clCreateCommandQueue
#define clGetDeviceInfo clGetDeviceInfo_pfn #define clCreateCommandQueue clCreateCommandQueue_pfn
#undef clCreateSubDevices
#define clCreateSubDevices clCreateSubDevices_pfn
#undef clRetainDevice
#define clRetainDevice clRetainDevice_pfn
#undef clReleaseDevice
#define clReleaseDevice clReleaseDevice_pfn
#undef clCreateContext #undef clCreateContext
#define clCreateContext clCreateContext_pfn #define clCreateContext clCreateContext_pfn
#undef clCreateContextFromType #undef clCreateContextFromType
#define clCreateContextFromType clCreateContextFromType_pfn #define clCreateContextFromType clCreateContextFromType_pfn
#undef clRetainContext
#define clRetainContext clRetainContext_pfn
#undef clReleaseContext
#define clReleaseContext clReleaseContext_pfn
#undef clGetContextInfo
#define clGetContextInfo clGetContextInfo_pfn
#undef clCreateCommandQueue
#define clCreateCommandQueue clCreateCommandQueue_pfn
#undef clRetainCommandQueue
#define clRetainCommandQueue clRetainCommandQueue_pfn
#undef clReleaseCommandQueue
#define clReleaseCommandQueue clReleaseCommandQueue_pfn
#undef clGetCommandQueueInfo
#define clGetCommandQueueInfo clGetCommandQueueInfo_pfn
#undef clCreateBuffer
#define clCreateBuffer clCreateBuffer_pfn
#undef clCreateSubBuffer
#define clCreateSubBuffer clCreateSubBuffer_pfn
#undef clCreateImage #undef clCreateImage
#define clCreateImage clCreateImage_pfn #define clCreateImage clCreateImage_pfn
#undef clRetainMemObject #undef clCreateImage2D
#define clRetainMemObject clRetainMemObject_pfn #define clCreateImage2D clCreateImage2D_pfn
#undef clReleaseMemObject #undef clCreateImage3D
#define clReleaseMemObject clReleaseMemObject_pfn #define clCreateImage3D clCreateImage3D_pfn
#undef clGetSupportedImageFormats
#define clGetSupportedImageFormats clGetSupportedImageFormats_pfn
#undef clGetMemObjectInfo
#define clGetMemObjectInfo clGetMemObjectInfo_pfn
#undef clGetImageInfo
#define clGetImageInfo clGetImageInfo_pfn
#undef clSetMemObjectDestructorCallback
#define clSetMemObjectDestructorCallback clSetMemObjectDestructorCallback_pfn
#undef clCreateSampler
#define clCreateSampler clCreateSampler_pfn
#undef clRetainSampler
#define clRetainSampler clRetainSampler_pfn
#undef clReleaseSampler
#define clReleaseSampler clReleaseSampler_pfn
#undef clGetSamplerInfo
#define clGetSamplerInfo clGetSamplerInfo_pfn
#undef clCreateProgramWithSource
#define clCreateProgramWithSource clCreateProgramWithSource_pfn
#undef clCreateProgramWithBinary
#define clCreateProgramWithBinary clCreateProgramWithBinary_pfn
#undef clCreateProgramWithBuiltInKernels
#define clCreateProgramWithBuiltInKernels clCreateProgramWithBuiltInKernels_pfn
#undef clRetainProgram
#define clRetainProgram clRetainProgram_pfn
#undef clReleaseProgram
#define clReleaseProgram clReleaseProgram_pfn
#undef clBuildProgram
#define clBuildProgram clBuildProgram_pfn
#undef clCompileProgram
#define clCompileProgram clCompileProgram_pfn
#undef clLinkProgram
#define clLinkProgram clLinkProgram_pfn
#undef clUnloadPlatformCompiler
#define clUnloadPlatformCompiler clUnloadPlatformCompiler_pfn
#undef clGetProgramInfo
#define clGetProgramInfo clGetProgramInfo_pfn
#undef clGetProgramBuildInfo
#define clGetProgramBuildInfo clGetProgramBuildInfo_pfn
#undef clCreateKernel #undef clCreateKernel
#define clCreateKernel clCreateKernel_pfn #define clCreateKernel clCreateKernel_pfn
#undef clCreateKernelsInProgram #undef clCreateKernelsInProgram
#define clCreateKernelsInProgram clCreateKernelsInProgram_pfn #define clCreateKernelsInProgram clCreateKernelsInProgram_pfn
#undef clRetainKernel #undef clCreateProgramWithBinary
#define clRetainKernel clRetainKernel_pfn #define clCreateProgramWithBinary clCreateProgramWithBinary_pfn
#undef clReleaseKernel #undef clCreateProgramWithBuiltInKernels
#define clReleaseKernel clReleaseKernel_pfn #define clCreateProgramWithBuiltInKernels clCreateProgramWithBuiltInKernels_pfn
#undef clSetKernelArg #undef clCreateProgramWithSource
#define clSetKernelArg clSetKernelArg_pfn #define clCreateProgramWithSource clCreateProgramWithSource_pfn
#undef clGetKernelInfo #undef clCreateSampler
#define clGetKernelInfo clGetKernelInfo_pfn #define clCreateSampler clCreateSampler_pfn
#undef clGetKernelArgInfo #undef clCreateSubBuffer
#define clGetKernelArgInfo clGetKernelArgInfo_pfn #define clCreateSubBuffer clCreateSubBuffer_pfn
#undef clGetKernelWorkGroupInfo #undef clCreateSubDevices
#define clGetKernelWorkGroupInfo clGetKernelWorkGroupInfo_pfn #define clCreateSubDevices clCreateSubDevices_pfn
#undef clWaitForEvents #undef clCreateUserEvent
#define clWaitForEvents clWaitForEvents_pfn #define clCreateUserEvent clCreateUserEvent_pfn
#undef clGetEventInfo #undef clEnqueueBarrier
#define clGetEventInfo clGetEventInfo_pfn #define clEnqueueBarrier clEnqueueBarrier_pfn
#undef clCreateUserEvent #undef clEnqueueBarrierWithWaitList
#define clCreateUserEvent clCreateUserEvent_pfn #define clEnqueueBarrierWithWaitList clEnqueueBarrierWithWaitList_pfn
#undef clRetainEvent
#define clRetainEvent clRetainEvent_pfn
#undef clReleaseEvent
#define clReleaseEvent clReleaseEvent_pfn
#undef clSetUserEventStatus
#define clSetUserEventStatus clSetUserEventStatus_pfn
#undef clSetEventCallback
#define clSetEventCallback clSetEventCallback_pfn
#undef clGetEventProfilingInfo
#define clGetEventProfilingInfo clGetEventProfilingInfo_pfn
#undef clFlush
#define clFlush clFlush_pfn
#undef clFinish
#define clFinish clFinish_pfn
#undef clEnqueueReadBuffer
#define clEnqueueReadBuffer clEnqueueReadBuffer_pfn
#undef clEnqueueReadBufferRect
#define clEnqueueReadBufferRect clEnqueueReadBufferRect_pfn
#undef clEnqueueWriteBuffer
#define clEnqueueWriteBuffer clEnqueueWriteBuffer_pfn
#undef clEnqueueWriteBufferRect
#define clEnqueueWriteBufferRect clEnqueueWriteBufferRect_pfn
#undef clEnqueueFillBuffer
#define clEnqueueFillBuffer clEnqueueFillBuffer_pfn
#undef clEnqueueCopyBuffer #undef clEnqueueCopyBuffer
#define clEnqueueCopyBuffer clEnqueueCopyBuffer_pfn #define clEnqueueCopyBuffer clEnqueueCopyBuffer_pfn
#undef clEnqueueCopyBufferRect #undef clEnqueueCopyBufferRect
#define clEnqueueCopyBufferRect clEnqueueCopyBufferRect_pfn #define clEnqueueCopyBufferRect clEnqueueCopyBufferRect_pfn
#undef clEnqueueReadImage #undef clEnqueueCopyBufferToImage
#define clEnqueueReadImage clEnqueueReadImage_pfn #define clEnqueueCopyBufferToImage clEnqueueCopyBufferToImage_pfn
#undef clEnqueueWriteImage
#define clEnqueueWriteImage clEnqueueWriteImage_pfn
#undef clEnqueueFillImage
#define clEnqueueFillImage clEnqueueFillImage_pfn
#undef clEnqueueCopyImage #undef clEnqueueCopyImage
#define clEnqueueCopyImage clEnqueueCopyImage_pfn #define clEnqueueCopyImage clEnqueueCopyImage_pfn
#undef clEnqueueCopyImageToBuffer #undef clEnqueueCopyImageToBuffer
#define clEnqueueCopyImageToBuffer clEnqueueCopyImageToBuffer_pfn #define clEnqueueCopyImageToBuffer clEnqueueCopyImageToBuffer_pfn
#undef clEnqueueCopyBufferToImage #undef clEnqueueFillBuffer
#define clEnqueueCopyBufferToImage clEnqueueCopyBufferToImage_pfn #define clEnqueueFillBuffer clEnqueueFillBuffer_pfn
#undef clEnqueueFillImage
#define clEnqueueFillImage clEnqueueFillImage_pfn
#undef clEnqueueMapBuffer #undef clEnqueueMapBuffer
#define clEnqueueMapBuffer clEnqueueMapBuffer_pfn #define clEnqueueMapBuffer clEnqueueMapBuffer_pfn
#undef clEnqueueMapImage #undef clEnqueueMapImage
#define clEnqueueMapImage clEnqueueMapImage_pfn #define clEnqueueMapImage clEnqueueMapImage_pfn
#undef clEnqueueUnmapMemObject #undef clEnqueueMarker
#define clEnqueueUnmapMemObject clEnqueueUnmapMemObject_pfn #define clEnqueueMarker clEnqueueMarker_pfn
#undef clEnqueueMarkerWithWaitList
#define clEnqueueMarkerWithWaitList clEnqueueMarkerWithWaitList_pfn
#undef clEnqueueMigrateMemObjects #undef clEnqueueMigrateMemObjects
#define clEnqueueMigrateMemObjects clEnqueueMigrateMemObjects_pfn #define clEnqueueMigrateMemObjects clEnqueueMigrateMemObjects_pfn
#undef clEnqueueNDRangeKernel #undef clEnqueueNDRangeKernel
#define clEnqueueNDRangeKernel clEnqueueNDRangeKernel_pfn #define clEnqueueNDRangeKernel clEnqueueNDRangeKernel_pfn
#undef clEnqueueTask
#define clEnqueueTask clEnqueueTask_pfn
#undef clEnqueueNativeKernel #undef clEnqueueNativeKernel
#define clEnqueueNativeKernel clEnqueueNativeKernel_pfn #define clEnqueueNativeKernel clEnqueueNativeKernel_pfn
#undef clEnqueueMarkerWithWaitList #undef clEnqueueReadBuffer
#define clEnqueueMarkerWithWaitList clEnqueueMarkerWithWaitList_pfn #define clEnqueueReadBuffer clEnqueueReadBuffer_pfn
#undef clEnqueueBarrierWithWaitList #undef clEnqueueReadBufferRect
#define clEnqueueBarrierWithWaitList clEnqueueBarrierWithWaitList_pfn #define clEnqueueReadBufferRect clEnqueueReadBufferRect_pfn
#undef clGetExtensionFunctionAddressForPlatform #undef clEnqueueReadImage
#define clGetExtensionFunctionAddressForPlatform clGetExtensionFunctionAddressForPlatform_pfn #define clEnqueueReadImage clEnqueueReadImage_pfn
#undef clCreateImage2D #undef clEnqueueTask
#define clCreateImage2D clCreateImage2D_pfn #define clEnqueueTask clEnqueueTask_pfn
#undef clCreateImage3D #undef clEnqueueUnmapMemObject
#define clCreateImage3D clCreateImage3D_pfn #define clEnqueueUnmapMemObject clEnqueueUnmapMemObject_pfn
#undef clEnqueueMarker
#define clEnqueueMarker clEnqueueMarker_pfn
#undef clEnqueueWaitForEvents #undef clEnqueueWaitForEvents
#define clEnqueueWaitForEvents clEnqueueWaitForEvents_pfn #define clEnqueueWaitForEvents clEnqueueWaitForEvents_pfn
#undef clEnqueueBarrier #undef clEnqueueWriteBuffer
#define clEnqueueBarrier clEnqueueBarrier_pfn #define clEnqueueWriteBuffer clEnqueueWriteBuffer_pfn
#undef clUnloadCompiler #undef clEnqueueWriteBufferRect
#define clUnloadCompiler clUnloadCompiler_pfn #define clEnqueueWriteBufferRect clEnqueueWriteBufferRect_pfn
#undef clEnqueueWriteImage
#define clEnqueueWriteImage clEnqueueWriteImage_pfn
#undef clFinish
#define clFinish clFinish_pfn
#undef clFlush
#define clFlush clFlush_pfn
#undef clGetCommandQueueInfo
#define clGetCommandQueueInfo clGetCommandQueueInfo_pfn
#undef clGetContextInfo
#define clGetContextInfo clGetContextInfo_pfn
#undef clGetDeviceIDs
#define clGetDeviceIDs clGetDeviceIDs_pfn
#undef clGetDeviceInfo
#define clGetDeviceInfo clGetDeviceInfo_pfn
#undef clGetEventInfo
#define clGetEventInfo clGetEventInfo_pfn
#undef clGetEventProfilingInfo
#define clGetEventProfilingInfo clGetEventProfilingInfo_pfn
#undef clGetExtensionFunctionAddress #undef clGetExtensionFunctionAddress
#define clGetExtensionFunctionAddress clGetExtensionFunctionAddress_pfn #define clGetExtensionFunctionAddress clGetExtensionFunctionAddress_pfn
#undef clGetExtensionFunctionAddressForPlatform
#ifndef CL_RUNTIME_EXPORT #define clGetExtensionFunctionAddressForPlatform clGetExtensionFunctionAddressForPlatform_pfn
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_OCL_SHARED)) && (defined WIN32 || defined _WIN32 || defined WINCE) #undef clGetImageInfo
#define CL_RUNTIME_EXPORT __declspec(dllimport) #define clGetImageInfo clGetImageInfo_pfn
#else #undef clGetKernelArgInfo
#define CL_RUNTIME_EXPORT #define clGetKernelArgInfo clGetKernelArgInfo_pfn
#endif #undef clGetKernelInfo
#endif #define clGetKernelInfo clGetKernelInfo_pfn
#undef clGetKernelWorkGroupInfo
#define clGetKernelWorkGroupInfo clGetKernelWorkGroupInfo_pfn
#undef clGetMemObjectInfo
#define clGetMemObjectInfo clGetMemObjectInfo_pfn
#undef clGetPlatformIDs
#define clGetPlatformIDs clGetPlatformIDs_pfn
#undef clGetPlatformInfo
#define clGetPlatformInfo clGetPlatformInfo_pfn
#undef clGetProgramBuildInfo
#define clGetProgramBuildInfo clGetProgramBuildInfo_pfn
#undef clGetProgramInfo
#define clGetProgramInfo clGetProgramInfo_pfn
#undef clGetSamplerInfo
#define clGetSamplerInfo clGetSamplerInfo_pfn
#undef clGetSupportedImageFormats
#define clGetSupportedImageFormats clGetSupportedImageFormats_pfn
#undef clLinkProgram
#define clLinkProgram clLinkProgram_pfn
#undef clReleaseCommandQueue
#define clReleaseCommandQueue clReleaseCommandQueue_pfn
#undef clReleaseContext
#define clReleaseContext clReleaseContext_pfn
#undef clReleaseDevice
#define clReleaseDevice clReleaseDevice_pfn
#undef clReleaseEvent
#define clReleaseEvent clReleaseEvent_pfn
#undef clReleaseKernel
#define clReleaseKernel clReleaseKernel_pfn
#undef clReleaseMemObject
#define clReleaseMemObject clReleaseMemObject_pfn
#undef clReleaseProgram
#define clReleaseProgram clReleaseProgram_pfn
#undef clReleaseSampler
#define clReleaseSampler clReleaseSampler_pfn
#undef clRetainCommandQueue
#define clRetainCommandQueue clRetainCommandQueue_pfn
#undef clRetainContext
#define clRetainContext clRetainContext_pfn
#undef clRetainDevice
#define clRetainDevice clRetainDevice_pfn
#undef clRetainEvent
#define clRetainEvent clRetainEvent_pfn
#undef clRetainKernel
#define clRetainKernel clRetainKernel_pfn
#undef clRetainMemObject
#define clRetainMemObject clRetainMemObject_pfn
#undef clRetainProgram
#define clRetainProgram clRetainProgram_pfn
#undef clRetainSampler
#define clRetainSampler clRetainSampler_pfn
#undef clSetEventCallback
#define clSetEventCallback clSetEventCallback_pfn
#undef clSetKernelArg
#define clSetKernelArg clSetKernelArg_pfn
#undef clSetMemObjectDestructorCallback
#define clSetMemObjectDestructorCallback clSetMemObjectDestructorCallback_pfn
#undef clSetUserEventStatus
#define clSetUserEventStatus clSetUserEventStatus_pfn
#undef clUnloadCompiler
#define clUnloadCompiler clUnloadCompiler_pfn
#undef clUnloadPlatformCompiler
#define clUnloadPlatformCompiler clUnloadPlatformCompiler_pfn
#undef clWaitForEvents
#define clWaitForEvents clWaitForEvents_pfn
// generated by parser_cl.py // generated by parser_cl.py
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetPlatformIDs)(cl_uint, cl_platform_id*, cl_uint*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clBuildProgram)(cl_program, cl_uint, const cl_device_id*, const char*, void (CL_CALLBACK*) (cl_program, void*), void*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetPlatformInfo)(cl_platform_id, cl_platform_info, size_t, void*, size_t*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clCompileProgram)(cl_program, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, const char**, void (CL_CALLBACK*) (cl_program, void*), void*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetDeviceIDs)(cl_platform_id, cl_device_type, cl_uint, cl_device_id*, cl_uint*); extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateBuffer)(cl_context, cl_mem_flags, size_t, void*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetDeviceInfo)(cl_device_id, cl_device_info, size_t, void*, size_t*); extern CL_RUNTIME_EXPORT cl_command_queue (CL_API_CALL*clCreateCommandQueue)(cl_context, cl_device_id, cl_command_queue_properties, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clCreateSubDevices)(cl_device_id, const cl_device_partition_property*, cl_uint, cl_device_id*, cl_uint*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainDevice)(cl_device_id);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseDevice)(cl_device_id);
extern CL_RUNTIME_EXPORT cl_context (CL_API_CALL*clCreateContext)(const cl_context_properties*, cl_uint, const cl_device_id*, void (CL_CALLBACK*) (const char*, const void*, size_t, void*), void*, cl_int*); extern CL_RUNTIME_EXPORT cl_context (CL_API_CALL*clCreateContext)(const cl_context_properties*, cl_uint, const cl_device_id*, void (CL_CALLBACK*) (const char*, const void*, size_t, void*), void*, cl_int*);
extern CL_RUNTIME_EXPORT cl_context (CL_API_CALL*clCreateContextFromType)(const cl_context_properties*, cl_device_type, void (CL_CALLBACK*) (const char*, const void*, size_t, void*), void*, cl_int*); extern CL_RUNTIME_EXPORT cl_context (CL_API_CALL*clCreateContextFromType)(const cl_context_properties*, cl_device_type, void (CL_CALLBACK*) (const char*, const void*, size_t, void*), void*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainContext)(cl_context);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseContext)(cl_context);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetContextInfo)(cl_context, cl_context_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_command_queue (CL_API_CALL*clCreateCommandQueue)(cl_context, cl_device_id, cl_command_queue_properties, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainCommandQueue)(cl_command_queue);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseCommandQueue)(cl_command_queue);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetCommandQueueInfo)(cl_command_queue, cl_command_queue_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateBuffer)(cl_context, cl_mem_flags, size_t, void*, cl_int*);
extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateSubBuffer)(cl_mem, cl_mem_flags, cl_buffer_create_type, const void*, cl_int*);
extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateImage)(cl_context, cl_mem_flags, const cl_image_format*, const cl_image_desc*, void*, cl_int*); extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateImage)(cl_context, cl_mem_flags, const cl_image_format*, const cl_image_desc*, void*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainMemObject)(cl_mem); extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateImage2D)(cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, void*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseMemObject)(cl_mem); extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateImage3D)(cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, size_t, size_t, void*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetSupportedImageFormats)(cl_context, cl_mem_flags, cl_mem_object_type, cl_uint, cl_image_format*, cl_uint*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetMemObjectInfo)(cl_mem, cl_mem_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetImageInfo)(cl_mem, cl_image_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clSetMemObjectDestructorCallback)(cl_mem, void (CL_CALLBACK*) (cl_mem, void*), void*);
extern CL_RUNTIME_EXPORT cl_sampler (CL_API_CALL*clCreateSampler)(cl_context, cl_bool, cl_addressing_mode, cl_filter_mode, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainSampler)(cl_sampler);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseSampler)(cl_sampler);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetSamplerInfo)(cl_sampler, cl_sampler_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_program (CL_API_CALL*clCreateProgramWithSource)(cl_context, cl_uint, const char**, const size_t*, cl_int*);
extern CL_RUNTIME_EXPORT cl_program (CL_API_CALL*clCreateProgramWithBinary)(cl_context, cl_uint, const cl_device_id*, const size_t*, const unsigned char**, cl_int*, cl_int*);
extern CL_RUNTIME_EXPORT cl_program (CL_API_CALL*clCreateProgramWithBuiltInKernels)(cl_context, cl_uint, const cl_device_id*, const char*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainProgram)(cl_program);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseProgram)(cl_program);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clBuildProgram)(cl_program, cl_uint, const cl_device_id*, const char*, void (CL_CALLBACK*) (cl_program, void*), void*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clCompileProgram)(cl_program, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, const char**, void (CL_CALLBACK*) (cl_program, void*), void*);
extern CL_RUNTIME_EXPORT cl_program (CL_API_CALL*clLinkProgram)(cl_context, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, void (CL_CALLBACK*) (cl_program, void*), void*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clUnloadPlatformCompiler)(cl_platform_id);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetProgramInfo)(cl_program, cl_program_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetProgramBuildInfo)(cl_program, cl_device_id, cl_program_build_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_kernel (CL_API_CALL*clCreateKernel)(cl_program, const char*, cl_int*); extern CL_RUNTIME_EXPORT cl_kernel (CL_API_CALL*clCreateKernel)(cl_program, const char*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clCreateKernelsInProgram)(cl_program, cl_uint, cl_kernel*, cl_uint*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clCreateKernelsInProgram)(cl_program, cl_uint, cl_kernel*, cl_uint*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainKernel)(cl_kernel); extern CL_RUNTIME_EXPORT cl_program (CL_API_CALL*clCreateProgramWithBinary)(cl_context, cl_uint, const cl_device_id*, const size_t*, const unsigned char**, cl_int*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseKernel)(cl_kernel); extern CL_RUNTIME_EXPORT cl_program (CL_API_CALL*clCreateProgramWithBuiltInKernels)(cl_context, cl_uint, const cl_device_id*, const char*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clSetKernelArg)(cl_kernel, cl_uint, size_t, const void*); extern CL_RUNTIME_EXPORT cl_program (CL_API_CALL*clCreateProgramWithSource)(cl_context, cl_uint, const char**, const size_t*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetKernelInfo)(cl_kernel, cl_kernel_info, size_t, void*, size_t*); extern CL_RUNTIME_EXPORT cl_sampler (CL_API_CALL*clCreateSampler)(cl_context, cl_bool, cl_addressing_mode, cl_filter_mode, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetKernelArgInfo)(cl_kernel, cl_uint, cl_kernel_arg_info, size_t, void*, size_t*); extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateSubBuffer)(cl_mem, cl_mem_flags, cl_buffer_create_type, const void*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetKernelWorkGroupInfo)(cl_kernel, cl_device_id, cl_kernel_work_group_info, size_t, void*, size_t*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clCreateSubDevices)(cl_device_id, const cl_device_partition_property*, cl_uint, cl_device_id*, cl_uint*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clWaitForEvents)(cl_uint, const cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetEventInfo)(cl_event, cl_event_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_event (CL_API_CALL*clCreateUserEvent)(cl_context, cl_int*); extern CL_RUNTIME_EXPORT cl_event (CL_API_CALL*clCreateUserEvent)(cl_context, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainEvent)(cl_event); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueBarrier)(cl_command_queue);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseEvent)(cl_event); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueBarrierWithWaitList)(cl_command_queue, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clSetUserEventStatus)(cl_event, cl_int);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clSetEventCallback)(cl_event, cl_int, void (CL_CALLBACK*) (cl_event, cl_int, void*), void*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetEventProfilingInfo)(cl_event, cl_profiling_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clFlush)(cl_command_queue);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clFinish)(cl_command_queue);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueReadBuffer)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueReadBufferRect)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueWriteBuffer)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueWriteBufferRect)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueFillBuffer)(cl_command_queue, cl_mem, const void*, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueCopyBuffer)(cl_command_queue, cl_mem, cl_mem, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueCopyBuffer)(cl_command_queue, cl_mem, cl_mem, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueCopyBufferRect)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueCopyBufferRect)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueReadImage)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueCopyBufferToImage)(cl_command_queue, cl_mem, cl_mem, size_t, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueWriteImage)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueFillImage)(cl_command_queue, cl_mem, const void*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueCopyImage)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueCopyImage)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueCopyImageToBuffer)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, size_t, cl_uint, const cl_event*, cl_event*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueCopyImageToBuffer)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, size_t, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueCopyBufferToImage)(cl_command_queue, cl_mem, cl_mem, size_t, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueFillBuffer)(cl_command_queue, cl_mem, const void*, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueFillImage)(cl_command_queue, cl_mem, const void*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT void* (CL_API_CALL*clEnqueueMapBuffer)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, size_t, size_t, cl_uint, const cl_event*, cl_event*, cl_int*); extern CL_RUNTIME_EXPORT void* (CL_API_CALL*clEnqueueMapBuffer)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, size_t, size_t, cl_uint, const cl_event*, cl_event*, cl_int*);
extern CL_RUNTIME_EXPORT void* (CL_API_CALL*clEnqueueMapImage)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, const size_t*, const size_t*, size_t*, size_t*, cl_uint, const cl_event*, cl_event*, cl_int*); extern CL_RUNTIME_EXPORT void* (CL_API_CALL*clEnqueueMapImage)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, const size_t*, const size_t*, size_t*, size_t*, cl_uint, const cl_event*, cl_event*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueUnmapMemObject)(cl_command_queue, cl_mem, void*, cl_uint, const cl_event*, cl_event*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueMarker)(cl_command_queue, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueMarkerWithWaitList)(cl_command_queue, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueMigrateMemObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_mem_migration_flags, cl_uint, const cl_event*, cl_event*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueMigrateMemObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_mem_migration_flags, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueNDRangeKernel)(cl_command_queue, cl_kernel, cl_uint, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueNDRangeKernel)(cl_command_queue, cl_kernel, cl_uint, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueTask)(cl_command_queue, cl_kernel, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueNativeKernel)(cl_command_queue, void (CL_CALLBACK*) (void*), void*, size_t, cl_uint, const cl_mem*, const void**, cl_uint, const cl_event*, cl_event*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueNativeKernel)(cl_command_queue, void (CL_CALLBACK*) (void*), void*, size_t, cl_uint, const cl_mem*, const void**, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueMarkerWithWaitList)(cl_command_queue, cl_uint, const cl_event*, cl_event*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueReadBuffer)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueBarrierWithWaitList)(cl_command_queue, cl_uint, const cl_event*, cl_event*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueReadBufferRect)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT void* (CL_API_CALL*clGetExtensionFunctionAddressForPlatform)(cl_platform_id, const char*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueReadImage)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateImage2D)(cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, void*, cl_int*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueTask)(cl_command_queue, cl_kernel, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateImage3D)(cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, size_t, size_t, void*, cl_int*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueUnmapMemObject)(cl_command_queue, cl_mem, void*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueMarker)(cl_command_queue, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueWaitForEvents)(cl_command_queue, cl_uint, const cl_event*); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueWaitForEvents)(cl_command_queue, cl_uint, const cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueBarrier)(cl_command_queue); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueWriteBuffer)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clUnloadCompiler)(); extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueWriteBufferRect)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueWriteImage)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clFinish)(cl_command_queue);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clFlush)(cl_command_queue);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetCommandQueueInfo)(cl_command_queue, cl_command_queue_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetContextInfo)(cl_context, cl_context_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetDeviceIDs)(cl_platform_id, cl_device_type, cl_uint, cl_device_id*, cl_uint*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetDeviceInfo)(cl_device_id, cl_device_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetEventInfo)(cl_event, cl_event_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetEventProfilingInfo)(cl_event, cl_profiling_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT void* (CL_API_CALL*clGetExtensionFunctionAddress)(const char*); extern CL_RUNTIME_EXPORT void* (CL_API_CALL*clGetExtensionFunctionAddress)(const char*);
extern CL_RUNTIME_EXPORT void* (CL_API_CALL*clGetExtensionFunctionAddressForPlatform)(cl_platform_id, const char*);
#endif // __OPENCV_OCL_CL_RUNTIME_OPENCL_HPP__ extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetImageInfo)(cl_mem, cl_image_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetKernelArgInfo)(cl_kernel, cl_uint, cl_kernel_arg_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetKernelInfo)(cl_kernel, cl_kernel_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetKernelWorkGroupInfo)(cl_kernel, cl_device_id, cl_kernel_work_group_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetMemObjectInfo)(cl_mem, cl_mem_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetPlatformIDs)(cl_uint, cl_platform_id*, cl_uint*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetPlatformInfo)(cl_platform_id, cl_platform_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetProgramBuildInfo)(cl_program, cl_device_id, cl_program_build_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetProgramInfo)(cl_program, cl_program_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetSamplerInfo)(cl_sampler, cl_sampler_info, size_t, void*, size_t*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetSupportedImageFormats)(cl_context, cl_mem_flags, cl_mem_object_type, cl_uint, cl_image_format*, cl_uint*);
extern CL_RUNTIME_EXPORT cl_program (CL_API_CALL*clLinkProgram)(cl_context, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, void (CL_CALLBACK*) (cl_program, void*), void*, cl_int*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseCommandQueue)(cl_command_queue);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseContext)(cl_context);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseDevice)(cl_device_id);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseEvent)(cl_event);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseKernel)(cl_kernel);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseMemObject)(cl_mem);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseProgram)(cl_program);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clReleaseSampler)(cl_sampler);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainCommandQueue)(cl_command_queue);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainContext)(cl_context);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainDevice)(cl_device_id);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainEvent)(cl_event);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainKernel)(cl_kernel);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainMemObject)(cl_mem);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainProgram)(cl_program);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clRetainSampler)(cl_sampler);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clSetEventCallback)(cl_event, cl_int, void (CL_CALLBACK*) (cl_event, cl_int, void*), void*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clSetKernelArg)(cl_kernel, cl_uint, size_t, const void*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clSetMemObjectDestructorCallback)(cl_mem, void (CL_CALLBACK*) (cl_mem, void*), void*);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clSetUserEventStatus)(cl_event, cl_int);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clUnloadCompiler)();
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clUnloadPlatformCompiler)(cl_platform_id);
extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clWaitForEvents)(cl_uint, const cl_event*);
// //
// AUTOGENERATED, DO NOT EDIT // AUTOGENERATED, DO NOT EDIT
// //
#ifndef __OPENCV_OCL_CL_RUNTIME_OPENCL_WRAPPERS_HPP__ #ifndef __OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP__
#define __OPENCV_OCL_CL_RUNTIME_OPENCL_WRAPPERS_HPP__ #error "Invalid usage"
#endif
// generated by parser_cl.py // generated by parser_cl.py
#undef clGetPlatformIDs #undef clBuildProgram
#define clGetPlatformIDs clGetPlatformIDs_fn #define clBuildProgram clBuildProgram_fn
inline cl_int clGetPlatformIDs(cl_uint p0, cl_platform_id* p1, cl_uint* p2) { return clGetPlatformIDs_pfn(p0, p1, p2); } inline cl_int clBuildProgram(cl_program p0, cl_uint p1, const cl_device_id* p2, const char* p3, void (CL_CALLBACK*p4) (cl_program, void*), void* p5) { return clBuildProgram_pfn(p0, p1, p2, p3, p4, p5); }
#undef clGetPlatformInfo #undef clCompileProgram
#define clGetPlatformInfo clGetPlatformInfo_fn #define clCompileProgram clCompileProgram_fn
inline cl_int clGetPlatformInfo(cl_platform_id p0, cl_platform_info p1, size_t p2, void* p3, size_t* p4) { return clGetPlatformInfo_pfn(p0, p1, p2, p3, p4); } inline cl_int clCompileProgram(cl_program p0, cl_uint p1, const cl_device_id* p2, const char* p3, cl_uint p4, const cl_program* p5, const char** p6, void (CL_CALLBACK*p7) (cl_program, void*), void* p8) { return clCompileProgram_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clGetDeviceIDs #undef clCreateBuffer
#define clGetDeviceIDs clGetDeviceIDs_fn #define clCreateBuffer clCreateBuffer_fn
inline cl_int clGetDeviceIDs(cl_platform_id p0, cl_device_type p1, cl_uint p2, cl_device_id* p3, cl_uint* p4) { return clGetDeviceIDs_pfn(p0, p1, p2, p3, p4); } inline cl_mem clCreateBuffer(cl_context p0, cl_mem_flags p1, size_t p2, void* p3, cl_int* p4) { return clCreateBuffer_pfn(p0, p1, p2, p3, p4); }
#undef clGetDeviceInfo #undef clCreateCommandQueue
#define clGetDeviceInfo clGetDeviceInfo_fn #define clCreateCommandQueue clCreateCommandQueue_fn
inline cl_int clGetDeviceInfo(cl_device_id p0, cl_device_info p1, size_t p2, void* p3, size_t* p4) { return clGetDeviceInfo_pfn(p0, p1, p2, p3, p4); } inline cl_command_queue clCreateCommandQueue(cl_context p0, cl_device_id p1, cl_command_queue_properties p2, cl_int* p3) { return clCreateCommandQueue_pfn(p0, p1, p2, p3); }
#undef clCreateSubDevices
#define clCreateSubDevices clCreateSubDevices_fn
inline cl_int clCreateSubDevices(cl_device_id p0, const cl_device_partition_property* p1, cl_uint p2, cl_device_id* p3, cl_uint* p4) { return clCreateSubDevices_pfn(p0, p1, p2, p3, p4); }
#undef clRetainDevice
#define clRetainDevice clRetainDevice_fn
inline cl_int clRetainDevice(cl_device_id p0) { return clRetainDevice_pfn(p0); }
#undef clReleaseDevice
#define clReleaseDevice clReleaseDevice_fn
inline cl_int clReleaseDevice(cl_device_id p0) { return clReleaseDevice_pfn(p0); }
#undef clCreateContext #undef clCreateContext
#define clCreateContext clCreateContext_fn #define clCreateContext clCreateContext_fn
inline cl_context clCreateContext(const cl_context_properties* p0, cl_uint p1, const cl_device_id* p2, void (CL_CALLBACK*p3) (const char*, const void*, size_t, void*), void* p4, cl_int* p5) { return clCreateContext_pfn(p0, p1, p2, p3, p4, p5); } inline cl_context clCreateContext(const cl_context_properties* p0, cl_uint p1, const cl_device_id* p2, void (CL_CALLBACK*p3) (const char*, const void*, size_t, void*), void* p4, cl_int* p5) { return clCreateContext_pfn(p0, p1, p2, p3, p4, p5); }
#undef clCreateContextFromType #undef clCreateContextFromType
#define clCreateContextFromType clCreateContextFromType_fn #define clCreateContextFromType clCreateContextFromType_fn
inline cl_context clCreateContextFromType(const cl_context_properties* p0, cl_device_type p1, void (CL_CALLBACK*p2) (const char*, const void*, size_t, void*), void* p3, cl_int* p4) { return clCreateContextFromType_pfn(p0, p1, p2, p3, p4); } inline cl_context clCreateContextFromType(const cl_context_properties* p0, cl_device_type p1, void (CL_CALLBACK*p2) (const char*, const void*, size_t, void*), void* p3, cl_int* p4) { return clCreateContextFromType_pfn(p0, p1, p2, p3, p4); }
#undef clRetainContext
#define clRetainContext clRetainContext_fn
inline cl_int clRetainContext(cl_context p0) { return clRetainContext_pfn(p0); }
#undef clReleaseContext
#define clReleaseContext clReleaseContext_fn
inline cl_int clReleaseContext(cl_context p0) { return clReleaseContext_pfn(p0); }
#undef clGetContextInfo
#define clGetContextInfo clGetContextInfo_fn
inline cl_int clGetContextInfo(cl_context p0, cl_context_info p1, size_t p2, void* p3, size_t* p4) { return clGetContextInfo_pfn(p0, p1, p2, p3, p4); }
#undef clCreateCommandQueue
#define clCreateCommandQueue clCreateCommandQueue_fn
inline cl_command_queue clCreateCommandQueue(cl_context p0, cl_device_id p1, cl_command_queue_properties p2, cl_int* p3) { return clCreateCommandQueue_pfn(p0, p1, p2, p3); }
#undef clRetainCommandQueue
#define clRetainCommandQueue clRetainCommandQueue_fn
inline cl_int clRetainCommandQueue(cl_command_queue p0) { return clRetainCommandQueue_pfn(p0); }
#undef clReleaseCommandQueue
#define clReleaseCommandQueue clReleaseCommandQueue_fn
inline cl_int clReleaseCommandQueue(cl_command_queue p0) { return clReleaseCommandQueue_pfn(p0); }
#undef clGetCommandQueueInfo
#define clGetCommandQueueInfo clGetCommandQueueInfo_fn
inline cl_int clGetCommandQueueInfo(cl_command_queue p0, cl_command_queue_info p1, size_t p2, void* p3, size_t* p4) { return clGetCommandQueueInfo_pfn(p0, p1, p2, p3, p4); }
#undef clCreateBuffer
#define clCreateBuffer clCreateBuffer_fn
inline cl_mem clCreateBuffer(cl_context p0, cl_mem_flags p1, size_t p2, void* p3, cl_int* p4) { return clCreateBuffer_pfn(p0, p1, p2, p3, p4); }
#undef clCreateSubBuffer
#define clCreateSubBuffer clCreateSubBuffer_fn
inline cl_mem clCreateSubBuffer(cl_mem p0, cl_mem_flags p1, cl_buffer_create_type p2, const void* p3, cl_int* p4) { return clCreateSubBuffer_pfn(p0, p1, p2, p3, p4); }
#undef clCreateImage #undef clCreateImage
#define clCreateImage clCreateImage_fn #define clCreateImage clCreateImage_fn
inline cl_mem clCreateImage(cl_context p0, cl_mem_flags p1, const cl_image_format* p2, const cl_image_desc* p3, void* p4, cl_int* p5) { return clCreateImage_pfn(p0, p1, p2, p3, p4, p5); } inline cl_mem clCreateImage(cl_context p0, cl_mem_flags p1, const cl_image_format* p2, const cl_image_desc* p3, void* p4, cl_int* p5) { return clCreateImage_pfn(p0, p1, p2, p3, p4, p5); }
#undef clRetainMemObject #undef clCreateImage2D
#define clRetainMemObject clRetainMemObject_fn #define clCreateImage2D clCreateImage2D_fn
inline cl_int clRetainMemObject(cl_mem p0) { return clRetainMemObject_pfn(p0); } inline cl_mem clCreateImage2D(cl_context p0, cl_mem_flags p1, const cl_image_format* p2, size_t p3, size_t p4, size_t p5, void* p6, cl_int* p7) { return clCreateImage2D_pfn(p0, p1, p2, p3, p4, p5, p6, p7); }
#undef clReleaseMemObject #undef clCreateImage3D
#define clReleaseMemObject clReleaseMemObject_fn #define clCreateImage3D clCreateImage3D_fn
inline cl_int clReleaseMemObject(cl_mem p0) { return clReleaseMemObject_pfn(p0); } inline cl_mem clCreateImage3D(cl_context p0, cl_mem_flags p1, const cl_image_format* p2, size_t p3, size_t p4, size_t p5, size_t p6, size_t p7, void* p8, cl_int* p9) { return clCreateImage3D_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); }
#undef clGetSupportedImageFormats
#define clGetSupportedImageFormats clGetSupportedImageFormats_fn
inline cl_int clGetSupportedImageFormats(cl_context p0, cl_mem_flags p1, cl_mem_object_type p2, cl_uint p3, cl_image_format* p4, cl_uint* p5) { return clGetSupportedImageFormats_pfn(p0, p1, p2, p3, p4, p5); }
#undef clGetMemObjectInfo
#define clGetMemObjectInfo clGetMemObjectInfo_fn
inline cl_int clGetMemObjectInfo(cl_mem p0, cl_mem_info p1, size_t p2, void* p3, size_t* p4) { return clGetMemObjectInfo_pfn(p0, p1, p2, p3, p4); }
#undef clGetImageInfo
#define clGetImageInfo clGetImageInfo_fn
inline cl_int clGetImageInfo(cl_mem p0, cl_image_info p1, size_t p2, void* p3, size_t* p4) { return clGetImageInfo_pfn(p0, p1, p2, p3, p4); }
#undef clSetMemObjectDestructorCallback
#define clSetMemObjectDestructorCallback clSetMemObjectDestructorCallback_fn
inline cl_int clSetMemObjectDestructorCallback(cl_mem p0, void (CL_CALLBACK*p1) (cl_mem, void*), void* p2) { return clSetMemObjectDestructorCallback_pfn(p0, p1, p2); }
#undef clCreateSampler
#define clCreateSampler clCreateSampler_fn
inline cl_sampler clCreateSampler(cl_context p0, cl_bool p1, cl_addressing_mode p2, cl_filter_mode p3, cl_int* p4) { return clCreateSampler_pfn(p0, p1, p2, p3, p4); }
#undef clRetainSampler
#define clRetainSampler clRetainSampler_fn
inline cl_int clRetainSampler(cl_sampler p0) { return clRetainSampler_pfn(p0); }
#undef clReleaseSampler
#define clReleaseSampler clReleaseSampler_fn
inline cl_int clReleaseSampler(cl_sampler p0) { return clReleaseSampler_pfn(p0); }
#undef clGetSamplerInfo
#define clGetSamplerInfo clGetSamplerInfo_fn
inline cl_int clGetSamplerInfo(cl_sampler p0, cl_sampler_info p1, size_t p2, void* p3, size_t* p4) { return clGetSamplerInfo_pfn(p0, p1, p2, p3, p4); }
#undef clCreateProgramWithSource
#define clCreateProgramWithSource clCreateProgramWithSource_fn
inline cl_program clCreateProgramWithSource(cl_context p0, cl_uint p1, const char** p2, const size_t* p3, cl_int* p4) { return clCreateProgramWithSource_pfn(p0, p1, p2, p3, p4); }
#undef clCreateProgramWithBinary
#define clCreateProgramWithBinary clCreateProgramWithBinary_fn
inline cl_program clCreateProgramWithBinary(cl_context p0, cl_uint p1, const cl_device_id* p2, const size_t* p3, const unsigned char** p4, cl_int* p5, cl_int* p6) { return clCreateProgramWithBinary_pfn(p0, p1, p2, p3, p4, p5, p6); }
#undef clCreateProgramWithBuiltInKernels
#define clCreateProgramWithBuiltInKernels clCreateProgramWithBuiltInKernels_fn
inline cl_program clCreateProgramWithBuiltInKernels(cl_context p0, cl_uint p1, const cl_device_id* p2, const char* p3, cl_int* p4) { return clCreateProgramWithBuiltInKernels_pfn(p0, p1, p2, p3, p4); }
#undef clRetainProgram
#define clRetainProgram clRetainProgram_fn
inline cl_int clRetainProgram(cl_program p0) { return clRetainProgram_pfn(p0); }
#undef clReleaseProgram
#define clReleaseProgram clReleaseProgram_fn
inline cl_int clReleaseProgram(cl_program p0) { return clReleaseProgram_pfn(p0); }
#undef clBuildProgram
#define clBuildProgram clBuildProgram_fn
inline cl_int clBuildProgram(cl_program p0, cl_uint p1, const cl_device_id* p2, const char* p3, void (CL_CALLBACK*p4) (cl_program, void*), void* p5) { return clBuildProgram_pfn(p0, p1, p2, p3, p4, p5); }
#undef clCompileProgram
#define clCompileProgram clCompileProgram_fn
inline cl_int clCompileProgram(cl_program p0, cl_uint p1, const cl_device_id* p2, const char* p3, cl_uint p4, const cl_program* p5, const char** p6, void (CL_CALLBACK*p7) (cl_program, void*), void* p8) { return clCompileProgram_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clLinkProgram
#define clLinkProgram clLinkProgram_fn
inline cl_program clLinkProgram(cl_context p0, cl_uint p1, const cl_device_id* p2, const char* p3, cl_uint p4, const cl_program* p5, void (CL_CALLBACK*p6) (cl_program, void*), void* p7, cl_int* p8) { return clLinkProgram_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clUnloadPlatformCompiler
#define clUnloadPlatformCompiler clUnloadPlatformCompiler_fn
inline cl_int clUnloadPlatformCompiler(cl_platform_id p0) { return clUnloadPlatformCompiler_pfn(p0); }
#undef clGetProgramInfo
#define clGetProgramInfo clGetProgramInfo_fn
inline cl_int clGetProgramInfo(cl_program p0, cl_program_info p1, size_t p2, void* p3, size_t* p4) { return clGetProgramInfo_pfn(p0, p1, p2, p3, p4); }
#undef clGetProgramBuildInfo
#define clGetProgramBuildInfo clGetProgramBuildInfo_fn
inline cl_int clGetProgramBuildInfo(cl_program p0, cl_device_id p1, cl_program_build_info p2, size_t p3, void* p4, size_t* p5) { return clGetProgramBuildInfo_pfn(p0, p1, p2, p3, p4, p5); }
#undef clCreateKernel #undef clCreateKernel
#define clCreateKernel clCreateKernel_fn #define clCreateKernel clCreateKernel_fn
inline cl_kernel clCreateKernel(cl_program p0, const char* p1, cl_int* p2) { return clCreateKernel_pfn(p0, p1, p2); } inline cl_kernel clCreateKernel(cl_program p0, const char* p1, cl_int* p2) { return clCreateKernel_pfn(p0, p1, p2); }
#undef clCreateKernelsInProgram #undef clCreateKernelsInProgram
#define clCreateKernelsInProgram clCreateKernelsInProgram_fn #define clCreateKernelsInProgram clCreateKernelsInProgram_fn
inline cl_int clCreateKernelsInProgram(cl_program p0, cl_uint p1, cl_kernel* p2, cl_uint* p3) { return clCreateKernelsInProgram_pfn(p0, p1, p2, p3); } inline cl_int clCreateKernelsInProgram(cl_program p0, cl_uint p1, cl_kernel* p2, cl_uint* p3) { return clCreateKernelsInProgram_pfn(p0, p1, p2, p3); }
#undef clRetainKernel #undef clCreateProgramWithBinary
#define clRetainKernel clRetainKernel_fn #define clCreateProgramWithBinary clCreateProgramWithBinary_fn
inline cl_int clRetainKernel(cl_kernel p0) { return clRetainKernel_pfn(p0); } inline cl_program clCreateProgramWithBinary(cl_context p0, cl_uint p1, const cl_device_id* p2, const size_t* p3, const unsigned char** p4, cl_int* p5, cl_int* p6) { return clCreateProgramWithBinary_pfn(p0, p1, p2, p3, p4, p5, p6); }
#undef clReleaseKernel #undef clCreateProgramWithBuiltInKernels
#define clReleaseKernel clReleaseKernel_fn #define clCreateProgramWithBuiltInKernels clCreateProgramWithBuiltInKernels_fn
inline cl_int clReleaseKernel(cl_kernel p0) { return clReleaseKernel_pfn(p0); } inline cl_program clCreateProgramWithBuiltInKernels(cl_context p0, cl_uint p1, const cl_device_id* p2, const char* p3, cl_int* p4) { return clCreateProgramWithBuiltInKernels_pfn(p0, p1, p2, p3, p4); }
#undef clSetKernelArg #undef clCreateProgramWithSource
#define clSetKernelArg clSetKernelArg_fn #define clCreateProgramWithSource clCreateProgramWithSource_fn
inline cl_int clSetKernelArg(cl_kernel p0, cl_uint p1, size_t p2, const void* p3) { return clSetKernelArg_pfn(p0, p1, p2, p3); } inline cl_program clCreateProgramWithSource(cl_context p0, cl_uint p1, const char** p2, const size_t* p3, cl_int* p4) { return clCreateProgramWithSource_pfn(p0, p1, p2, p3, p4); }
#undef clGetKernelInfo #undef clCreateSampler
#define clGetKernelInfo clGetKernelInfo_fn #define clCreateSampler clCreateSampler_fn
inline cl_int clGetKernelInfo(cl_kernel p0, cl_kernel_info p1, size_t p2, void* p3, size_t* p4) { return clGetKernelInfo_pfn(p0, p1, p2, p3, p4); } inline cl_sampler clCreateSampler(cl_context p0, cl_bool p1, cl_addressing_mode p2, cl_filter_mode p3, cl_int* p4) { return clCreateSampler_pfn(p0, p1, p2, p3, p4); }
#undef clGetKernelArgInfo #undef clCreateSubBuffer
#define clGetKernelArgInfo clGetKernelArgInfo_fn #define clCreateSubBuffer clCreateSubBuffer_fn
inline cl_int clGetKernelArgInfo(cl_kernel p0, cl_uint p1, cl_kernel_arg_info p2, size_t p3, void* p4, size_t* p5) { return clGetKernelArgInfo_pfn(p0, p1, p2, p3, p4, p5); } inline cl_mem clCreateSubBuffer(cl_mem p0, cl_mem_flags p1, cl_buffer_create_type p2, const void* p3, cl_int* p4) { return clCreateSubBuffer_pfn(p0, p1, p2, p3, p4); }
#undef clGetKernelWorkGroupInfo #undef clCreateSubDevices
#define clGetKernelWorkGroupInfo clGetKernelWorkGroupInfo_fn #define clCreateSubDevices clCreateSubDevices_fn
inline cl_int clGetKernelWorkGroupInfo(cl_kernel p0, cl_device_id p1, cl_kernel_work_group_info p2, size_t p3, void* p4, size_t* p5) { return clGetKernelWorkGroupInfo_pfn(p0, p1, p2, p3, p4, p5); } inline cl_int clCreateSubDevices(cl_device_id p0, const cl_device_partition_property* p1, cl_uint p2, cl_device_id* p3, cl_uint* p4) { return clCreateSubDevices_pfn(p0, p1, p2, p3, p4); }
#undef clWaitForEvents
#define clWaitForEvents clWaitForEvents_fn
inline cl_int clWaitForEvents(cl_uint p0, const cl_event* p1) { return clWaitForEvents_pfn(p0, p1); }
#undef clGetEventInfo
#define clGetEventInfo clGetEventInfo_fn
inline cl_int clGetEventInfo(cl_event p0, cl_event_info p1, size_t p2, void* p3, size_t* p4) { return clGetEventInfo_pfn(p0, p1, p2, p3, p4); }
#undef clCreateUserEvent #undef clCreateUserEvent
#define clCreateUserEvent clCreateUserEvent_fn #define clCreateUserEvent clCreateUserEvent_fn
inline cl_event clCreateUserEvent(cl_context p0, cl_int* p1) { return clCreateUserEvent_pfn(p0, p1); } inline cl_event clCreateUserEvent(cl_context p0, cl_int* p1) { return clCreateUserEvent_pfn(p0, p1); }
#undef clRetainEvent #undef clEnqueueBarrier
#define clRetainEvent clRetainEvent_fn #define clEnqueueBarrier clEnqueueBarrier_fn
inline cl_int clRetainEvent(cl_event p0) { return clRetainEvent_pfn(p0); } inline cl_int clEnqueueBarrier(cl_command_queue p0) { return clEnqueueBarrier_pfn(p0); }
#undef clReleaseEvent #undef clEnqueueBarrierWithWaitList
#define clReleaseEvent clReleaseEvent_fn #define clEnqueueBarrierWithWaitList clEnqueueBarrierWithWaitList_fn
inline cl_int clReleaseEvent(cl_event p0) { return clReleaseEvent_pfn(p0); } inline cl_int clEnqueueBarrierWithWaitList(cl_command_queue p0, cl_uint p1, const cl_event* p2, cl_event* p3) { return clEnqueueBarrierWithWaitList_pfn(p0, p1, p2, p3); }
#undef clSetUserEventStatus
#define clSetUserEventStatus clSetUserEventStatus_fn
inline cl_int clSetUserEventStatus(cl_event p0, cl_int p1) { return clSetUserEventStatus_pfn(p0, p1); }
#undef clSetEventCallback
#define clSetEventCallback clSetEventCallback_fn
inline cl_int clSetEventCallback(cl_event p0, cl_int p1, void (CL_CALLBACK*p2) (cl_event, cl_int, void*), void* p3) { return clSetEventCallback_pfn(p0, p1, p2, p3); }
#undef clGetEventProfilingInfo
#define clGetEventProfilingInfo clGetEventProfilingInfo_fn
inline cl_int clGetEventProfilingInfo(cl_event p0, cl_profiling_info p1, size_t p2, void* p3, size_t* p4) { return clGetEventProfilingInfo_pfn(p0, p1, p2, p3, p4); }
#undef clFlush
#define clFlush clFlush_fn
inline cl_int clFlush(cl_command_queue p0) { return clFlush_pfn(p0); }
#undef clFinish
#define clFinish clFinish_fn
inline cl_int clFinish(cl_command_queue p0) { return clFinish_pfn(p0); }
#undef clEnqueueReadBuffer
#define clEnqueueReadBuffer clEnqueueReadBuffer_fn
inline cl_int clEnqueueReadBuffer(cl_command_queue p0, cl_mem p1, cl_bool p2, size_t p3, size_t p4, void* p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueReadBuffer_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clEnqueueReadBufferRect
#define clEnqueueReadBufferRect clEnqueueReadBufferRect_fn
inline cl_int clEnqueueReadBufferRect(cl_command_queue p0, cl_mem p1, cl_bool p2, const size_t* p3, const size_t* p4, const size_t* p5, size_t p6, size_t p7, size_t p8, size_t p9, void* p10, cl_uint p11, const cl_event* p12, cl_event* p13) { return clEnqueueReadBufferRect_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); }
#undef clEnqueueWriteBuffer
#define clEnqueueWriteBuffer clEnqueueWriteBuffer_fn
inline cl_int clEnqueueWriteBuffer(cl_command_queue p0, cl_mem p1, cl_bool p2, size_t p3, size_t p4, const void* p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueWriteBuffer_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clEnqueueWriteBufferRect
#define clEnqueueWriteBufferRect clEnqueueWriteBufferRect_fn
inline cl_int clEnqueueWriteBufferRect(cl_command_queue p0, cl_mem p1, cl_bool p2, const size_t* p3, const size_t* p4, const size_t* p5, size_t p6, size_t p7, size_t p8, size_t p9, const void* p10, cl_uint p11, const cl_event* p12, cl_event* p13) { return clEnqueueWriteBufferRect_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); }
#undef clEnqueueFillBuffer
#define clEnqueueFillBuffer clEnqueueFillBuffer_fn
inline cl_int clEnqueueFillBuffer(cl_command_queue p0, cl_mem p1, const void* p2, size_t p3, size_t p4, size_t p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueFillBuffer_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clEnqueueCopyBuffer #undef clEnqueueCopyBuffer
#define clEnqueueCopyBuffer clEnqueueCopyBuffer_fn #define clEnqueueCopyBuffer clEnqueueCopyBuffer_fn
inline cl_int clEnqueueCopyBuffer(cl_command_queue p0, cl_mem p1, cl_mem p2, size_t p3, size_t p4, size_t p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueCopyBuffer_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); } inline cl_int clEnqueueCopyBuffer(cl_command_queue p0, cl_mem p1, cl_mem p2, size_t p3, size_t p4, size_t p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueCopyBuffer_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clEnqueueCopyBufferRect #undef clEnqueueCopyBufferRect
#define clEnqueueCopyBufferRect clEnqueueCopyBufferRect_fn #define clEnqueueCopyBufferRect clEnqueueCopyBufferRect_fn
inline cl_int clEnqueueCopyBufferRect(cl_command_queue p0, cl_mem p1, cl_mem p2, const size_t* p3, const size_t* p4, const size_t* p5, size_t p6, size_t p7, size_t p8, size_t p9, cl_uint p10, const cl_event* p11, cl_event* p12) { return clEnqueueCopyBufferRect_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } inline cl_int clEnqueueCopyBufferRect(cl_command_queue p0, cl_mem p1, cl_mem p2, const size_t* p3, const size_t* p4, const size_t* p5, size_t p6, size_t p7, size_t p8, size_t p9, cl_uint p10, const cl_event* p11, cl_event* p12) { return clEnqueueCopyBufferRect_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); }
#undef clEnqueueReadImage #undef clEnqueueCopyBufferToImage
#define clEnqueueReadImage clEnqueueReadImage_fn #define clEnqueueCopyBufferToImage clEnqueueCopyBufferToImage_fn
inline cl_int clEnqueueReadImage(cl_command_queue p0, cl_mem p1, cl_bool p2, const size_t* p3, const size_t* p4, size_t p5, size_t p6, void* p7, cl_uint p8, const cl_event* p9, cl_event* p10) { return clEnqueueReadImage_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } inline cl_int clEnqueueCopyBufferToImage(cl_command_queue p0, cl_mem p1, cl_mem p2, size_t p3, const size_t* p4, const size_t* p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueCopyBufferToImage_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clEnqueueWriteImage
#define clEnqueueWriteImage clEnqueueWriteImage_fn
inline cl_int clEnqueueWriteImage(cl_command_queue p0, cl_mem p1, cl_bool p2, const size_t* p3, const size_t* p4, size_t p5, size_t p6, const void* p7, cl_uint p8, const cl_event* p9, cl_event* p10) { return clEnqueueWriteImage_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
#undef clEnqueueFillImage
#define clEnqueueFillImage clEnqueueFillImage_fn
inline cl_int clEnqueueFillImage(cl_command_queue p0, cl_mem p1, const void* p2, const size_t* p3, const size_t* p4, cl_uint p5, const cl_event* p6, cl_event* p7) { return clEnqueueFillImage_pfn(p0, p1, p2, p3, p4, p5, p6, p7); }
#undef clEnqueueCopyImage #undef clEnqueueCopyImage
#define clEnqueueCopyImage clEnqueueCopyImage_fn #define clEnqueueCopyImage clEnqueueCopyImage_fn
inline cl_int clEnqueueCopyImage(cl_command_queue p0, cl_mem p1, cl_mem p2, const size_t* p3, const size_t* p4, const size_t* p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueCopyImage_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); } inline cl_int clEnqueueCopyImage(cl_command_queue p0, cl_mem p1, cl_mem p2, const size_t* p3, const size_t* p4, const size_t* p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueCopyImage_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clEnqueueCopyImageToBuffer #undef clEnqueueCopyImageToBuffer
#define clEnqueueCopyImageToBuffer clEnqueueCopyImageToBuffer_fn #define clEnqueueCopyImageToBuffer clEnqueueCopyImageToBuffer_fn
inline cl_int clEnqueueCopyImageToBuffer(cl_command_queue p0, cl_mem p1, cl_mem p2, const size_t* p3, const size_t* p4, size_t p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueCopyImageToBuffer_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); } inline cl_int clEnqueueCopyImageToBuffer(cl_command_queue p0, cl_mem p1, cl_mem p2, const size_t* p3, const size_t* p4, size_t p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueCopyImageToBuffer_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clEnqueueCopyBufferToImage #undef clEnqueueFillBuffer
#define clEnqueueCopyBufferToImage clEnqueueCopyBufferToImage_fn #define clEnqueueFillBuffer clEnqueueFillBuffer_fn
inline cl_int clEnqueueCopyBufferToImage(cl_command_queue p0, cl_mem p1, cl_mem p2, size_t p3, const size_t* p4, const size_t* p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueCopyBufferToImage_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); } inline cl_int clEnqueueFillBuffer(cl_command_queue p0, cl_mem p1, const void* p2, size_t p3, size_t p4, size_t p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueFillBuffer_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clEnqueueFillImage
#define clEnqueueFillImage clEnqueueFillImage_fn
inline cl_int clEnqueueFillImage(cl_command_queue p0, cl_mem p1, const void* p2, const size_t* p3, const size_t* p4, cl_uint p5, const cl_event* p6, cl_event* p7) { return clEnqueueFillImage_pfn(p0, p1, p2, p3, p4, p5, p6, p7); }
#undef clEnqueueMapBuffer #undef clEnqueueMapBuffer
#define clEnqueueMapBuffer clEnqueueMapBuffer_fn #define clEnqueueMapBuffer clEnqueueMapBuffer_fn
inline void* clEnqueueMapBuffer(cl_command_queue p0, cl_mem p1, cl_bool p2, cl_map_flags p3, size_t p4, size_t p5, cl_uint p6, const cl_event* p7, cl_event* p8, cl_int* p9) { return clEnqueueMapBuffer_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } inline void* clEnqueueMapBuffer(cl_command_queue p0, cl_mem p1, cl_bool p2, cl_map_flags p3, size_t p4, size_t p5, cl_uint p6, const cl_event* p7, cl_event* p8, cl_int* p9) { return clEnqueueMapBuffer_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); }
#undef clEnqueueMapImage #undef clEnqueueMapImage
#define clEnqueueMapImage clEnqueueMapImage_fn #define clEnqueueMapImage clEnqueueMapImage_fn
inline void* clEnqueueMapImage(cl_command_queue p0, cl_mem p1, cl_bool p2, cl_map_flags p3, const size_t* p4, const size_t* p5, size_t* p6, size_t* p7, cl_uint p8, const cl_event* p9, cl_event* p10, cl_int* p11) { return clEnqueueMapImage_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } inline void* clEnqueueMapImage(cl_command_queue p0, cl_mem p1, cl_bool p2, cl_map_flags p3, const size_t* p4, const size_t* p5, size_t* p6, size_t* p7, cl_uint p8, const cl_event* p9, cl_event* p10, cl_int* p11) { return clEnqueueMapImage_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
#undef clEnqueueUnmapMemObject #undef clEnqueueMarker
#define clEnqueueUnmapMemObject clEnqueueUnmapMemObject_fn #define clEnqueueMarker clEnqueueMarker_fn
inline cl_int clEnqueueUnmapMemObject(cl_command_queue p0, cl_mem p1, void* p2, cl_uint p3, const cl_event* p4, cl_event* p5) { return clEnqueueUnmapMemObject_pfn(p0, p1, p2, p3, p4, p5); } inline cl_int clEnqueueMarker(cl_command_queue p0, cl_event* p1) { return clEnqueueMarker_pfn(p0, p1); }
#undef clEnqueueMarkerWithWaitList
#define clEnqueueMarkerWithWaitList clEnqueueMarkerWithWaitList_fn
inline cl_int clEnqueueMarkerWithWaitList(cl_command_queue p0, cl_uint p1, const cl_event* p2, cl_event* p3) { return clEnqueueMarkerWithWaitList_pfn(p0, p1, p2, p3); }
#undef clEnqueueMigrateMemObjects #undef clEnqueueMigrateMemObjects
#define clEnqueueMigrateMemObjects clEnqueueMigrateMemObjects_fn #define clEnqueueMigrateMemObjects clEnqueueMigrateMemObjects_fn
inline cl_int clEnqueueMigrateMemObjects(cl_command_queue p0, cl_uint p1, const cl_mem* p2, cl_mem_migration_flags p3, cl_uint p4, const cl_event* p5, cl_event* p6) { return clEnqueueMigrateMemObjects_pfn(p0, p1, p2, p3, p4, p5, p6); } inline cl_int clEnqueueMigrateMemObjects(cl_command_queue p0, cl_uint p1, const cl_mem* p2, cl_mem_migration_flags p3, cl_uint p4, const cl_event* p5, cl_event* p6) { return clEnqueueMigrateMemObjects_pfn(p0, p1, p2, p3, p4, p5, p6); }
#undef clEnqueueNDRangeKernel #undef clEnqueueNDRangeKernel
#define clEnqueueNDRangeKernel clEnqueueNDRangeKernel_fn #define clEnqueueNDRangeKernel clEnqueueNDRangeKernel_fn
inline cl_int clEnqueueNDRangeKernel(cl_command_queue p0, cl_kernel p1, cl_uint p2, const size_t* p3, const size_t* p4, const size_t* p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueNDRangeKernel_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); } inline cl_int clEnqueueNDRangeKernel(cl_command_queue p0, cl_kernel p1, cl_uint p2, const size_t* p3, const size_t* p4, const size_t* p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueNDRangeKernel_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clEnqueueTask
#define clEnqueueTask clEnqueueTask_fn
inline cl_int clEnqueueTask(cl_command_queue p0, cl_kernel p1, cl_uint p2, const cl_event* p3, cl_event* p4) { return clEnqueueTask_pfn(p0, p1, p2, p3, p4); }
#undef clEnqueueNativeKernel #undef clEnqueueNativeKernel
#define clEnqueueNativeKernel clEnqueueNativeKernel_fn #define clEnqueueNativeKernel clEnqueueNativeKernel_fn
inline cl_int clEnqueueNativeKernel(cl_command_queue p0, void (CL_CALLBACK*p1) (void*), void* p2, size_t p3, cl_uint p4, const cl_mem* p5, const void** p6, cl_uint p7, const cl_event* p8, cl_event* p9) { return clEnqueueNativeKernel_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } inline cl_int clEnqueueNativeKernel(cl_command_queue p0, void (CL_CALLBACK*p1) (void*), void* p2, size_t p3, cl_uint p4, const cl_mem* p5, const void** p6, cl_uint p7, const cl_event* p8, cl_event* p9) { return clEnqueueNativeKernel_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); }
#undef clEnqueueMarkerWithWaitList #undef clEnqueueReadBuffer
#define clEnqueueMarkerWithWaitList clEnqueueMarkerWithWaitList_fn #define clEnqueueReadBuffer clEnqueueReadBuffer_fn
inline cl_int clEnqueueMarkerWithWaitList(cl_command_queue p0, cl_uint p1, const cl_event* p2, cl_event* p3) { return clEnqueueMarkerWithWaitList_pfn(p0, p1, p2, p3); } inline cl_int clEnqueueReadBuffer(cl_command_queue p0, cl_mem p1, cl_bool p2, size_t p3, size_t p4, void* p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueReadBuffer_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clEnqueueBarrierWithWaitList #undef clEnqueueReadBufferRect
#define clEnqueueBarrierWithWaitList clEnqueueBarrierWithWaitList_fn #define clEnqueueReadBufferRect clEnqueueReadBufferRect_fn
inline cl_int clEnqueueBarrierWithWaitList(cl_command_queue p0, cl_uint p1, const cl_event* p2, cl_event* p3) { return clEnqueueBarrierWithWaitList_pfn(p0, p1, p2, p3); } inline cl_int clEnqueueReadBufferRect(cl_command_queue p0, cl_mem p1, cl_bool p2, const size_t* p3, const size_t* p4, const size_t* p5, size_t p6, size_t p7, size_t p8, size_t p9, void* p10, cl_uint p11, const cl_event* p12, cl_event* p13) { return clEnqueueReadBufferRect_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); }
#undef clGetExtensionFunctionAddressForPlatform #undef clEnqueueReadImage
#define clGetExtensionFunctionAddressForPlatform clGetExtensionFunctionAddressForPlatform_fn #define clEnqueueReadImage clEnqueueReadImage_fn
inline void* clGetExtensionFunctionAddressForPlatform(cl_platform_id p0, const char* p1) { return clGetExtensionFunctionAddressForPlatform_pfn(p0, p1); } inline cl_int clEnqueueReadImage(cl_command_queue p0, cl_mem p1, cl_bool p2, const size_t* p3, const size_t* p4, size_t p5, size_t p6, void* p7, cl_uint p8, const cl_event* p9, cl_event* p10) { return clEnqueueReadImage_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
#undef clCreateImage2D #undef clEnqueueTask
#define clCreateImage2D clCreateImage2D_fn #define clEnqueueTask clEnqueueTask_fn
inline cl_mem clCreateImage2D(cl_context p0, cl_mem_flags p1, const cl_image_format* p2, size_t p3, size_t p4, size_t p5, void* p6, cl_int* p7) { return clCreateImage2D_pfn(p0, p1, p2, p3, p4, p5, p6, p7); } inline cl_int clEnqueueTask(cl_command_queue p0, cl_kernel p1, cl_uint p2, const cl_event* p3, cl_event* p4) { return clEnqueueTask_pfn(p0, p1, p2, p3, p4); }
#undef clCreateImage3D #undef clEnqueueUnmapMemObject
#define clCreateImage3D clCreateImage3D_fn #define clEnqueueUnmapMemObject clEnqueueUnmapMemObject_fn
inline cl_mem clCreateImage3D(cl_context p0, cl_mem_flags p1, const cl_image_format* p2, size_t p3, size_t p4, size_t p5, size_t p6, size_t p7, void* p8, cl_int* p9) { return clCreateImage3D_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9); } inline cl_int clEnqueueUnmapMemObject(cl_command_queue p0, cl_mem p1, void* p2, cl_uint p3, const cl_event* p4, cl_event* p5) { return clEnqueueUnmapMemObject_pfn(p0, p1, p2, p3, p4, p5); }
#undef clEnqueueMarker
#define clEnqueueMarker clEnqueueMarker_fn
inline cl_int clEnqueueMarker(cl_command_queue p0, cl_event* p1) { return clEnqueueMarker_pfn(p0, p1); }
#undef clEnqueueWaitForEvents #undef clEnqueueWaitForEvents
#define clEnqueueWaitForEvents clEnqueueWaitForEvents_fn #define clEnqueueWaitForEvents clEnqueueWaitForEvents_fn
inline cl_int clEnqueueWaitForEvents(cl_command_queue p0, cl_uint p1, const cl_event* p2) { return clEnqueueWaitForEvents_pfn(p0, p1, p2); } inline cl_int clEnqueueWaitForEvents(cl_command_queue p0, cl_uint p1, const cl_event* p2) { return clEnqueueWaitForEvents_pfn(p0, p1, p2); }
#undef clEnqueueBarrier #undef clEnqueueWriteBuffer
#define clEnqueueBarrier clEnqueueBarrier_fn #define clEnqueueWriteBuffer clEnqueueWriteBuffer_fn
inline cl_int clEnqueueBarrier(cl_command_queue p0) { return clEnqueueBarrier_pfn(p0); } inline cl_int clEnqueueWriteBuffer(cl_command_queue p0, cl_mem p1, cl_bool p2, size_t p3, size_t p4, const void* p5, cl_uint p6, const cl_event* p7, cl_event* p8) { return clEnqueueWriteBuffer_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clUnloadCompiler #undef clEnqueueWriteBufferRect
#define clUnloadCompiler clUnloadCompiler_fn #define clEnqueueWriteBufferRect clEnqueueWriteBufferRect_fn
inline cl_int clUnloadCompiler() { return clUnloadCompiler_pfn(); } inline cl_int clEnqueueWriteBufferRect(cl_command_queue p0, cl_mem p1, cl_bool p2, const size_t* p3, const size_t* p4, const size_t* p5, size_t p6, size_t p7, size_t p8, size_t p9, const void* p10, cl_uint p11, const cl_event* p12, cl_event* p13) { return clEnqueueWriteBufferRect_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); }
#undef clEnqueueWriteImage
#define clEnqueueWriteImage clEnqueueWriteImage_fn
inline cl_int clEnqueueWriteImage(cl_command_queue p0, cl_mem p1, cl_bool p2, const size_t* p3, const size_t* p4, size_t p5, size_t p6, const void* p7, cl_uint p8, const cl_event* p9, cl_event* p10) { return clEnqueueWriteImage_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
#undef clFinish
#define clFinish clFinish_fn
inline cl_int clFinish(cl_command_queue p0) { return clFinish_pfn(p0); }
#undef clFlush
#define clFlush clFlush_fn
inline cl_int clFlush(cl_command_queue p0) { return clFlush_pfn(p0); }
#undef clGetCommandQueueInfo
#define clGetCommandQueueInfo clGetCommandQueueInfo_fn
inline cl_int clGetCommandQueueInfo(cl_command_queue p0, cl_command_queue_info p1, size_t p2, void* p3, size_t* p4) { return clGetCommandQueueInfo_pfn(p0, p1, p2, p3, p4); }
#undef clGetContextInfo
#define clGetContextInfo clGetContextInfo_fn
inline cl_int clGetContextInfo(cl_context p0, cl_context_info p1, size_t p2, void* p3, size_t* p4) { return clGetContextInfo_pfn(p0, p1, p2, p3, p4); }
#undef clGetDeviceIDs
#define clGetDeviceIDs clGetDeviceIDs_fn
inline cl_int clGetDeviceIDs(cl_platform_id p0, cl_device_type p1, cl_uint p2, cl_device_id* p3, cl_uint* p4) { return clGetDeviceIDs_pfn(p0, p1, p2, p3, p4); }
#undef clGetDeviceInfo
#define clGetDeviceInfo clGetDeviceInfo_fn
inline cl_int clGetDeviceInfo(cl_device_id p0, cl_device_info p1, size_t p2, void* p3, size_t* p4) { return clGetDeviceInfo_pfn(p0, p1, p2, p3, p4); }
#undef clGetEventInfo
#define clGetEventInfo clGetEventInfo_fn
inline cl_int clGetEventInfo(cl_event p0, cl_event_info p1, size_t p2, void* p3, size_t* p4) { return clGetEventInfo_pfn(p0, p1, p2, p3, p4); }
#undef clGetEventProfilingInfo
#define clGetEventProfilingInfo clGetEventProfilingInfo_fn
inline cl_int clGetEventProfilingInfo(cl_event p0, cl_profiling_info p1, size_t p2, void* p3, size_t* p4) { return clGetEventProfilingInfo_pfn(p0, p1, p2, p3, p4); }
#undef clGetExtensionFunctionAddress #undef clGetExtensionFunctionAddress
#define clGetExtensionFunctionAddress clGetExtensionFunctionAddress_fn #define clGetExtensionFunctionAddress clGetExtensionFunctionAddress_fn
inline void* clGetExtensionFunctionAddress(const char* p0) { return clGetExtensionFunctionAddress_pfn(p0); } inline void* clGetExtensionFunctionAddress(const char* p0) { return clGetExtensionFunctionAddress_pfn(p0); }
#undef clGetExtensionFunctionAddressForPlatform
#endif // __OPENCV_OCL_CL_RUNTIME_OPENCL_WRAPPERS_HPP__ #define clGetExtensionFunctionAddressForPlatform clGetExtensionFunctionAddressForPlatform_fn
\ No newline at end of file inline void* clGetExtensionFunctionAddressForPlatform(cl_platform_id p0, const char* p1) { return clGetExtensionFunctionAddressForPlatform_pfn(p0, p1); }
#undef clGetImageInfo
#define clGetImageInfo clGetImageInfo_fn
inline cl_int clGetImageInfo(cl_mem p0, cl_image_info p1, size_t p2, void* p3, size_t* p4) { return clGetImageInfo_pfn(p0, p1, p2, p3, p4); }
#undef clGetKernelArgInfo
#define clGetKernelArgInfo clGetKernelArgInfo_fn
inline cl_int clGetKernelArgInfo(cl_kernel p0, cl_uint p1, cl_kernel_arg_info p2, size_t p3, void* p4, size_t* p5) { return clGetKernelArgInfo_pfn(p0, p1, p2, p3, p4, p5); }
#undef clGetKernelInfo
#define clGetKernelInfo clGetKernelInfo_fn
inline cl_int clGetKernelInfo(cl_kernel p0, cl_kernel_info p1, size_t p2, void* p3, size_t* p4) { return clGetKernelInfo_pfn(p0, p1, p2, p3, p4); }
#undef clGetKernelWorkGroupInfo
#define clGetKernelWorkGroupInfo clGetKernelWorkGroupInfo_fn
inline cl_int clGetKernelWorkGroupInfo(cl_kernel p0, cl_device_id p1, cl_kernel_work_group_info p2, size_t p3, void* p4, size_t* p5) { return clGetKernelWorkGroupInfo_pfn(p0, p1, p2, p3, p4, p5); }
#undef clGetMemObjectInfo
#define clGetMemObjectInfo clGetMemObjectInfo_fn
inline cl_int clGetMemObjectInfo(cl_mem p0, cl_mem_info p1, size_t p2, void* p3, size_t* p4) { return clGetMemObjectInfo_pfn(p0, p1, p2, p3, p4); }
#undef clGetPlatformIDs
#define clGetPlatformIDs clGetPlatformIDs_fn
inline cl_int clGetPlatformIDs(cl_uint p0, cl_platform_id* p1, cl_uint* p2) { return clGetPlatformIDs_pfn(p0, p1, p2); }
#undef clGetPlatformInfo
#define clGetPlatformInfo clGetPlatformInfo_fn
inline cl_int clGetPlatformInfo(cl_platform_id p0, cl_platform_info p1, size_t p2, void* p3, size_t* p4) { return clGetPlatformInfo_pfn(p0, p1, p2, p3, p4); }
#undef clGetProgramBuildInfo
#define clGetProgramBuildInfo clGetProgramBuildInfo_fn
inline cl_int clGetProgramBuildInfo(cl_program p0, cl_device_id p1, cl_program_build_info p2, size_t p3, void* p4, size_t* p5) { return clGetProgramBuildInfo_pfn(p0, p1, p2, p3, p4, p5); }
#undef clGetProgramInfo
#define clGetProgramInfo clGetProgramInfo_fn
inline cl_int clGetProgramInfo(cl_program p0, cl_program_info p1, size_t p2, void* p3, size_t* p4) { return clGetProgramInfo_pfn(p0, p1, p2, p3, p4); }
#undef clGetSamplerInfo
#define clGetSamplerInfo clGetSamplerInfo_fn
inline cl_int clGetSamplerInfo(cl_sampler p0, cl_sampler_info p1, size_t p2, void* p3, size_t* p4) { return clGetSamplerInfo_pfn(p0, p1, p2, p3, p4); }
#undef clGetSupportedImageFormats
#define clGetSupportedImageFormats clGetSupportedImageFormats_fn
inline cl_int clGetSupportedImageFormats(cl_context p0, cl_mem_flags p1, cl_mem_object_type p2, cl_uint p3, cl_image_format* p4, cl_uint* p5) { return clGetSupportedImageFormats_pfn(p0, p1, p2, p3, p4, p5); }
#undef clLinkProgram
#define clLinkProgram clLinkProgram_fn
inline cl_program clLinkProgram(cl_context p0, cl_uint p1, const cl_device_id* p2, const char* p3, cl_uint p4, const cl_program* p5, void (CL_CALLBACK*p6) (cl_program, void*), void* p7, cl_int* p8) { return clLinkProgram_pfn(p0, p1, p2, p3, p4, p5, p6, p7, p8); }
#undef clReleaseCommandQueue
#define clReleaseCommandQueue clReleaseCommandQueue_fn
inline cl_int clReleaseCommandQueue(cl_command_queue p0) { return clReleaseCommandQueue_pfn(p0); }
#undef clReleaseContext
#define clReleaseContext clReleaseContext_fn
inline cl_int clReleaseContext(cl_context p0) { return clReleaseContext_pfn(p0); }
#undef clReleaseDevice
#define clReleaseDevice clReleaseDevice_fn
inline cl_int clReleaseDevice(cl_device_id p0) { return clReleaseDevice_pfn(p0); }
#undef clReleaseEvent
#define clReleaseEvent clReleaseEvent_fn
inline cl_int clReleaseEvent(cl_event p0) { return clReleaseEvent_pfn(p0); }
#undef clReleaseKernel
#define clReleaseKernel clReleaseKernel_fn
inline cl_int clReleaseKernel(cl_kernel p0) { return clReleaseKernel_pfn(p0); }
#undef clReleaseMemObject
#define clReleaseMemObject clReleaseMemObject_fn
inline cl_int clReleaseMemObject(cl_mem p0) { return clReleaseMemObject_pfn(p0); }
#undef clReleaseProgram
#define clReleaseProgram clReleaseProgram_fn
inline cl_int clReleaseProgram(cl_program p0) { return clReleaseProgram_pfn(p0); }
#undef clReleaseSampler
#define clReleaseSampler clReleaseSampler_fn
inline cl_int clReleaseSampler(cl_sampler p0) { return clReleaseSampler_pfn(p0); }
#undef clRetainCommandQueue
#define clRetainCommandQueue clRetainCommandQueue_fn
inline cl_int clRetainCommandQueue(cl_command_queue p0) { return clRetainCommandQueue_pfn(p0); }
#undef clRetainContext
#define clRetainContext clRetainContext_fn
inline cl_int clRetainContext(cl_context p0) { return clRetainContext_pfn(p0); }
#undef clRetainDevice
#define clRetainDevice clRetainDevice_fn
inline cl_int clRetainDevice(cl_device_id p0) { return clRetainDevice_pfn(p0); }
#undef clRetainEvent
#define clRetainEvent clRetainEvent_fn
inline cl_int clRetainEvent(cl_event p0) { return clRetainEvent_pfn(p0); }
#undef clRetainKernel
#define clRetainKernel clRetainKernel_fn
inline cl_int clRetainKernel(cl_kernel p0) { return clRetainKernel_pfn(p0); }
#undef clRetainMemObject
#define clRetainMemObject clRetainMemObject_fn
inline cl_int clRetainMemObject(cl_mem p0) { return clRetainMemObject_pfn(p0); }
#undef clRetainProgram
#define clRetainProgram clRetainProgram_fn
inline cl_int clRetainProgram(cl_program p0) { return clRetainProgram_pfn(p0); }
#undef clRetainSampler
#define clRetainSampler clRetainSampler_fn
inline cl_int clRetainSampler(cl_sampler p0) { return clRetainSampler_pfn(p0); }
#undef clSetEventCallback
#define clSetEventCallback clSetEventCallback_fn
inline cl_int clSetEventCallback(cl_event p0, cl_int p1, void (CL_CALLBACK*p2) (cl_event, cl_int, void*), void* p3) { return clSetEventCallback_pfn(p0, p1, p2, p3); }
#undef clSetKernelArg
#define clSetKernelArg clSetKernelArg_fn
inline cl_int clSetKernelArg(cl_kernel p0, cl_uint p1, size_t p2, const void* p3) { return clSetKernelArg_pfn(p0, p1, p2, p3); }
#undef clSetMemObjectDestructorCallback
#define clSetMemObjectDestructorCallback clSetMemObjectDestructorCallback_fn
inline cl_int clSetMemObjectDestructorCallback(cl_mem p0, void (CL_CALLBACK*p1) (cl_mem, void*), void* p2) { return clSetMemObjectDestructorCallback_pfn(p0, p1, p2); }
#undef clSetUserEventStatus
#define clSetUserEventStatus clSetUserEventStatus_fn
inline cl_int clSetUserEventStatus(cl_event p0, cl_int p1) { return clSetUserEventStatus_pfn(p0, p1); }
#undef clUnloadCompiler
#define clUnloadCompiler clUnloadCompiler_fn
inline cl_int clUnloadCompiler() { return clUnloadCompiler_pfn(); }
#undef clUnloadPlatformCompiler
#define clUnloadPlatformCompiler clUnloadPlatformCompiler_fn
inline cl_int clUnloadPlatformCompiler(cl_platform_id p0) { return clUnloadPlatformCompiler_pfn(p0); }
#undef clWaitForEvents
#define clWaitForEvents clWaitForEvents_fn
inline cl_int clWaitForEvents(cl_uint p0, const cl_event* p1) { return clWaitForEvents_pfn(p0, p1); }
#ifndef __OPENCV_CORE_OCL_RUNTIME_HPP__
#define __OPENCV_CORE_OCL_RUNTIME_HPP__
#ifdef HAVE_OPENCL
#if defined(HAVE_OPENCL_STATIC)
#if defined __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
#else // HAVE_OPENCL_STATIC
#include "ocl_runtime_opencl.hpp"
#endif // HAVE_OPENCL_STATIC
#ifndef CL_DEVICE_DOUBLE_FP_CONFIG
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
#endif
#ifndef CL_DEVICE_HALF_FP_CONFIG
#define CL_DEVICE_HALF_FP_CONFIG 0x1033
#endif
#ifndef CL_VERSION_1_2
#define CV_REQUIRE_OPENCL_1_2_ERROR CV_ErrorNoReturn(cv::Error::OpenCLApiCallError, "OpenCV compiled without OpenCL v1.2 support, so we can't use functionality from OpenCL v1.2")
#endif
#endif // HAVE_OPENCL
#endif // __OPENCV_CORE_OCL_RUNTIME_HPP__
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the OpenCV Foundation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef __OPENCV_CORE_OCL_RUNTIME_CLAMDBLAS_HPP__
#define __OPENCV_CORE_OCL_RUNTIME_CLAMDBLAS_HPP__
#ifdef HAVE_CLAMDBLAS
#ifndef CL_RUNTIME_EXPORT
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined WIN32 || defined _WIN32 || defined WINCE)
#define CL_RUNTIME_EXPORT __declspec(dllimport)
#else
#define CL_RUNTIME_EXPORT
#endif
#endif
#include "autogenerated/opencl_clamdblas.hpp"
#endif // HAVE_CLAMDBLAS
#endif // __OPENCV_CORE_OCL_RUNTIME_CLAMDBLAS_HPP__
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the OpenCV Foundation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef __OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP__
#define __OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP__
#ifdef HAVE_CLAMDFFT
#ifndef CL_RUNTIME_EXPORT
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined WIN32 || defined _WIN32 || defined WINCE)
#define CL_RUNTIME_EXPORT __declspec(dllimport)
#else
#define CL_RUNTIME_EXPORT
#endif
#endif
#include "autogenerated/opencl_clamdfft.hpp"
#endif // HAVE_CLAMDFFT
#endif // __OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP__
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the OpenCV Foundation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef __OPENCV_CORE_OCL_RUNTIME_OPENCL_CORE_HPP__
#define __OPENCV_CORE_OCL_RUNTIME_OPENCL_CORE_HPP__
#ifdef HAVE_OPENCL
#if defined(HAVE_OPENCL_STATIC)
#if defined __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
#else // HAVE_OPENCL_STATIC
#ifndef CL_RUNTIME_EXPORT
#if (defined(BUILD_SHARED_LIBS) || defined(OPENCV_CORE_SHARED)) && (defined WIN32 || defined _WIN32 || defined WINCE)
#define CL_RUNTIME_EXPORT __declspec(dllimport)
#else
#define CL_RUNTIME_EXPORT
#endif
#endif
#include "autogenerated/opencl_core.hpp"
#endif // HAVE_OPENCL_STATIC
#ifndef CL_DEVICE_DOUBLE_FP_CONFIG
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
#endif
#ifndef CL_DEVICE_HALF_FP_CONFIG
#define CL_DEVICE_HALF_FP_CONFIG 0x1033
#endif
#ifndef CL_VERSION_1_2
#define CV_REQUIRE_OPENCL_1_2_ERROR CV_ErrorNoReturn(cv::Error::OpenCLApiCallError, "OpenCV compiled without OpenCL v1.2 support, so we can't use functionality from OpenCL v1.2")
#endif
#endif // HAVE_OPENCL
#endif // __OPENCV_CORE_OCL_RUNTIME_OPENCL_CORE_HPP__
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the OpenCV Foundation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef __OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP__
#define __OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP__
#include "autogenerated/opencl_core_wrappers.hpp"
#endif // __OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP__
...@@ -42,6 +42,11 @@ ...@@ -42,6 +42,11 @@
#include "precomp.hpp" #include "precomp.hpp"
#include <map> #include <map>
#ifdef HAVE_OPENCL
#include "opencv2/core/opencl/runtime/opencl_core.hpp"
#else
// TODO FIXIT: This file can't be build without OPENCL
/* /*
Part of the file is an extract from the standard OpenCL headers from Khronos site. Part of the file is an extract from the standard OpenCL headers from Khronos site.
Below is the original copyright. Below is the original copyright.
...@@ -1220,6 +1225,12 @@ OCL_FUNC(cl_int, clReleaseEvent, (cl_event event), (event)) ...@@ -1220,6 +1225,12 @@ OCL_FUNC(cl_int, clReleaseEvent, (cl_event event), (event))
#endif #endif
#ifndef CL_VERSION_1_2
#define CL_VERSION_1_2
#endif
#endif
namespace cv { namespace ocl { namespace cv { namespace ocl {
struct UMat2D struct UMat2D
...@@ -1298,10 +1309,31 @@ inline bool operator < (const HashKey& h1, const HashKey& h2) ...@@ -1298,10 +1309,31 @@ inline bool operator < (const HashKey& h1, const HashKey& h2)
return h1.a < h2.a || (h1.a == h2.a && h1.b < h2.b); return h1.a < h2.a || (h1.a == h2.a && h1.b < h2.b);
} }
static bool g_isInitialized = false;
static bool g_isOpenCLAvailable = false;
bool haveOpenCL() bool haveOpenCL()
{ {
initOpenCLAndLoad(0); if (!g_isInitialized)
return g_haveOpenCL; {
if (!g_isInitialized)
{
try
{
cl_uint n = 0;
cl_int err = ::clGetPlatformIDs(0, NULL, &n);
if (err != CL_SUCCESS)
g_isOpenCLAvailable = false;
else
g_isOpenCLAvailable = true;
}
catch (...)
{
g_isOpenCLAvailable = false;
}
g_isInitialized = true;
}
}
return g_isOpenCLAvailable;
} }
bool useOpenCL() bool useOpenCL()
...@@ -1549,7 +1581,11 @@ bool Device::compilerAvailable() const ...@@ -1549,7 +1581,11 @@ bool Device::compilerAvailable() const
{ return p ? p->getBoolProp(CL_DEVICE_COMPILER_AVAILABLE) : false; } { return p ? p->getBoolProp(CL_DEVICE_COMPILER_AVAILABLE) : false; }
bool Device::linkerAvailable() const bool Device::linkerAvailable() const
#ifdef CL_VERSION_1_2
{ return p ? p->getBoolProp(CL_DEVICE_LINKER_AVAILABLE) : false; } { return p ? p->getBoolProp(CL_DEVICE_LINKER_AVAILABLE) : false; }
#else
{ CV_REQUIRE_OPENCL_1_2_ERROR; }
#endif
int Device::doubleFPConfig() const int Device::doubleFPConfig() const
{ return p ? p->getProp<cl_device_fp_config, int>(CL_DEVICE_DOUBLE_FP_CONFIG) : 0; } { return p ? p->getProp<cl_device_fp_config, int>(CL_DEVICE_DOUBLE_FP_CONFIG) : 0; }
...@@ -1558,7 +1594,11 @@ int Device::singleFPConfig() const ...@@ -1558,7 +1594,11 @@ int Device::singleFPConfig() const
{ return p ? p->getProp<cl_device_fp_config, int>(CL_DEVICE_SINGLE_FP_CONFIG) : 0; } { return p ? p->getProp<cl_device_fp_config, int>(CL_DEVICE_SINGLE_FP_CONFIG) : 0; }
int Device::halfFPConfig() const int Device::halfFPConfig() const
#ifdef CL_VERSION_1_2
{ return p ? p->getProp<cl_device_fp_config, int>(CL_DEVICE_HALF_FP_CONFIG) : 0; } { return p ? p->getProp<cl_device_fp_config, int>(CL_DEVICE_HALF_FP_CONFIG) : 0; }
#else
{ CV_REQUIRE_OPENCL_1_2_ERROR; }
#endif
bool Device::endianLittle() const bool Device::endianLittle() const
{ return p ? p->getBoolProp(CL_DEVICE_ENDIAN_LITTLE) : false; } { return p ? p->getBoolProp(CL_DEVICE_ENDIAN_LITTLE) : false; }
...@@ -1609,10 +1649,18 @@ size_t Device::image3DMaxDepth() const ...@@ -1609,10 +1649,18 @@ size_t Device::image3DMaxDepth() const
{ return p ? p->getProp<size_t, size_t>(CL_DEVICE_IMAGE3D_MAX_DEPTH) : 0; } { return p ? p->getProp<size_t, size_t>(CL_DEVICE_IMAGE3D_MAX_DEPTH) : 0; }
size_t Device::imageMaxBufferSize() const size_t Device::imageMaxBufferSize() const
#ifdef CL_VERSION_1_2
{ return p ? p->getProp<size_t, size_t>(CL_DEVICE_IMAGE_MAX_BUFFER_SIZE) : 0; } { return p ? p->getProp<size_t, size_t>(CL_DEVICE_IMAGE_MAX_BUFFER_SIZE) : 0; }
#else
{ CV_REQUIRE_OPENCL_1_2_ERROR; }
#endif
size_t Device::imageMaxArraySize() const size_t Device::imageMaxArraySize() const
#ifdef CL_VERSION_1_2
{ return p ? p->getProp<size_t, size_t>(CL_DEVICE_IMAGE_MAX_ARRAY_SIZE) : 0; } { return p ? p->getProp<size_t, size_t>(CL_DEVICE_IMAGE_MAX_ARRAY_SIZE) : 0; }
#else
{ CV_REQUIRE_OPENCL_1_2_ERROR; }
#endif
int Device::maxClockFrequency() const int Device::maxClockFrequency() const
{ return p ? p->getProp<cl_uint, int>(CL_DEVICE_MAX_CLOCK_FREQUENCY) : 0; } { return p ? p->getProp<cl_uint, int>(CL_DEVICE_MAX_CLOCK_FREQUENCY) : 0; }
...@@ -1704,7 +1752,12 @@ int Device::preferredVectorWidthHalf() const ...@@ -1704,7 +1752,12 @@ int Device::preferredVectorWidthHalf() const
{ return p ? p->getProp<cl_uint, int>(CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF) : 0; } { return p ? p->getProp<cl_uint, int>(CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF) : 0; }
size_t Device::printfBufferSize() const size_t Device::printfBufferSize() const
#ifdef CL_VERSION_1_2
{ return p ? p->getProp<size_t, size_t>(CL_DEVICE_PRINTF_BUFFER_SIZE) : 0; } { return p ? p->getProp<size_t, size_t>(CL_DEVICE_PRINTF_BUFFER_SIZE) : 0; }
#else
{ CV_REQUIRE_OPENCL_1_2_ERROR; }
#endif
size_t Device::profilingTimerResolution() const size_t Device::profilingTimerResolution() const
{ return p ? p->getProp<size_t, size_t>(CL_DEVICE_PROFILING_TIMER_RESOLUTION) : 0; } { return p ? p->getProp<size_t, size_t>(CL_DEVICE_PROFILING_TIMER_RESOLUTION) : 0; }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
// //
// AUTOGENERATED, DO NOT EDIT // AUTOGENERATED, DO NOT EDIT
// //
#include "precomp.hpp" #ifndef ADDITIONAL_FN_DEFINITIONS
#define ADDITIONAL_FN_DEFINITIONS
#ifdef HAVE_CLAMDFFT
#include "opencv2/ocl/cl_runtime/cl_runtime.hpp"
#include "opencv2/ocl/cl_runtime/clamdfft_runtime.hpp"
#if defined(_WIN32)
static void* WinGetProcAddress(const char* name)
{
static HMODULE opencl_module = NULL;
if (!opencl_module)
{
opencl_module = GetModuleHandleA("clAmdFft.Runtime.dll");
if (!opencl_module)
{
opencl_module = LoadLibraryA("clAmdFft.Runtime.dll");
if (!opencl_module)
return NULL;
}
}
return (void*)GetProcAddress(opencl_module, name);
}
#define CV_CL_GET_PROC_ADDRESS(name) WinGetProcAddress(name)
#endif // _WIN32
#if defined(linux)
#include <dlfcn.h>
#include <stdio.h>
static void* GetProcAddress (const char* name)
{
static void* h = NULL;
if (!h)
{
h = dlopen("libclAmdFft.Runtime.so", RTLD_LAZY | RTLD_GLOBAL);
if (!h)
return NULL;
}
return dlsym(h, name);
}
#define CV_CL_GET_PROC_ADDRESS(name) GetProcAddress(name)
#endif
#ifndef CV_CL_GET_PROC_ADDRESS
#define CV_CL_GET_PROC_ADDRESS(name) NULL
#endif #endif
// generated by parser_clamdfft.py // generated by parser_clamdfft.py
enum OPENCLAMDFFT_FN_ID { enum OPENCLAMDFFT_FN_ID {
OPENCLAMDFFT_FN_clAmdFftSetup = 0, OPENCLAMDFFT_FN_clAmdFftBakePlan = 0,
OPENCLAMDFFT_FN_clAmdFftTeardown, // OPENCLAMDFFT_FN_clAmdFftCopyPlan = 1,
OPENCLAMDFFT_FN_clAmdFftGetVersion, OPENCLAMDFFT_FN_clAmdFftCreateDefaultPlan = 2,
OPENCLAMDFFT_FN_clAmdFftCreateDefaultPlan, OPENCLAMDFFT_FN_clAmdFftDestroyPlan = 3,
OPENCLAMDFFT_FN_clAmdFftCopyPlan, OPENCLAMDFFT_FN_clAmdFftEnqueueTransform = 4,
OPENCLAMDFFT_FN_clAmdFftBakePlan, // OPENCLAMDFFT_FN_clAmdFftGetLayout = 5,
OPENCLAMDFFT_FN_clAmdFftDestroyPlan, // OPENCLAMDFFT_FN_clAmdFftGetPlanBatchSize = 6,
OPENCLAMDFFT_FN_clAmdFftGetPlanContext, // OPENCLAMDFFT_FN_clAmdFftGetPlanContext = 7,
OPENCLAMDFFT_FN_clAmdFftGetPlanPrecision, // OPENCLAMDFFT_FN_clAmdFftGetPlanDim = 8,
OPENCLAMDFFT_FN_clAmdFftSetPlanPrecision, // OPENCLAMDFFT_FN_clAmdFftGetPlanDistance = 9,
OPENCLAMDFFT_FN_clAmdFftGetPlanScale, // OPENCLAMDFFT_FN_clAmdFftGetPlanInStride = 10,
OPENCLAMDFFT_FN_clAmdFftSetPlanScale, // OPENCLAMDFFT_FN_clAmdFftGetPlanLength = 11,
OPENCLAMDFFT_FN_clAmdFftGetPlanBatchSize, // OPENCLAMDFFT_FN_clAmdFftGetPlanOutStride = 12,
OPENCLAMDFFT_FN_clAmdFftSetPlanBatchSize, // OPENCLAMDFFT_FN_clAmdFftGetPlanPrecision = 13,
OPENCLAMDFFT_FN_clAmdFftGetPlanDim, // OPENCLAMDFFT_FN_clAmdFftGetPlanScale = 14,
OPENCLAMDFFT_FN_clAmdFftSetPlanDim, // OPENCLAMDFFT_FN_clAmdFftGetPlanTransposeResult = 15,
OPENCLAMDFFT_FN_clAmdFftGetPlanLength, // OPENCLAMDFFT_FN_clAmdFftGetResultLocation = 16,
OPENCLAMDFFT_FN_clAmdFftSetPlanLength, OPENCLAMDFFT_FN_clAmdFftGetTmpBufSize = 17,
OPENCLAMDFFT_FN_clAmdFftGetPlanInStride, // OPENCLAMDFFT_FN_clAmdFftGetVersion = 18,
OPENCLAMDFFT_FN_clAmdFftSetPlanInStride, OPENCLAMDFFT_FN_clAmdFftSetLayout = 19,
OPENCLAMDFFT_FN_clAmdFftGetPlanOutStride, OPENCLAMDFFT_FN_clAmdFftSetPlanBatchSize = 20,
OPENCLAMDFFT_FN_clAmdFftSetPlanOutStride, // OPENCLAMDFFT_FN_clAmdFftSetPlanDim = 21,
OPENCLAMDFFT_FN_clAmdFftGetPlanDistance, OPENCLAMDFFT_FN_clAmdFftSetPlanDistance = 22,
OPENCLAMDFFT_FN_clAmdFftSetPlanDistance, OPENCLAMDFFT_FN_clAmdFftSetPlanInStride = 23,
OPENCLAMDFFT_FN_clAmdFftGetLayout, // OPENCLAMDFFT_FN_clAmdFftSetPlanLength = 24,
OPENCLAMDFFT_FN_clAmdFftSetLayout, OPENCLAMDFFT_FN_clAmdFftSetPlanOutStride = 25,
OPENCLAMDFFT_FN_clAmdFftGetResultLocation, // OPENCLAMDFFT_FN_clAmdFftSetPlanPrecision = 26,
OPENCLAMDFFT_FN_clAmdFftSetResultLocation, OPENCLAMDFFT_FN_clAmdFftSetPlanScale = 27,
OPENCLAMDFFT_FN_clAmdFftGetPlanTransposeResult, // OPENCLAMDFFT_FN_clAmdFftSetPlanTransposeResult = 28,
OPENCLAMDFFT_FN_clAmdFftSetPlanTransposeResult, OPENCLAMDFFT_FN_clAmdFftSetResultLocation = 29,
OPENCLAMDFFT_FN_clAmdFftGetTmpBufSize, OPENCLAMDFFT_FN_clAmdFftSetup = 30,
OPENCLAMDFFT_FN_clAmdFftEnqueueTransform, OPENCLAMDFFT_FN_clAmdFftTeardown = 31,
}; };
// generated by parser_clamdfft.py
const char* openclamdfft_fn_names[] = {
"clAmdFftSetup",
"clAmdFftTeardown",
"clAmdFftGetVersion",
"clAmdFftCreateDefaultPlan",
"clAmdFftCopyPlan",
"clAmdFftBakePlan",
"clAmdFftDestroyPlan",
"clAmdFftGetPlanContext",
"clAmdFftGetPlanPrecision",
"clAmdFftSetPlanPrecision",
"clAmdFftGetPlanScale",
"clAmdFftSetPlanScale",
"clAmdFftGetPlanBatchSize",
"clAmdFftSetPlanBatchSize",
"clAmdFftGetPlanDim",
"clAmdFftSetPlanDim",
"clAmdFftGetPlanLength",
"clAmdFftSetPlanLength",
"clAmdFftGetPlanInStride",
"clAmdFftSetPlanInStride",
"clAmdFftGetPlanOutStride",
"clAmdFftSetPlanOutStride",
"clAmdFftGetPlanDistance",
"clAmdFftSetPlanDistance",
"clAmdFftGetLayout",
"clAmdFftSetLayout",
"clAmdFftGetResultLocation",
"clAmdFftSetResultLocation",
"clAmdFftGetPlanTransposeResult",
"clAmdFftSetPlanTransposeResult",
"clAmdFftGetTmpBufSize",
"clAmdFftEnqueueTransform",
};
static void* openclamdfft_check_fn(int ID)
{
void* func = CV_CL_GET_PROC_ADDRESS(openclamdfft_fn_names[ID]);
if (!func)
{
std::ostringstream msg;
msg << "OpenCL AMD FFT function is not available: [" << openclamdfft_fn_names[ID] << "]";
CV_Error(CV_StsBadFunc, msg.str());
}
extern void* openclamdfft_fn_ptrs[];
*(void**)(openclamdfft_fn_ptrs[ID]) = func;
return func;
}
namespace { namespace {
// generated by parser_clamdfft.py // generated by parser_clamdfft.py
...@@ -324,73 +230,170 @@ struct openclamdfft_fn22 ...@@ -324,73 +230,170 @@ struct openclamdfft_fn22
} }
// generated by parser_clamdfft.py // generated by parser_clamdfft.py
clAmdFftStatus (*clAmdFftSetup)(const clAmdFftSetupData*) = openclamdfft_fn1<OPENCLAMDFFT_FN_clAmdFftSetup, clAmdFftStatus, const clAmdFftSetupData*>::switch_fn; clAmdFftStatus (*clAmdFftBakePlan)(clAmdFftPlanHandle, cl_uint, cl_command_queue*, void (CL_CALLBACK*) (clAmdFftPlanHandle plHandle, void* user_data), void*) =
clAmdFftStatus (*clAmdFftTeardown)() = openclamdfft_fn0<OPENCLAMDFFT_FN_clAmdFftTeardown, clAmdFftStatus>::switch_fn; openclamdfft_fn5<OPENCLAMDFFT_FN_clAmdFftBakePlan, clAmdFftStatus, clAmdFftPlanHandle, cl_uint, cl_command_queue*, void (CL_CALLBACK*) (clAmdFftPlanHandle plHandle, void* user_data), void*>::switch_fn;
clAmdFftStatus (*clAmdFftGetVersion)(cl_uint*, cl_uint*, cl_uint*) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetVersion, clAmdFftStatus, cl_uint*, cl_uint*, cl_uint*>::switch_fn; static const struct DynamicFnEntry clAmdFftBakePlan_definition = { "clAmdFftBakePlan", (void**)&clAmdFftBakePlan};
clAmdFftStatus (*clAmdFftCreateDefaultPlan)(clAmdFftPlanHandle*, cl_context, const clAmdFftDim, const size_t*) = openclamdfft_fn4<OPENCLAMDFFT_FN_clAmdFftCreateDefaultPlan, clAmdFftStatus, clAmdFftPlanHandle*, cl_context, const clAmdFftDim, const size_t*>::switch_fn;
clAmdFftStatus (*clAmdFftCopyPlan)(clAmdFftPlanHandle*, cl_context, clAmdFftPlanHandle) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftCopyPlan, clAmdFftStatus, clAmdFftPlanHandle*, cl_context, clAmdFftPlanHandle>::switch_fn; //clAmdFftStatus (*clAmdFftCopyPlan)(clAmdFftPlanHandle*, cl_context, clAmdFftPlanHandle) =
clAmdFftStatus (*clAmdFftBakePlan)(clAmdFftPlanHandle, cl_uint, cl_command_queue*, void (CL_CALLBACK*) (clAmdFftPlanHandle plHandle, void* user_data), void*) = openclamdfft_fn5<OPENCLAMDFFT_FN_clAmdFftBakePlan, clAmdFftStatus, clAmdFftPlanHandle, cl_uint, cl_command_queue*, void (CL_CALLBACK*) (clAmdFftPlanHandle plHandle, void* user_data), void*>::switch_fn; // openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftCopyPlan, clAmdFftStatus, clAmdFftPlanHandle*, cl_context, clAmdFftPlanHandle>::switch_fn;
clAmdFftStatus (*clAmdFftDestroyPlan)(clAmdFftPlanHandle*) = openclamdfft_fn1<OPENCLAMDFFT_FN_clAmdFftDestroyPlan, clAmdFftStatus, clAmdFftPlanHandle*>::switch_fn; //static const struct DynamicFnEntry clAmdFftCopyPlan_definition = { "clAmdFftCopyPlan", (void**)&clAmdFftCopyPlan};
clAmdFftStatus (*clAmdFftGetPlanContext)(const clAmdFftPlanHandle, cl_context*) = openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftGetPlanContext, clAmdFftStatus, const clAmdFftPlanHandle, cl_context*>::switch_fn;
clAmdFftStatus (*clAmdFftGetPlanPrecision)(const clAmdFftPlanHandle, clAmdFftPrecision*) = openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftGetPlanPrecision, clAmdFftStatus, const clAmdFftPlanHandle, clAmdFftPrecision*>::switch_fn; clAmdFftStatus (*clAmdFftCreateDefaultPlan)(clAmdFftPlanHandle*, cl_context, const clAmdFftDim, const size_t*) =
clAmdFftStatus (*clAmdFftSetPlanPrecision)(clAmdFftPlanHandle, clAmdFftPrecision) = openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftSetPlanPrecision, clAmdFftStatus, clAmdFftPlanHandle, clAmdFftPrecision>::switch_fn; openclamdfft_fn4<OPENCLAMDFFT_FN_clAmdFftCreateDefaultPlan, clAmdFftStatus, clAmdFftPlanHandle*, cl_context, const clAmdFftDim, const size_t*>::switch_fn;
clAmdFftStatus (*clAmdFftGetPlanScale)(const clAmdFftPlanHandle, clAmdFftDirection, cl_float*) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetPlanScale, clAmdFftStatus, const clAmdFftPlanHandle, clAmdFftDirection, cl_float*>::switch_fn; static const struct DynamicFnEntry clAmdFftCreateDefaultPlan_definition = { "clAmdFftCreateDefaultPlan", (void**)&clAmdFftCreateDefaultPlan};
clAmdFftStatus (*clAmdFftSetPlanScale)(clAmdFftPlanHandle, clAmdFftDirection, cl_float) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftSetPlanScale, clAmdFftStatus, clAmdFftPlanHandle, clAmdFftDirection, cl_float>::switch_fn;
clAmdFftStatus (*clAmdFftGetPlanBatchSize)(const clAmdFftPlanHandle, size_t*) = openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftGetPlanBatchSize, clAmdFftStatus, const clAmdFftPlanHandle, size_t*>::switch_fn; clAmdFftStatus (*clAmdFftDestroyPlan)(clAmdFftPlanHandle*) =
clAmdFftStatus (*clAmdFftSetPlanBatchSize)(clAmdFftPlanHandle, size_t) = openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftSetPlanBatchSize, clAmdFftStatus, clAmdFftPlanHandle, size_t>::switch_fn; openclamdfft_fn1<OPENCLAMDFFT_FN_clAmdFftDestroyPlan, clAmdFftStatus, clAmdFftPlanHandle*>::switch_fn;
clAmdFftStatus (*clAmdFftGetPlanDim)(const clAmdFftPlanHandle, clAmdFftDim*, cl_uint*) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetPlanDim, clAmdFftStatus, const clAmdFftPlanHandle, clAmdFftDim*, cl_uint*>::switch_fn; static const struct DynamicFnEntry clAmdFftDestroyPlan_definition = { "clAmdFftDestroyPlan", (void**)&clAmdFftDestroyPlan};
clAmdFftStatus (*clAmdFftSetPlanDim)(clAmdFftPlanHandle, const clAmdFftDim) = openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftSetPlanDim, clAmdFftStatus, clAmdFftPlanHandle, const clAmdFftDim>::switch_fn;
clAmdFftStatus (*clAmdFftGetPlanLength)(const clAmdFftPlanHandle, const clAmdFftDim, size_t*) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetPlanLength, clAmdFftStatus, const clAmdFftPlanHandle, const clAmdFftDim, size_t*>::switch_fn; clAmdFftStatus (*clAmdFftEnqueueTransform)(clAmdFftPlanHandle, clAmdFftDirection, cl_uint, cl_command_queue*, cl_uint, const cl_event*, cl_event*, cl_mem*, cl_mem*, cl_mem) =
clAmdFftStatus (*clAmdFftSetPlanLength)(clAmdFftPlanHandle, const clAmdFftDim, const size_t*) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftSetPlanLength, clAmdFftStatus, clAmdFftPlanHandle, const clAmdFftDim, const size_t*>::switch_fn; openclamdfft_fn10<OPENCLAMDFFT_FN_clAmdFftEnqueueTransform, clAmdFftStatus, clAmdFftPlanHandle, clAmdFftDirection, cl_uint, cl_command_queue*, cl_uint, const cl_event*, cl_event*, cl_mem*, cl_mem*, cl_mem>::switch_fn;
clAmdFftStatus (*clAmdFftGetPlanInStride)(const clAmdFftPlanHandle, const clAmdFftDim, size_t*) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetPlanInStride, clAmdFftStatus, const clAmdFftPlanHandle, const clAmdFftDim, size_t*>::switch_fn; static const struct DynamicFnEntry clAmdFftEnqueueTransform_definition = { "clAmdFftEnqueueTransform", (void**)&clAmdFftEnqueueTransform};
clAmdFftStatus (*clAmdFftSetPlanInStride)(clAmdFftPlanHandle, const clAmdFftDim, size_t*) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftSetPlanInStride, clAmdFftStatus, clAmdFftPlanHandle, const clAmdFftDim, size_t*>::switch_fn;
clAmdFftStatus (*clAmdFftGetPlanOutStride)(const clAmdFftPlanHandle, const clAmdFftDim, size_t*) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetPlanOutStride, clAmdFftStatus, const clAmdFftPlanHandle, const clAmdFftDim, size_t*>::switch_fn; //clAmdFftStatus (*clAmdFftGetLayout)(const clAmdFftPlanHandle, clAmdFftLayout*, clAmdFftLayout*) =
clAmdFftStatus (*clAmdFftSetPlanOutStride)(clAmdFftPlanHandle, const clAmdFftDim, size_t*) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftSetPlanOutStride, clAmdFftStatus, clAmdFftPlanHandle, const clAmdFftDim, size_t*>::switch_fn; // openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetLayout, clAmdFftStatus, const clAmdFftPlanHandle, clAmdFftLayout*, clAmdFftLayout*>::switch_fn;
clAmdFftStatus (*clAmdFftGetPlanDistance)(const clAmdFftPlanHandle, size_t*, size_t*) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetPlanDistance, clAmdFftStatus, const clAmdFftPlanHandle, size_t*, size_t*>::switch_fn; //static const struct DynamicFnEntry clAmdFftGetLayout_definition = { "clAmdFftGetLayout", (void**)&clAmdFftGetLayout};
clAmdFftStatus (*clAmdFftSetPlanDistance)(clAmdFftPlanHandle, size_t, size_t) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftSetPlanDistance, clAmdFftStatus, clAmdFftPlanHandle, size_t, size_t>::switch_fn;
clAmdFftStatus (*clAmdFftGetLayout)(const clAmdFftPlanHandle, clAmdFftLayout*, clAmdFftLayout*) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetLayout, clAmdFftStatus, const clAmdFftPlanHandle, clAmdFftLayout*, clAmdFftLayout*>::switch_fn; //clAmdFftStatus (*clAmdFftGetPlanBatchSize)(const clAmdFftPlanHandle, size_t*) =
clAmdFftStatus (*clAmdFftSetLayout)(clAmdFftPlanHandle, clAmdFftLayout, clAmdFftLayout) = openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftSetLayout, clAmdFftStatus, clAmdFftPlanHandle, clAmdFftLayout, clAmdFftLayout>::switch_fn; // openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftGetPlanBatchSize, clAmdFftStatus, const clAmdFftPlanHandle, size_t*>::switch_fn;
clAmdFftStatus (*clAmdFftGetResultLocation)(const clAmdFftPlanHandle, clAmdFftResultLocation*) = openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftGetResultLocation, clAmdFftStatus, const clAmdFftPlanHandle, clAmdFftResultLocation*>::switch_fn; //static const struct DynamicFnEntry clAmdFftGetPlanBatchSize_definition = { "clAmdFftGetPlanBatchSize", (void**)&clAmdFftGetPlanBatchSize};
clAmdFftStatus (*clAmdFftSetResultLocation)(clAmdFftPlanHandle, clAmdFftResultLocation) = openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftSetResultLocation, clAmdFftStatus, clAmdFftPlanHandle, clAmdFftResultLocation>::switch_fn;
clAmdFftStatus (*clAmdFftGetPlanTransposeResult)(const clAmdFftPlanHandle, clAmdFftResultTransposed*) = openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftGetPlanTransposeResult, clAmdFftStatus, const clAmdFftPlanHandle, clAmdFftResultTransposed*>::switch_fn; //clAmdFftStatus (*clAmdFftGetPlanContext)(const clAmdFftPlanHandle, cl_context*) =
clAmdFftStatus (*clAmdFftSetPlanTransposeResult)(clAmdFftPlanHandle, clAmdFftResultTransposed) = openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftSetPlanTransposeResult, clAmdFftStatus, clAmdFftPlanHandle, clAmdFftResultTransposed>::switch_fn; // openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftGetPlanContext, clAmdFftStatus, const clAmdFftPlanHandle, cl_context*>::switch_fn;
clAmdFftStatus (*clAmdFftGetTmpBufSize)(const clAmdFftPlanHandle, size_t*) = openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftGetTmpBufSize, clAmdFftStatus, const clAmdFftPlanHandle, size_t*>::switch_fn; //static const struct DynamicFnEntry clAmdFftGetPlanContext_definition = { "clAmdFftGetPlanContext", (void**)&clAmdFftGetPlanContext};
clAmdFftStatus (*clAmdFftEnqueueTransform)(clAmdFftPlanHandle, clAmdFftDirection, cl_uint, cl_command_queue*, cl_uint, const cl_event*, cl_event*, cl_mem*, cl_mem*, cl_mem) = openclamdfft_fn10<OPENCLAMDFFT_FN_clAmdFftEnqueueTransform, clAmdFftStatus, clAmdFftPlanHandle, clAmdFftDirection, cl_uint, cl_command_queue*, cl_uint, const cl_event*, cl_event*, cl_mem*, cl_mem*, cl_mem>::switch_fn;
//clAmdFftStatus (*clAmdFftGetPlanDim)(const clAmdFftPlanHandle, clAmdFftDim*, cl_uint*) =
// openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetPlanDim, clAmdFftStatus, const clAmdFftPlanHandle, clAmdFftDim*, cl_uint*>::switch_fn;
//static const struct DynamicFnEntry clAmdFftGetPlanDim_definition = { "clAmdFftGetPlanDim", (void**)&clAmdFftGetPlanDim};
//clAmdFftStatus (*clAmdFftGetPlanDistance)(const clAmdFftPlanHandle, size_t*, size_t*) =
// openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetPlanDistance, clAmdFftStatus, const clAmdFftPlanHandle, size_t*, size_t*>::switch_fn;
//static const struct DynamicFnEntry clAmdFftGetPlanDistance_definition = { "clAmdFftGetPlanDistance", (void**)&clAmdFftGetPlanDistance};
//clAmdFftStatus (*clAmdFftGetPlanInStride)(const clAmdFftPlanHandle, const clAmdFftDim, size_t*) =
// openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetPlanInStride, clAmdFftStatus, const clAmdFftPlanHandle, const clAmdFftDim, size_t*>::switch_fn;
//static const struct DynamicFnEntry clAmdFftGetPlanInStride_definition = { "clAmdFftGetPlanInStride", (void**)&clAmdFftGetPlanInStride};
//clAmdFftStatus (*clAmdFftGetPlanLength)(const clAmdFftPlanHandle, const clAmdFftDim, size_t*) =
// openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetPlanLength, clAmdFftStatus, const clAmdFftPlanHandle, const clAmdFftDim, size_t*>::switch_fn;
//static const struct DynamicFnEntry clAmdFftGetPlanLength_definition = { "clAmdFftGetPlanLength", (void**)&clAmdFftGetPlanLength};
//clAmdFftStatus (*clAmdFftGetPlanOutStride)(const clAmdFftPlanHandle, const clAmdFftDim, size_t*) =
// openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetPlanOutStride, clAmdFftStatus, const clAmdFftPlanHandle, const clAmdFftDim, size_t*>::switch_fn;
//static const struct DynamicFnEntry clAmdFftGetPlanOutStride_definition = { "clAmdFftGetPlanOutStride", (void**)&clAmdFftGetPlanOutStride};
//clAmdFftStatus (*clAmdFftGetPlanPrecision)(const clAmdFftPlanHandle, clAmdFftPrecision*) =
// openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftGetPlanPrecision, clAmdFftStatus, const clAmdFftPlanHandle, clAmdFftPrecision*>::switch_fn;
//static const struct DynamicFnEntry clAmdFftGetPlanPrecision_definition = { "clAmdFftGetPlanPrecision", (void**)&clAmdFftGetPlanPrecision};
//clAmdFftStatus (*clAmdFftGetPlanScale)(const clAmdFftPlanHandle, clAmdFftDirection, cl_float*) =
// openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetPlanScale, clAmdFftStatus, const clAmdFftPlanHandle, clAmdFftDirection, cl_float*>::switch_fn;
//static const struct DynamicFnEntry clAmdFftGetPlanScale_definition = { "clAmdFftGetPlanScale", (void**)&clAmdFftGetPlanScale};
//clAmdFftStatus (*clAmdFftGetPlanTransposeResult)(const clAmdFftPlanHandle, clAmdFftResultTransposed*) =
// openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftGetPlanTransposeResult, clAmdFftStatus, const clAmdFftPlanHandle, clAmdFftResultTransposed*>::switch_fn;
//static const struct DynamicFnEntry clAmdFftGetPlanTransposeResult_definition = { "clAmdFftGetPlanTransposeResult", (void**)&clAmdFftGetPlanTransposeResult};
//clAmdFftStatus (*clAmdFftGetResultLocation)(const clAmdFftPlanHandle, clAmdFftResultLocation*) =
// openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftGetResultLocation, clAmdFftStatus, const clAmdFftPlanHandle, clAmdFftResultLocation*>::switch_fn;
//static const struct DynamicFnEntry clAmdFftGetResultLocation_definition = { "clAmdFftGetResultLocation", (void**)&clAmdFftGetResultLocation};
clAmdFftStatus (*clAmdFftGetTmpBufSize)(const clAmdFftPlanHandle, size_t*) =
openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftGetTmpBufSize, clAmdFftStatus, const clAmdFftPlanHandle, size_t*>::switch_fn;
static const struct DynamicFnEntry clAmdFftGetTmpBufSize_definition = { "clAmdFftGetTmpBufSize", (void**)&clAmdFftGetTmpBufSize};
//clAmdFftStatus (*clAmdFftGetVersion)(cl_uint*, cl_uint*, cl_uint*) =
// openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftGetVersion, clAmdFftStatus, cl_uint*, cl_uint*, cl_uint*>::switch_fn;
//static const struct DynamicFnEntry clAmdFftGetVersion_definition = { "clAmdFftGetVersion", (void**)&clAmdFftGetVersion};
clAmdFftStatus (*clAmdFftSetLayout)(clAmdFftPlanHandle, clAmdFftLayout, clAmdFftLayout) =
openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftSetLayout, clAmdFftStatus, clAmdFftPlanHandle, clAmdFftLayout, clAmdFftLayout>::switch_fn;
static const struct DynamicFnEntry clAmdFftSetLayout_definition = { "clAmdFftSetLayout", (void**)&clAmdFftSetLayout};
clAmdFftStatus (*clAmdFftSetPlanBatchSize)(clAmdFftPlanHandle, size_t) =
openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftSetPlanBatchSize, clAmdFftStatus, clAmdFftPlanHandle, size_t>::switch_fn;
static const struct DynamicFnEntry clAmdFftSetPlanBatchSize_definition = { "clAmdFftSetPlanBatchSize", (void**)&clAmdFftSetPlanBatchSize};
//clAmdFftStatus (*clAmdFftSetPlanDim)(clAmdFftPlanHandle, const clAmdFftDim) =
// openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftSetPlanDim, clAmdFftStatus, clAmdFftPlanHandle, const clAmdFftDim>::switch_fn;
//static const struct DynamicFnEntry clAmdFftSetPlanDim_definition = { "clAmdFftSetPlanDim", (void**)&clAmdFftSetPlanDim};
clAmdFftStatus (*clAmdFftSetPlanDistance)(clAmdFftPlanHandle, size_t, size_t) =
openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftSetPlanDistance, clAmdFftStatus, clAmdFftPlanHandle, size_t, size_t>::switch_fn;
static const struct DynamicFnEntry clAmdFftSetPlanDistance_definition = { "clAmdFftSetPlanDistance", (void**)&clAmdFftSetPlanDistance};
clAmdFftStatus (*clAmdFftSetPlanInStride)(clAmdFftPlanHandle, const clAmdFftDim, size_t*) =
openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftSetPlanInStride, clAmdFftStatus, clAmdFftPlanHandle, const clAmdFftDim, size_t*>::switch_fn;
static const struct DynamicFnEntry clAmdFftSetPlanInStride_definition = { "clAmdFftSetPlanInStride", (void**)&clAmdFftSetPlanInStride};
//clAmdFftStatus (*clAmdFftSetPlanLength)(clAmdFftPlanHandle, const clAmdFftDim, const size_t*) =
// openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftSetPlanLength, clAmdFftStatus, clAmdFftPlanHandle, const clAmdFftDim, const size_t*>::switch_fn;
//static const struct DynamicFnEntry clAmdFftSetPlanLength_definition = { "clAmdFftSetPlanLength", (void**)&clAmdFftSetPlanLength};
clAmdFftStatus (*clAmdFftSetPlanOutStride)(clAmdFftPlanHandle, const clAmdFftDim, size_t*) =
openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftSetPlanOutStride, clAmdFftStatus, clAmdFftPlanHandle, const clAmdFftDim, size_t*>::switch_fn;
static const struct DynamicFnEntry clAmdFftSetPlanOutStride_definition = { "clAmdFftSetPlanOutStride", (void**)&clAmdFftSetPlanOutStride};
//clAmdFftStatus (*clAmdFftSetPlanPrecision)(clAmdFftPlanHandle, clAmdFftPrecision) =
// openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftSetPlanPrecision, clAmdFftStatus, clAmdFftPlanHandle, clAmdFftPrecision>::switch_fn;
//static const struct DynamicFnEntry clAmdFftSetPlanPrecision_definition = { "clAmdFftSetPlanPrecision", (void**)&clAmdFftSetPlanPrecision};
clAmdFftStatus (*clAmdFftSetPlanScale)(clAmdFftPlanHandle, clAmdFftDirection, cl_float) =
openclamdfft_fn3<OPENCLAMDFFT_FN_clAmdFftSetPlanScale, clAmdFftStatus, clAmdFftPlanHandle, clAmdFftDirection, cl_float>::switch_fn;
static const struct DynamicFnEntry clAmdFftSetPlanScale_definition = { "clAmdFftSetPlanScale", (void**)&clAmdFftSetPlanScale};
//clAmdFftStatus (*clAmdFftSetPlanTransposeResult)(clAmdFftPlanHandle, clAmdFftResultTransposed) =
// openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftSetPlanTransposeResult, clAmdFftStatus, clAmdFftPlanHandle, clAmdFftResultTransposed>::switch_fn;
//static const struct DynamicFnEntry clAmdFftSetPlanTransposeResult_definition = { "clAmdFftSetPlanTransposeResult", (void**)&clAmdFftSetPlanTransposeResult};
clAmdFftStatus (*clAmdFftSetResultLocation)(clAmdFftPlanHandle, clAmdFftResultLocation) =
openclamdfft_fn2<OPENCLAMDFFT_FN_clAmdFftSetResultLocation, clAmdFftStatus, clAmdFftPlanHandle, clAmdFftResultLocation>::switch_fn;
static const struct DynamicFnEntry clAmdFftSetResultLocation_definition = { "clAmdFftSetResultLocation", (void**)&clAmdFftSetResultLocation};
clAmdFftStatus (*clAmdFftSetup)(const clAmdFftSetupData*) =
openclamdfft_fn1<OPENCLAMDFFT_FN_clAmdFftSetup, clAmdFftStatus, const clAmdFftSetupData*>::switch_fn;
static const struct DynamicFnEntry clAmdFftSetup_definition = { "clAmdFftSetup", (void**)&clAmdFftSetup};
clAmdFftStatus (*clAmdFftTeardown)() =
openclamdfft_fn0<OPENCLAMDFFT_FN_clAmdFftTeardown, clAmdFftStatus>::switch_fn;
static const struct DynamicFnEntry clAmdFftTeardown_definition = { "clAmdFftTeardown", (void**)&clAmdFftTeardown};
// generated by parser_clamdfft.py // generated by parser_clamdfft.py
void* openclamdfft_fn_ptrs[] = { static const struct DynamicFnEntry* openclamdfft_fn[] = {
&clAmdFftSetup, &clAmdFftBakePlan_definition,
&clAmdFftTeardown, NULL/*&clAmdFftCopyPlan_definition*/,
&clAmdFftGetVersion, &clAmdFftCreateDefaultPlan_definition,
&clAmdFftCreateDefaultPlan, &clAmdFftDestroyPlan_definition,
&clAmdFftCopyPlan, &clAmdFftEnqueueTransform_definition,
&clAmdFftBakePlan, NULL/*&clAmdFftGetLayout_definition*/,
&clAmdFftDestroyPlan, NULL/*&clAmdFftGetPlanBatchSize_definition*/,
&clAmdFftGetPlanContext, NULL/*&clAmdFftGetPlanContext_definition*/,
&clAmdFftGetPlanPrecision, NULL/*&clAmdFftGetPlanDim_definition*/,
&clAmdFftSetPlanPrecision, NULL/*&clAmdFftGetPlanDistance_definition*/,
&clAmdFftGetPlanScale, NULL/*&clAmdFftGetPlanInStride_definition*/,
&clAmdFftSetPlanScale, NULL/*&clAmdFftGetPlanLength_definition*/,
&clAmdFftGetPlanBatchSize, NULL/*&clAmdFftGetPlanOutStride_definition*/,
&clAmdFftSetPlanBatchSize, NULL/*&clAmdFftGetPlanPrecision_definition*/,
&clAmdFftGetPlanDim, NULL/*&clAmdFftGetPlanScale_definition*/,
&clAmdFftSetPlanDim, NULL/*&clAmdFftGetPlanTransposeResult_definition*/,
&clAmdFftGetPlanLength, NULL/*&clAmdFftGetResultLocation_definition*/,
&clAmdFftSetPlanLength, &clAmdFftGetTmpBufSize_definition,
&clAmdFftGetPlanInStride, NULL/*&clAmdFftGetVersion_definition*/,
&clAmdFftSetPlanInStride, &clAmdFftSetLayout_definition,
&clAmdFftGetPlanOutStride, &clAmdFftSetPlanBatchSize_definition,
&clAmdFftSetPlanOutStride, NULL/*&clAmdFftSetPlanDim_definition*/,
&clAmdFftGetPlanDistance, &clAmdFftSetPlanDistance_definition,
&clAmdFftSetPlanDistance, &clAmdFftSetPlanInStride_definition,
&clAmdFftGetLayout, NULL/*&clAmdFftSetPlanLength_definition*/,
&clAmdFftSetLayout, &clAmdFftSetPlanOutStride_definition,
&clAmdFftGetResultLocation, NULL/*&clAmdFftSetPlanPrecision_definition*/,
&clAmdFftSetResultLocation, &clAmdFftSetPlanScale_definition,
&clAmdFftGetPlanTransposeResult, NULL/*&clAmdFftSetPlanTransposeResult_definition*/,
&clAmdFftSetPlanTransposeResult, &clAmdFftSetResultLocation_definition,
&clAmdFftGetTmpBufSize, &clAmdFftSetup_definition,
&clAmdFftEnqueueTransform, &clAmdFftTeardown_definition,
ADDITIONAL_FN_DEFINITIONS // macro for custom functions
}; };
#endif // number of enabled functions: 14
//
// AUTOGENERATED, DO NOT EDIT
//
#ifndef ADDITIONAL_FN_DEFINITIONS
#define ADDITIONAL_FN_DEFINITIONS
#endif
// generated by parser_cl.py
enum OPENCL_FN_ID {
OPENCL_FN_clBuildProgram = 0,
OPENCL_FN_clCompileProgram = 1,
OPENCL_FN_clCreateBuffer = 2,
OPENCL_FN_clCreateCommandQueue = 3,
OPENCL_FN_clCreateContext = 4,
OPENCL_FN_clCreateContextFromType = 5,
OPENCL_FN_clCreateImage = 6,
OPENCL_FN_clCreateImage2D = 7,
OPENCL_FN_clCreateImage3D = 8,
OPENCL_FN_clCreateKernel = 9,
OPENCL_FN_clCreateKernelsInProgram = 10,
OPENCL_FN_clCreateProgramWithBinary = 11,
OPENCL_FN_clCreateProgramWithBuiltInKernels = 12,
OPENCL_FN_clCreateProgramWithSource = 13,
OPENCL_FN_clCreateSampler = 14,
OPENCL_FN_clCreateSubBuffer = 15,
OPENCL_FN_clCreateSubDevices = 16,
OPENCL_FN_clCreateUserEvent = 17,
OPENCL_FN_clEnqueueBarrier = 18,
OPENCL_FN_clEnqueueBarrierWithWaitList = 19,
OPENCL_FN_clEnqueueCopyBuffer = 20,
OPENCL_FN_clEnqueueCopyBufferRect = 21,
OPENCL_FN_clEnqueueCopyBufferToImage = 22,
OPENCL_FN_clEnqueueCopyImage = 23,
OPENCL_FN_clEnqueueCopyImageToBuffer = 24,
OPENCL_FN_clEnqueueFillBuffer = 25,
OPENCL_FN_clEnqueueFillImage = 26,
OPENCL_FN_clEnqueueMapBuffer = 27,
OPENCL_FN_clEnqueueMapImage = 28,
OPENCL_FN_clEnqueueMarker = 29,
OPENCL_FN_clEnqueueMarkerWithWaitList = 30,
OPENCL_FN_clEnqueueMigrateMemObjects = 31,
OPENCL_FN_clEnqueueNDRangeKernel = 32,
OPENCL_FN_clEnqueueNativeKernel = 33,
OPENCL_FN_clEnqueueReadBuffer = 34,
OPENCL_FN_clEnqueueReadBufferRect = 35,
OPENCL_FN_clEnqueueReadImage = 36,
OPENCL_FN_clEnqueueTask = 37,
OPENCL_FN_clEnqueueUnmapMemObject = 38,
OPENCL_FN_clEnqueueWaitForEvents = 39,
OPENCL_FN_clEnqueueWriteBuffer = 40,
OPENCL_FN_clEnqueueWriteBufferRect = 41,
OPENCL_FN_clEnqueueWriteImage = 42,
OPENCL_FN_clFinish = 43,
OPENCL_FN_clFlush = 44,
OPENCL_FN_clGetCommandQueueInfo = 45,
OPENCL_FN_clGetContextInfo = 46,
OPENCL_FN_clGetDeviceIDs = 47,
OPENCL_FN_clGetDeviceInfo = 48,
OPENCL_FN_clGetEventInfo = 49,
OPENCL_FN_clGetEventProfilingInfo = 50,
OPENCL_FN_clGetExtensionFunctionAddress = 51,
OPENCL_FN_clGetExtensionFunctionAddressForPlatform = 52,
OPENCL_FN_clGetImageInfo = 53,
OPENCL_FN_clGetKernelArgInfo = 54,
OPENCL_FN_clGetKernelInfo = 55,
OPENCL_FN_clGetKernelWorkGroupInfo = 56,
OPENCL_FN_clGetMemObjectInfo = 57,
OPENCL_FN_clGetPlatformIDs = 58,
OPENCL_FN_clGetPlatformInfo = 59,
OPENCL_FN_clGetProgramBuildInfo = 60,
OPENCL_FN_clGetProgramInfo = 61,
OPENCL_FN_clGetSamplerInfo = 62,
OPENCL_FN_clGetSupportedImageFormats = 63,
OPENCL_FN_clLinkProgram = 64,
OPENCL_FN_clReleaseCommandQueue = 65,
OPENCL_FN_clReleaseContext = 66,
OPENCL_FN_clReleaseDevice = 67,
OPENCL_FN_clReleaseEvent = 68,
OPENCL_FN_clReleaseKernel = 69,
OPENCL_FN_clReleaseMemObject = 70,
OPENCL_FN_clReleaseProgram = 71,
OPENCL_FN_clReleaseSampler = 72,
OPENCL_FN_clRetainCommandQueue = 73,
OPENCL_FN_clRetainContext = 74,
OPENCL_FN_clRetainDevice = 75,
OPENCL_FN_clRetainEvent = 76,
OPENCL_FN_clRetainKernel = 77,
OPENCL_FN_clRetainMemObject = 78,
OPENCL_FN_clRetainProgram = 79,
OPENCL_FN_clRetainSampler = 80,
OPENCL_FN_clSetEventCallback = 81,
OPENCL_FN_clSetKernelArg = 82,
OPENCL_FN_clSetMemObjectDestructorCallback = 83,
OPENCL_FN_clSetUserEventStatus = 84,
OPENCL_FN_clUnloadCompiler = 85,
OPENCL_FN_clUnloadPlatformCompiler = 86,
OPENCL_FN_clWaitForEvents = 87,
};
namespace {
// generated by parser_cl.py
template <int ID, typename _R>
struct opencl_fn0
{
typedef _R (CL_API_CALL*FN)();
static _R CL_API_CALL switch_fn()
{ return ((FN)opencl_check_fn(ID))(); }
};
template <int ID, typename _R, typename _T1>
struct opencl_fn1
{
typedef _R (CL_API_CALL*FN)(_T1);
static _R CL_API_CALL switch_fn(_T1 p1)
{ return ((FN)opencl_check_fn(ID))(p1); }
};
template <int ID, typename _R, typename _T1, typename _T2>
struct opencl_fn2
{
typedef _R (CL_API_CALL*FN)(_T1, _T2);
static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2)
{ return ((FN)opencl_check_fn(ID))(p1, p2); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3>
struct opencl_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_check_fn(ID))(p1, p2, p3); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14>
struct opencl_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_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_int (CL_API_CALL*clBuildProgram)(cl_program, cl_uint, const cl_device_id*, const char*, void (CL_CALLBACK*) (cl_program, void*), void*) =
opencl_fn6<OPENCL_FN_clBuildProgram, cl_int, cl_program, cl_uint, const cl_device_id*, const char*, void (CL_CALLBACK*) (cl_program, void*), void*>::switch_fn;
static const struct DynamicFnEntry clBuildProgram_definition = { "clBuildProgram", (void**)&clBuildProgram};
cl_int (CL_API_CALL*clCompileProgram)(cl_program, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, const char**, void (CL_CALLBACK*) (cl_program, void*), void*) =
opencl_fn9<OPENCL_FN_clCompileProgram, cl_int, cl_program, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, const char**, void (CL_CALLBACK*) (cl_program, void*), void*>::switch_fn;
static const struct DynamicFnEntry clCompileProgram_definition = { "clCompileProgram", (void**)&clCompileProgram};
cl_mem (CL_API_CALL*clCreateBuffer)(cl_context, cl_mem_flags, size_t, void*, cl_int*) =
opencl_fn5<OPENCL_FN_clCreateBuffer, cl_mem, cl_context, cl_mem_flags, size_t, void*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateBuffer_definition = { "clCreateBuffer", (void**)&clCreateBuffer};
cl_command_queue (CL_API_CALL*clCreateCommandQueue)(cl_context, cl_device_id, cl_command_queue_properties, cl_int*) =
opencl_fn4<OPENCL_FN_clCreateCommandQueue, cl_command_queue, cl_context, cl_device_id, cl_command_queue_properties, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateCommandQueue_definition = { "clCreateCommandQueue", (void**)&clCreateCommandQueue};
cl_context (CL_API_CALL*clCreateContext)(const cl_context_properties*, cl_uint, const cl_device_id*, void (CL_CALLBACK*) (const char*, const void*, size_t, void*), void*, cl_int*) =
opencl_fn6<OPENCL_FN_clCreateContext, cl_context, const cl_context_properties*, cl_uint, const cl_device_id*, void (CL_CALLBACK*) (const char*, const void*, size_t, void*), void*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateContext_definition = { "clCreateContext", (void**)&clCreateContext};
cl_context (CL_API_CALL*clCreateContextFromType)(const cl_context_properties*, cl_device_type, void (CL_CALLBACK*) (const char*, const void*, size_t, void*), void*, cl_int*) =
opencl_fn5<OPENCL_FN_clCreateContextFromType, cl_context, const cl_context_properties*, cl_device_type, void (CL_CALLBACK*) (const char*, const void*, size_t, void*), void*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateContextFromType_definition = { "clCreateContextFromType", (void**)&clCreateContextFromType};
cl_mem (CL_API_CALL*clCreateImage)(cl_context, cl_mem_flags, const cl_image_format*, const cl_image_desc*, void*, cl_int*) =
opencl_fn6<OPENCL_FN_clCreateImage, cl_mem, cl_context, cl_mem_flags, const cl_image_format*, const cl_image_desc*, void*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateImage_definition = { "clCreateImage", (void**)&clCreateImage};
cl_mem (CL_API_CALL*clCreateImage2D)(cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, void*, cl_int*) =
opencl_fn8<OPENCL_FN_clCreateImage2D, cl_mem, cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, void*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateImage2D_definition = { "clCreateImage2D", (void**)&clCreateImage2D};
cl_mem (CL_API_CALL*clCreateImage3D)(cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, size_t, size_t, void*, cl_int*) =
opencl_fn10<OPENCL_FN_clCreateImage3D, cl_mem, cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, size_t, size_t, void*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateImage3D_definition = { "clCreateImage3D", (void**)&clCreateImage3D};
cl_kernel (CL_API_CALL*clCreateKernel)(cl_program, const char*, cl_int*) =
opencl_fn3<OPENCL_FN_clCreateKernel, cl_kernel, cl_program, const char*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateKernel_definition = { "clCreateKernel", (void**)&clCreateKernel};
cl_int (CL_API_CALL*clCreateKernelsInProgram)(cl_program, cl_uint, cl_kernel*, cl_uint*) =
opencl_fn4<OPENCL_FN_clCreateKernelsInProgram, cl_int, cl_program, cl_uint, cl_kernel*, cl_uint*>::switch_fn;
static const struct DynamicFnEntry clCreateKernelsInProgram_definition = { "clCreateKernelsInProgram", (void**)&clCreateKernelsInProgram};
cl_program (CL_API_CALL*clCreateProgramWithBinary)(cl_context, cl_uint, const cl_device_id*, const size_t*, const unsigned char**, cl_int*, cl_int*) =
opencl_fn7<OPENCL_FN_clCreateProgramWithBinary, cl_program, cl_context, cl_uint, const cl_device_id*, const size_t*, const unsigned char**, cl_int*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateProgramWithBinary_definition = { "clCreateProgramWithBinary", (void**)&clCreateProgramWithBinary};
cl_program (CL_API_CALL*clCreateProgramWithBuiltInKernels)(cl_context, cl_uint, const cl_device_id*, const char*, cl_int*) =
opencl_fn5<OPENCL_FN_clCreateProgramWithBuiltInKernels, cl_program, cl_context, cl_uint, const cl_device_id*, const char*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateProgramWithBuiltInKernels_definition = { "clCreateProgramWithBuiltInKernels", (void**)&clCreateProgramWithBuiltInKernels};
cl_program (CL_API_CALL*clCreateProgramWithSource)(cl_context, cl_uint, const char**, const size_t*, cl_int*) =
opencl_fn5<OPENCL_FN_clCreateProgramWithSource, cl_program, cl_context, cl_uint, const char**, const size_t*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateProgramWithSource_definition = { "clCreateProgramWithSource", (void**)&clCreateProgramWithSource};
cl_sampler (CL_API_CALL*clCreateSampler)(cl_context, cl_bool, cl_addressing_mode, cl_filter_mode, cl_int*) =
opencl_fn5<OPENCL_FN_clCreateSampler, cl_sampler, cl_context, cl_bool, cl_addressing_mode, cl_filter_mode, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateSampler_definition = { "clCreateSampler", (void**)&clCreateSampler};
cl_mem (CL_API_CALL*clCreateSubBuffer)(cl_mem, cl_mem_flags, cl_buffer_create_type, const void*, cl_int*) =
opencl_fn5<OPENCL_FN_clCreateSubBuffer, cl_mem, cl_mem, cl_mem_flags, cl_buffer_create_type, const void*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateSubBuffer_definition = { "clCreateSubBuffer", (void**)&clCreateSubBuffer};
cl_int (CL_API_CALL*clCreateSubDevices)(cl_device_id, const cl_device_partition_property*, cl_uint, cl_device_id*, cl_uint*) =
opencl_fn5<OPENCL_FN_clCreateSubDevices, cl_int, cl_device_id, const cl_device_partition_property*, cl_uint, cl_device_id*, cl_uint*>::switch_fn;
static const struct DynamicFnEntry clCreateSubDevices_definition = { "clCreateSubDevices", (void**)&clCreateSubDevices};
cl_event (CL_API_CALL*clCreateUserEvent)(cl_context, cl_int*) =
opencl_fn2<OPENCL_FN_clCreateUserEvent, cl_event, cl_context, cl_int*>::switch_fn;
static const struct DynamicFnEntry clCreateUserEvent_definition = { "clCreateUserEvent", (void**)&clCreateUserEvent};
cl_int (CL_API_CALL*clEnqueueBarrier)(cl_command_queue) =
opencl_fn1<OPENCL_FN_clEnqueueBarrier, cl_int, cl_command_queue>::switch_fn;
static const struct DynamicFnEntry clEnqueueBarrier_definition = { "clEnqueueBarrier", (void**)&clEnqueueBarrier};
cl_int (CL_API_CALL*clEnqueueBarrierWithWaitList)(cl_command_queue, cl_uint, const cl_event*, cl_event*) =
opencl_fn4<OPENCL_FN_clEnqueueBarrierWithWaitList, cl_int, cl_command_queue, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueBarrierWithWaitList_definition = { "clEnqueueBarrierWithWaitList", (void**)&clEnqueueBarrierWithWaitList};
cl_int (CL_API_CALL*clEnqueueCopyBuffer)(cl_command_queue, cl_mem, cl_mem, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*) =
opencl_fn9<OPENCL_FN_clEnqueueCopyBuffer, cl_int, cl_command_queue, cl_mem, cl_mem, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueCopyBuffer_definition = { "clEnqueueCopyBuffer", (void**)&clEnqueueCopyBuffer};
cl_int (CL_API_CALL*clEnqueueCopyBufferRect)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*) =
opencl_fn13<OPENCL_FN_clEnqueueCopyBufferRect, cl_int, cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueCopyBufferRect_definition = { "clEnqueueCopyBufferRect", (void**)&clEnqueueCopyBufferRect};
cl_int (CL_API_CALL*clEnqueueCopyBufferToImage)(cl_command_queue, cl_mem, cl_mem, size_t, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*) =
opencl_fn9<OPENCL_FN_clEnqueueCopyBufferToImage, cl_int, cl_command_queue, cl_mem, cl_mem, size_t, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueCopyBufferToImage_definition = { "clEnqueueCopyBufferToImage", (void**)&clEnqueueCopyBufferToImage};
cl_int (CL_API_CALL*clEnqueueCopyImage)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*) =
opencl_fn9<OPENCL_FN_clEnqueueCopyImage, cl_int, cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueCopyImage_definition = { "clEnqueueCopyImage", (void**)&clEnqueueCopyImage};
cl_int (CL_API_CALL*clEnqueueCopyImageToBuffer)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, size_t, cl_uint, const cl_event*, cl_event*) =
opencl_fn9<OPENCL_FN_clEnqueueCopyImageToBuffer, cl_int, cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, size_t, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueCopyImageToBuffer_definition = { "clEnqueueCopyImageToBuffer", (void**)&clEnqueueCopyImageToBuffer};
cl_int (CL_API_CALL*clEnqueueFillBuffer)(cl_command_queue, cl_mem, const void*, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*) =
opencl_fn9<OPENCL_FN_clEnqueueFillBuffer, cl_int, cl_command_queue, cl_mem, const void*, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueFillBuffer_definition = { "clEnqueueFillBuffer", (void**)&clEnqueueFillBuffer};
cl_int (CL_API_CALL*clEnqueueFillImage)(cl_command_queue, cl_mem, const void*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*) =
opencl_fn8<OPENCL_FN_clEnqueueFillImage, cl_int, cl_command_queue, cl_mem, const void*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueFillImage_definition = { "clEnqueueFillImage", (void**)&clEnqueueFillImage};
void* (CL_API_CALL*clEnqueueMapBuffer)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, size_t, size_t, cl_uint, const cl_event*, cl_event*, cl_int*) =
opencl_fn10<OPENCL_FN_clEnqueueMapBuffer, void*, cl_command_queue, cl_mem, cl_bool, cl_map_flags, size_t, size_t, cl_uint, const cl_event*, cl_event*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clEnqueueMapBuffer_definition = { "clEnqueueMapBuffer", (void**)&clEnqueueMapBuffer};
void* (CL_API_CALL*clEnqueueMapImage)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, const size_t*, const size_t*, size_t*, size_t*, cl_uint, const cl_event*, cl_event*, cl_int*) =
opencl_fn12<OPENCL_FN_clEnqueueMapImage, void*, cl_command_queue, cl_mem, cl_bool, cl_map_flags, const size_t*, const size_t*, size_t*, size_t*, cl_uint, const cl_event*, cl_event*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clEnqueueMapImage_definition = { "clEnqueueMapImage", (void**)&clEnqueueMapImage};
cl_int (CL_API_CALL*clEnqueueMarker)(cl_command_queue, cl_event*) =
opencl_fn2<OPENCL_FN_clEnqueueMarker, cl_int, cl_command_queue, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueMarker_definition = { "clEnqueueMarker", (void**)&clEnqueueMarker};
cl_int (CL_API_CALL*clEnqueueMarkerWithWaitList)(cl_command_queue, cl_uint, const cl_event*, cl_event*) =
opencl_fn4<OPENCL_FN_clEnqueueMarkerWithWaitList, cl_int, cl_command_queue, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueMarkerWithWaitList_definition = { "clEnqueueMarkerWithWaitList", (void**)&clEnqueueMarkerWithWaitList};
cl_int (CL_API_CALL*clEnqueueMigrateMemObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_mem_migration_flags, cl_uint, const cl_event*, cl_event*) =
opencl_fn7<OPENCL_FN_clEnqueueMigrateMemObjects, cl_int, cl_command_queue, cl_uint, const cl_mem*, cl_mem_migration_flags, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueMigrateMemObjects_definition = { "clEnqueueMigrateMemObjects", (void**)&clEnqueueMigrateMemObjects};
cl_int (CL_API_CALL*clEnqueueNDRangeKernel)(cl_command_queue, cl_kernel, cl_uint, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*) =
opencl_fn9<OPENCL_FN_clEnqueueNDRangeKernel, cl_int, cl_command_queue, cl_kernel, cl_uint, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueNDRangeKernel_definition = { "clEnqueueNDRangeKernel", (void**)&clEnqueueNDRangeKernel};
cl_int (CL_API_CALL*clEnqueueNativeKernel)(cl_command_queue, void (CL_CALLBACK*) (void*), void*, size_t, cl_uint, const cl_mem*, const void**, cl_uint, const cl_event*, cl_event*) =
opencl_fn10<OPENCL_FN_clEnqueueNativeKernel, cl_int, cl_command_queue, void (CL_CALLBACK*) (void*), void*, size_t, cl_uint, const cl_mem*, const void**, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueNativeKernel_definition = { "clEnqueueNativeKernel", (void**)&clEnqueueNativeKernel};
cl_int (CL_API_CALL*clEnqueueReadBuffer)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*) =
opencl_fn9<OPENCL_FN_clEnqueueReadBuffer, cl_int, cl_command_queue, cl_mem, cl_bool, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueReadBuffer_definition = { "clEnqueueReadBuffer", (void**)&clEnqueueReadBuffer};
cl_int (CL_API_CALL*clEnqueueReadBufferRect)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*) =
opencl_fn14<OPENCL_FN_clEnqueueReadBufferRect, cl_int, cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueReadBufferRect_definition = { "clEnqueueReadBufferRect", (void**)&clEnqueueReadBufferRect};
cl_int (CL_API_CALL*clEnqueueReadImage)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*) =
opencl_fn11<OPENCL_FN_clEnqueueReadImage, cl_int, cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueReadImage_definition = { "clEnqueueReadImage", (void**)&clEnqueueReadImage};
cl_int (CL_API_CALL*clEnqueueTask)(cl_command_queue, cl_kernel, cl_uint, const cl_event*, cl_event*) =
opencl_fn5<OPENCL_FN_clEnqueueTask, cl_int, cl_command_queue, cl_kernel, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueTask_definition = { "clEnqueueTask", (void**)&clEnqueueTask};
cl_int (CL_API_CALL*clEnqueueUnmapMemObject)(cl_command_queue, cl_mem, void*, cl_uint, const cl_event*, cl_event*) =
opencl_fn6<OPENCL_FN_clEnqueueUnmapMemObject, cl_int, cl_command_queue, cl_mem, void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueUnmapMemObject_definition = { "clEnqueueUnmapMemObject", (void**)&clEnqueueUnmapMemObject};
cl_int (CL_API_CALL*clEnqueueWaitForEvents)(cl_command_queue, cl_uint, const cl_event*) =
opencl_fn3<OPENCL_FN_clEnqueueWaitForEvents, cl_int, cl_command_queue, cl_uint, const cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueWaitForEvents_definition = { "clEnqueueWaitForEvents", (void**)&clEnqueueWaitForEvents};
cl_int (CL_API_CALL*clEnqueueWriteBuffer)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*) =
opencl_fn9<OPENCL_FN_clEnqueueWriteBuffer, cl_int, cl_command_queue, cl_mem, cl_bool, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueWriteBuffer_definition = { "clEnqueueWriteBuffer", (void**)&clEnqueueWriteBuffer};
cl_int (CL_API_CALL*clEnqueueWriteBufferRect)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*) =
opencl_fn14<OPENCL_FN_clEnqueueWriteBufferRect, cl_int, cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueWriteBufferRect_definition = { "clEnqueueWriteBufferRect", (void**)&clEnqueueWriteBufferRect};
cl_int (CL_API_CALL*clEnqueueWriteImage)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*) =
opencl_fn11<OPENCL_FN_clEnqueueWriteImage, cl_int, cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
static const struct DynamicFnEntry clEnqueueWriteImage_definition = { "clEnqueueWriteImage", (void**)&clEnqueueWriteImage};
cl_int (CL_API_CALL*clFinish)(cl_command_queue) =
opencl_fn1<OPENCL_FN_clFinish, cl_int, cl_command_queue>::switch_fn;
static const struct DynamicFnEntry clFinish_definition = { "clFinish", (void**)&clFinish};
cl_int (CL_API_CALL*clFlush)(cl_command_queue) =
opencl_fn1<OPENCL_FN_clFlush, cl_int, cl_command_queue>::switch_fn;
static const struct DynamicFnEntry clFlush_definition = { "clFlush", (void**)&clFlush};
cl_int (CL_API_CALL*clGetCommandQueueInfo)(cl_command_queue, cl_command_queue_info, size_t, void*, size_t*) =
opencl_fn5<OPENCL_FN_clGetCommandQueueInfo, cl_int, cl_command_queue, cl_command_queue_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetCommandQueueInfo_definition = { "clGetCommandQueueInfo", (void**)&clGetCommandQueueInfo};
cl_int (CL_API_CALL*clGetContextInfo)(cl_context, cl_context_info, size_t, void*, size_t*) =
opencl_fn5<OPENCL_FN_clGetContextInfo, cl_int, cl_context, cl_context_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetContextInfo_definition = { "clGetContextInfo", (void**)&clGetContextInfo};
cl_int (CL_API_CALL*clGetDeviceIDs)(cl_platform_id, cl_device_type, cl_uint, cl_device_id*, cl_uint*) =
opencl_fn5<OPENCL_FN_clGetDeviceIDs, cl_int, cl_platform_id, cl_device_type, cl_uint, cl_device_id*, cl_uint*>::switch_fn;
static const struct DynamicFnEntry clGetDeviceIDs_definition = { "clGetDeviceIDs", (void**)&clGetDeviceIDs};
cl_int (CL_API_CALL*clGetDeviceInfo)(cl_device_id, cl_device_info, size_t, void*, size_t*) =
opencl_fn5<OPENCL_FN_clGetDeviceInfo, cl_int, cl_device_id, cl_device_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetDeviceInfo_definition = { "clGetDeviceInfo", (void**)&clGetDeviceInfo};
cl_int (CL_API_CALL*clGetEventInfo)(cl_event, cl_event_info, size_t, void*, size_t*) =
opencl_fn5<OPENCL_FN_clGetEventInfo, cl_int, cl_event, cl_event_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetEventInfo_definition = { "clGetEventInfo", (void**)&clGetEventInfo};
cl_int (CL_API_CALL*clGetEventProfilingInfo)(cl_event, cl_profiling_info, size_t, void*, size_t*) =
opencl_fn5<OPENCL_FN_clGetEventProfilingInfo, cl_int, cl_event, cl_profiling_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetEventProfilingInfo_definition = { "clGetEventProfilingInfo", (void**)&clGetEventProfilingInfo};
void* (CL_API_CALL*clGetExtensionFunctionAddress)(const char*) =
opencl_fn1<OPENCL_FN_clGetExtensionFunctionAddress, void*, const char*>::switch_fn;
static const struct DynamicFnEntry clGetExtensionFunctionAddress_definition = { "clGetExtensionFunctionAddress", (void**)&clGetExtensionFunctionAddress};
void* (CL_API_CALL*clGetExtensionFunctionAddressForPlatform)(cl_platform_id, const char*) =
opencl_fn2<OPENCL_FN_clGetExtensionFunctionAddressForPlatform, void*, cl_platform_id, const char*>::switch_fn;
static const struct DynamicFnEntry clGetExtensionFunctionAddressForPlatform_definition = { "clGetExtensionFunctionAddressForPlatform", (void**)&clGetExtensionFunctionAddressForPlatform};
cl_int (CL_API_CALL*clGetImageInfo)(cl_mem, cl_image_info, size_t, void*, size_t*) =
opencl_fn5<OPENCL_FN_clGetImageInfo, cl_int, cl_mem, cl_image_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetImageInfo_definition = { "clGetImageInfo", (void**)&clGetImageInfo};
cl_int (CL_API_CALL*clGetKernelArgInfo)(cl_kernel, cl_uint, cl_kernel_arg_info, size_t, void*, size_t*) =
opencl_fn6<OPENCL_FN_clGetKernelArgInfo, cl_int, cl_kernel, cl_uint, cl_kernel_arg_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetKernelArgInfo_definition = { "clGetKernelArgInfo", (void**)&clGetKernelArgInfo};
cl_int (CL_API_CALL*clGetKernelInfo)(cl_kernel, cl_kernel_info, size_t, void*, size_t*) =
opencl_fn5<OPENCL_FN_clGetKernelInfo, cl_int, cl_kernel, cl_kernel_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetKernelInfo_definition = { "clGetKernelInfo", (void**)&clGetKernelInfo};
cl_int (CL_API_CALL*clGetKernelWorkGroupInfo)(cl_kernel, cl_device_id, cl_kernel_work_group_info, size_t, void*, size_t*) =
opencl_fn6<OPENCL_FN_clGetKernelWorkGroupInfo, cl_int, cl_kernel, cl_device_id, cl_kernel_work_group_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetKernelWorkGroupInfo_definition = { "clGetKernelWorkGroupInfo", (void**)&clGetKernelWorkGroupInfo};
cl_int (CL_API_CALL*clGetMemObjectInfo)(cl_mem, cl_mem_info, size_t, void*, size_t*) =
opencl_fn5<OPENCL_FN_clGetMemObjectInfo, cl_int, cl_mem, cl_mem_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetMemObjectInfo_definition = { "clGetMemObjectInfo", (void**)&clGetMemObjectInfo};
cl_int (CL_API_CALL*clGetPlatformIDs)(cl_uint, cl_platform_id*, cl_uint*) =
opencl_fn3<OPENCL_FN_clGetPlatformIDs, cl_int, cl_uint, cl_platform_id*, cl_uint*>::switch_fn;
static const struct DynamicFnEntry clGetPlatformIDs_definition = { "clGetPlatformIDs", (void**)&clGetPlatformIDs};
cl_int (CL_API_CALL*clGetPlatformInfo)(cl_platform_id, cl_platform_info, size_t, void*, size_t*) =
opencl_fn5<OPENCL_FN_clGetPlatformInfo, cl_int, cl_platform_id, cl_platform_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetPlatformInfo_definition = { "clGetPlatformInfo", (void**)&clGetPlatformInfo};
cl_int (CL_API_CALL*clGetProgramBuildInfo)(cl_program, cl_device_id, cl_program_build_info, size_t, void*, size_t*) =
opencl_fn6<OPENCL_FN_clGetProgramBuildInfo, cl_int, cl_program, cl_device_id, cl_program_build_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetProgramBuildInfo_definition = { "clGetProgramBuildInfo", (void**)&clGetProgramBuildInfo};
cl_int (CL_API_CALL*clGetProgramInfo)(cl_program, cl_program_info, size_t, void*, size_t*) =
opencl_fn5<OPENCL_FN_clGetProgramInfo, cl_int, cl_program, cl_program_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetProgramInfo_definition = { "clGetProgramInfo", (void**)&clGetProgramInfo};
cl_int (CL_API_CALL*clGetSamplerInfo)(cl_sampler, cl_sampler_info, size_t, void*, size_t*) =
opencl_fn5<OPENCL_FN_clGetSamplerInfo, cl_int, cl_sampler, cl_sampler_info, size_t, void*, size_t*>::switch_fn;
static const struct DynamicFnEntry clGetSamplerInfo_definition = { "clGetSamplerInfo", (void**)&clGetSamplerInfo};
cl_int (CL_API_CALL*clGetSupportedImageFormats)(cl_context, cl_mem_flags, cl_mem_object_type, cl_uint, cl_image_format*, cl_uint*) =
opencl_fn6<OPENCL_FN_clGetSupportedImageFormats, cl_int, cl_context, cl_mem_flags, cl_mem_object_type, cl_uint, cl_image_format*, cl_uint*>::switch_fn;
static const struct DynamicFnEntry clGetSupportedImageFormats_definition = { "clGetSupportedImageFormats", (void**)&clGetSupportedImageFormats};
cl_program (CL_API_CALL*clLinkProgram)(cl_context, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, void (CL_CALLBACK*) (cl_program, void*), void*, cl_int*) =
opencl_fn9<OPENCL_FN_clLinkProgram, cl_program, cl_context, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, void (CL_CALLBACK*) (cl_program, void*), void*, cl_int*>::switch_fn;
static const struct DynamicFnEntry clLinkProgram_definition = { "clLinkProgram", (void**)&clLinkProgram};
cl_int (CL_API_CALL*clReleaseCommandQueue)(cl_command_queue) =
opencl_fn1<OPENCL_FN_clReleaseCommandQueue, cl_int, cl_command_queue>::switch_fn;
static const struct DynamicFnEntry clReleaseCommandQueue_definition = { "clReleaseCommandQueue", (void**)&clReleaseCommandQueue};
cl_int (CL_API_CALL*clReleaseContext)(cl_context) =
opencl_fn1<OPENCL_FN_clReleaseContext, cl_int, cl_context>::switch_fn;
static const struct DynamicFnEntry clReleaseContext_definition = { "clReleaseContext", (void**)&clReleaseContext};
cl_int (CL_API_CALL*clReleaseDevice)(cl_device_id) =
opencl_fn1<OPENCL_FN_clReleaseDevice, cl_int, cl_device_id>::switch_fn;
static const struct DynamicFnEntry clReleaseDevice_definition = { "clReleaseDevice", (void**)&clReleaseDevice};
cl_int (CL_API_CALL*clReleaseEvent)(cl_event) =
opencl_fn1<OPENCL_FN_clReleaseEvent, cl_int, cl_event>::switch_fn;
static const struct DynamicFnEntry clReleaseEvent_definition = { "clReleaseEvent", (void**)&clReleaseEvent};
cl_int (CL_API_CALL*clReleaseKernel)(cl_kernel) =
opencl_fn1<OPENCL_FN_clReleaseKernel, cl_int, cl_kernel>::switch_fn;
static const struct DynamicFnEntry clReleaseKernel_definition = { "clReleaseKernel", (void**)&clReleaseKernel};
cl_int (CL_API_CALL*clReleaseMemObject)(cl_mem) =
opencl_fn1<OPENCL_FN_clReleaseMemObject, cl_int, cl_mem>::switch_fn;
static const struct DynamicFnEntry clReleaseMemObject_definition = { "clReleaseMemObject", (void**)&clReleaseMemObject};
cl_int (CL_API_CALL*clReleaseProgram)(cl_program) =
opencl_fn1<OPENCL_FN_clReleaseProgram, cl_int, cl_program>::switch_fn;
static const struct DynamicFnEntry clReleaseProgram_definition = { "clReleaseProgram", (void**)&clReleaseProgram};
cl_int (CL_API_CALL*clReleaseSampler)(cl_sampler) =
opencl_fn1<OPENCL_FN_clReleaseSampler, cl_int, cl_sampler>::switch_fn;
static const struct DynamicFnEntry clReleaseSampler_definition = { "clReleaseSampler", (void**)&clReleaseSampler};
cl_int (CL_API_CALL*clRetainCommandQueue)(cl_command_queue) =
opencl_fn1<OPENCL_FN_clRetainCommandQueue, cl_int, cl_command_queue>::switch_fn;
static const struct DynamicFnEntry clRetainCommandQueue_definition = { "clRetainCommandQueue", (void**)&clRetainCommandQueue};
cl_int (CL_API_CALL*clRetainContext)(cl_context) =
opencl_fn1<OPENCL_FN_clRetainContext, cl_int, cl_context>::switch_fn;
static const struct DynamicFnEntry clRetainContext_definition = { "clRetainContext", (void**)&clRetainContext};
cl_int (CL_API_CALL*clRetainDevice)(cl_device_id) =
opencl_fn1<OPENCL_FN_clRetainDevice, cl_int, cl_device_id>::switch_fn;
static const struct DynamicFnEntry clRetainDevice_definition = { "clRetainDevice", (void**)&clRetainDevice};
cl_int (CL_API_CALL*clRetainEvent)(cl_event) =
opencl_fn1<OPENCL_FN_clRetainEvent, cl_int, cl_event>::switch_fn;
static const struct DynamicFnEntry clRetainEvent_definition = { "clRetainEvent", (void**)&clRetainEvent};
cl_int (CL_API_CALL*clRetainKernel)(cl_kernel) =
opencl_fn1<OPENCL_FN_clRetainKernel, cl_int, cl_kernel>::switch_fn;
static const struct DynamicFnEntry clRetainKernel_definition = { "clRetainKernel", (void**)&clRetainKernel};
cl_int (CL_API_CALL*clRetainMemObject)(cl_mem) =
opencl_fn1<OPENCL_FN_clRetainMemObject, cl_int, cl_mem>::switch_fn;
static const struct DynamicFnEntry clRetainMemObject_definition = { "clRetainMemObject", (void**)&clRetainMemObject};
cl_int (CL_API_CALL*clRetainProgram)(cl_program) =
opencl_fn1<OPENCL_FN_clRetainProgram, cl_int, cl_program>::switch_fn;
static const struct DynamicFnEntry clRetainProgram_definition = { "clRetainProgram", (void**)&clRetainProgram};
cl_int (CL_API_CALL*clRetainSampler)(cl_sampler) =
opencl_fn1<OPENCL_FN_clRetainSampler, cl_int, cl_sampler>::switch_fn;
static const struct DynamicFnEntry clRetainSampler_definition = { "clRetainSampler", (void**)&clRetainSampler};
cl_int (CL_API_CALL*clSetEventCallback)(cl_event, cl_int, void (CL_CALLBACK*) (cl_event, cl_int, void*), void*) =
opencl_fn4<OPENCL_FN_clSetEventCallback, cl_int, cl_event, cl_int, void (CL_CALLBACK*) (cl_event, cl_int, void*), void*>::switch_fn;
static const struct DynamicFnEntry clSetEventCallback_definition = { "clSetEventCallback", (void**)&clSetEventCallback};
cl_int (CL_API_CALL*clSetKernelArg)(cl_kernel, cl_uint, size_t, const void*) =
opencl_fn4<OPENCL_FN_clSetKernelArg, cl_int, cl_kernel, cl_uint, size_t, const void*>::switch_fn;
static const struct DynamicFnEntry clSetKernelArg_definition = { "clSetKernelArg", (void**)&clSetKernelArg};
cl_int (CL_API_CALL*clSetMemObjectDestructorCallback)(cl_mem, void (CL_CALLBACK*) (cl_mem, void*), void*) =
opencl_fn3<OPENCL_FN_clSetMemObjectDestructorCallback, cl_int, cl_mem, void (CL_CALLBACK*) (cl_mem, void*), void*>::switch_fn;
static const struct DynamicFnEntry clSetMemObjectDestructorCallback_definition = { "clSetMemObjectDestructorCallback", (void**)&clSetMemObjectDestructorCallback};
cl_int (CL_API_CALL*clSetUserEventStatus)(cl_event, cl_int) =
opencl_fn2<OPENCL_FN_clSetUserEventStatus, cl_int, cl_event, cl_int>::switch_fn;
static const struct DynamicFnEntry clSetUserEventStatus_definition = { "clSetUserEventStatus", (void**)&clSetUserEventStatus};
cl_int (CL_API_CALL*clUnloadCompiler)() =
opencl_fn0<OPENCL_FN_clUnloadCompiler, cl_int>::switch_fn;
static const struct DynamicFnEntry clUnloadCompiler_definition = { "clUnloadCompiler", (void**)&clUnloadCompiler};
cl_int (CL_API_CALL*clUnloadPlatformCompiler)(cl_platform_id) =
opencl_fn1<OPENCL_FN_clUnloadPlatformCompiler, cl_int, cl_platform_id>::switch_fn;
static const struct DynamicFnEntry clUnloadPlatformCompiler_definition = { "clUnloadPlatformCompiler", (void**)&clUnloadPlatformCompiler};
cl_int (CL_API_CALL*clWaitForEvents)(cl_uint, const cl_event*) =
opencl_fn2<OPENCL_FN_clWaitForEvents, cl_int, cl_uint, const cl_event*>::switch_fn;
static const struct DynamicFnEntry clWaitForEvents_definition = { "clWaitForEvents", (void**)&clWaitForEvents};
// generated by parser_cl.py
static const struct DynamicFnEntry* opencl_fn_list[] = {
&clBuildProgram_definition,
&clCompileProgram_definition,
&clCreateBuffer_definition,
&clCreateCommandQueue_definition,
&clCreateContext_definition,
&clCreateContextFromType_definition,
&clCreateImage_definition,
&clCreateImage2D_definition,
&clCreateImage3D_definition,
&clCreateKernel_definition,
&clCreateKernelsInProgram_definition,
&clCreateProgramWithBinary_definition,
&clCreateProgramWithBuiltInKernels_definition,
&clCreateProgramWithSource_definition,
&clCreateSampler_definition,
&clCreateSubBuffer_definition,
&clCreateSubDevices_definition,
&clCreateUserEvent_definition,
&clEnqueueBarrier_definition,
&clEnqueueBarrierWithWaitList_definition,
&clEnqueueCopyBuffer_definition,
&clEnqueueCopyBufferRect_definition,
&clEnqueueCopyBufferToImage_definition,
&clEnqueueCopyImage_definition,
&clEnqueueCopyImageToBuffer_definition,
&clEnqueueFillBuffer_definition,
&clEnqueueFillImage_definition,
&clEnqueueMapBuffer_definition,
&clEnqueueMapImage_definition,
&clEnqueueMarker_definition,
&clEnqueueMarkerWithWaitList_definition,
&clEnqueueMigrateMemObjects_definition,
&clEnqueueNDRangeKernel_definition,
&clEnqueueNativeKernel_definition,
&clEnqueueReadBuffer_definition,
&clEnqueueReadBufferRect_definition,
&clEnqueueReadImage_definition,
&clEnqueueTask_definition,
&clEnqueueUnmapMemObject_definition,
&clEnqueueWaitForEvents_definition,
&clEnqueueWriteBuffer_definition,
&clEnqueueWriteBufferRect_definition,
&clEnqueueWriteImage_definition,
&clFinish_definition,
&clFlush_definition,
&clGetCommandQueueInfo_definition,
&clGetContextInfo_definition,
&clGetDeviceIDs_definition,
&clGetDeviceInfo_definition,
&clGetEventInfo_definition,
&clGetEventProfilingInfo_definition,
&clGetExtensionFunctionAddress_definition,
&clGetExtensionFunctionAddressForPlatform_definition,
&clGetImageInfo_definition,
&clGetKernelArgInfo_definition,
&clGetKernelInfo_definition,
&clGetKernelWorkGroupInfo_definition,
&clGetMemObjectInfo_definition,
&clGetPlatformIDs_definition,
&clGetPlatformInfo_definition,
&clGetProgramBuildInfo_definition,
&clGetProgramInfo_definition,
&clGetSamplerInfo_definition,
&clGetSupportedImageFormats_definition,
&clLinkProgram_definition,
&clReleaseCommandQueue_definition,
&clReleaseContext_definition,
&clReleaseDevice_definition,
&clReleaseEvent_definition,
&clReleaseKernel_definition,
&clReleaseMemObject_definition,
&clReleaseProgram_definition,
&clReleaseSampler_definition,
&clRetainCommandQueue_definition,
&clRetainContext_definition,
&clRetainDevice_definition,
&clRetainEvent_definition,
&clRetainKernel_definition,
&clRetainMemObject_definition,
&clRetainProgram_definition,
&clRetainSampler_definition,
&clSetEventCallback_definition,
&clSetKernelArg_definition,
&clSetMemObjectDestructorCallback_definition,
&clSetUserEventStatus_definition,
&clUnloadCompiler_definition,
&clUnloadPlatformCompiler_definition,
&clWaitForEvents_definition,
ADDITIONAL_FN_DEFINITIONS // macro for custom functions
};
// number of enabled functions: 88
...@@ -65,6 +65,7 @@ def getParameters(i, tokens): ...@@ -65,6 +65,7 @@ def getParameters(i, tokens):
return params return params
def postProcessParameters(fns): def postProcessParameters(fns):
fns.sort(key=lambda x: x['name'])
for fn in fns: for fn in fns:
fn['params_full'] = list(fn['params']) fn['params_full'] = list(fn['params'])
for i in range(len(fn['params'])): for i in range(len(fn['params'])):
...@@ -79,6 +80,35 @@ def postProcessParameters(fns): ...@@ -79,6 +80,35 @@ def postProcessParameters(fns):
del parts[-1] del parts[-1]
fn['params'][i] = ' '.join(parts) fn['params'][i] = ' '.join(parts)
def readFunctionFilter(fns, fileName):
try:
f = open(fileName, "r")
except:
print "ERROR: Can't open filter file: %s" % fileName
return 0
count = 0
while f:
line = f.readline()
if not line:
break
assert isinstance(line, str)
if line.startswith('#') or line.startswith('//'):
continue
line = line.replace('\n', '')
if len(line) == 0:
continue
found = False
for fn in fns:
if fn['name'] == line:
found = True
fn['enabled'] = True
if not found:
sys.exit("FATAL ERROR: Unknown function: %s" % line)
count = count + 1
f.close()
return count
# #
# Generator helpers # Generator helpers
# #
...@@ -92,7 +122,7 @@ def outputToString(f): ...@@ -92,7 +122,7 @@ def outputToString(f):
assert res is None assert res is None
sys.stdout = old_stdout sys.stdout = old_stdout
result = str_stdout.getvalue() result = str_stdout.getvalue()
result = re.sub(r'([^\n ]) [ ]+', r'\1 ', result) # don't remove spaces at start of line result = re.sub(r'([^\n /]) [ ]+', r'\1 ', result) # don't remove spaces at start of line
result = re.sub(r' ,', ',', result) result = re.sub(r' ,', ',', result)
result = re.sub(r' \*', '*', result) result = re.sub(r' \*', '*', result)
result = re.sub(r'\( ', '(', result) result = re.sub(r'\( ', '(', result)
...@@ -101,29 +131,48 @@ def outputToString(f): ...@@ -101,29 +131,48 @@ def outputToString(f):
return wrapped return wrapped
@outputToString @outputToString
def generateEnums(fns, prefix='OPENCL_FN'): def generateFilterNames(fns):
for fn in fns:
print '%s%s' % ('' if fn.has_key('enabled') else '//', fn['name'])
print '#total %d' % len(fns)
@outputToString
def generateStructDefinitions(fns, lprefix='opencl_fn', enumprefix='OPENCL_FN'):
print '// generated by %s' % os.path.basename(sys.argv[0]) print '// generated by %s' % os.path.basename(sys.argv[0])
print 'enum %s_ID {' % prefix
first = True first = True
for fn in fns: for fn in fns:
print ' %s_%s%s,' % (prefix, fn['name'], ' = 0' if first else '') commentStr = '' if fn.has_key('enabled') else '//'
print commentStr + ('%s%s (%s *%s)(%s) =\n%s %s%d<%s_%s, %s%s>::switch_fn;' % \
((' '.join(fn['modifiers'] + ' ') if len(fn['modifiers']) > 0 else ''),
' '.join(fn['ret']), ' '.join(fn['calling']), fn['name'], ', '.join(fn['params']), \
commentStr, lprefix, len(fn['params']), enumprefix, fn['name'], ' '.join(fn['ret']), ('' if len(fn['params']) == 0 else ', ' + ', '.join(fn['params']))))
print commentStr + ('static const struct DynamicFnEntry %s_definition = { "%s", (void**)&%s};' % (fn['name'], fn['name'], fn['name']))
print
first = False first = False
print '};'
@outputToString @outputToString
def generateNames(fns, prefix='opencl_fn'): def generateListOfDefinitions(fns, name='opencl_fn_list'):
print '// generated by %s' % os.path.basename(sys.argv[0]) print '// generated by %s' % os.path.basename(sys.argv[0])
print 'const char* %s_names[] = {' % prefix print 'static const struct DynamicFnEntry* %s[] = {' % (name)
for fn in fns: for fn in fns:
print ' "%s",' % (fn['name']) commentStr = '' if fn.has_key('enabled') else '//'
if fn.has_key('enabled'):
print ' &%s_definition,' % (fn['name'])
else:
print ' NULL/*&%s_definition*/,' % (fn['name'])
first = False
print ' ADDITIONAL_FN_DEFINITIONS // macro for custom functions'
print '};' print '};'
@outputToString @outputToString
def generatePtrs(fns, prefix='opencl_fn'): def generateEnums(fns, prefix='OPENCL_FN'):
print '// generated by %s' % os.path.basename(sys.argv[0]) print '// generated by %s' % os.path.basename(sys.argv[0])
print 'void* %s_ptrs[] = {' % prefix print 'enum %s_ID {' % prefix
i = -1
for fn in fns: for fn in fns:
print ' &%s,' % (fn['name']) i = i + 1
commentStr = '' if fn.has_key('enabled') else '//'
print commentStr + (' %s_%s = %d,' % (prefix, fn['name'], i))
print '};' print '};'
@outputToString @outputToString
...@@ -137,28 +186,16 @@ def generateRemapDynamic(fns): ...@@ -137,28 +186,16 @@ def generateRemapDynamic(fns):
print '// generated by %s' % os.path.basename(sys.argv[0]) print '// generated by %s' % os.path.basename(sys.argv[0])
for fn in fns: for fn in fns:
print '#undef %s' % (fn['name']) print '#undef %s' % (fn['name'])
print '#define %s %s_pfn' % (fn['name'], fn['name']) commentStr = '' if fn.has_key('enabled') else '//'
print commentStr + ('#define %s %s_pfn' % (fn['name'], fn['name']))
@outputToString
def generateParamsCfg(fns):
for fn in fns:
print '%s %d' % (fn['name'], len(fn['params']))
@outputToString @outputToString
def generateFnDeclaration(fns): def generateFnDeclaration(fns):
print '// generated by %s' % os.path.basename(sys.argv[0]) print '// generated by %s' % os.path.basename(sys.argv[0])
for fn in fns: for fn in fns:
print 'extern CL_RUNTIME_EXPORT %s %s (%s *%s)(%s);' % (' '.join(fn['modifiers']), ' '.join(fn['ret']), ' '.join(fn['calling']), commentStr = '' if fn.has_key('enabled') else '//'
fn['name'], ', '.join(fn['params'] if not fn.has_key('params_full') else fn['params_full'])) print commentStr + ('extern CL_RUNTIME_EXPORT %s %s (%s *%s)(%s);' % (' '.join(fn['modifiers']), ' '.join(fn['ret']), ' '.join(fn['calling']),
fn['name'], ', '.join(fn['params'] if not fn.has_key('params_full') else fn['params_full'])))
@outputToString
def generateFnDefinition(fns, lprefix='opencl_fn', uprefix='OPENCL_FN'):
print '// generated by %s' % os.path.basename(sys.argv[0])
for fn in fns:
print '%s%s (%s *%s)(%s) = %s%d<%s_%s, %s%s>::switch_fn;' % \
((' '.join(fn['modifiers'] + ' ') if len(fn['modifiers']) > 0 else ''),
' '.join(fn['ret']), ' '.join(fn['calling']), fn['name'], ', '.join(fn['params']), \
lprefix, len(fn['params']), uprefix, fn['name'], ' '.join(fn['ret']), ('' if len(fn['params']) == 0 else ', ' + ', '.join(fn['params'])))
@outputToString @outputToString
def generateTemplates(sz, lprefix, switch_name, calling_convention=''): def generateTemplates(sz, lprefix, switch_name, calling_convention=''):
...@@ -186,8 +223,9 @@ def generateTemplates(sz, lprefix, switch_name, calling_convention=''): ...@@ -186,8 +223,9 @@ def generateTemplates(sz, lprefix, switch_name, calling_convention=''):
def generateInlineWrappers(fns): def generateInlineWrappers(fns):
print '// generated by %s' % os.path.basename(sys.argv[0]) print '// generated by %s' % os.path.basename(sys.argv[0])
for fn in fns: for fn in fns:
commentStr = '' if fn.has_key('enabled') else '//'
print '#undef %s' % (fn['name']) print '#undef %s' % (fn['name'])
print '#define %s %s_fn' % (fn['name'], fn['name']) print commentStr + ('#define %s %s_fn' % (fn['name'], fn['name']))
params = [] params = []
call_params = [] call_params = []
for i in range(0, len(fn['params'])): for i in range(0, len(fn['params'])):
...@@ -200,11 +238,11 @@ def generateInlineWrappers(fns): ...@@ -200,11 +238,11 @@ def generateInlineWrappers(fns):
call_params.append('p%d' % (i)) call_params.append('p%d' % (i))
if len(fn['ret']) == 1 and fn['ret'][0] == 'void': if len(fn['ret']) == 1 and fn['ret'][0] == 'void':
print 'inline void %s(%s) { %s_pfn(%s); }' \ print commentStr + ('inline void %s(%s) { %s_pfn(%s); }' \
% (fn['name'], ', '.join(params), fn['name'], ', '.join(call_params)) % (fn['name'], ', '.join(params), fn['name'], ', '.join(call_params)))
else: else:
print 'inline %s %s(%s) { return %s_pfn(%s); }' \ print commentStr + ('inline %s %s(%s) { return %s_pfn(%s); }' \
% (' '.join(fn['ret']), fn['name'], ', '.join(params), fn['name'], ', '.join(call_params)) % (' '.join(fn['ret']), fn['name'], ', '.join(params), fn['name'], ', '.join(call_params)))
def ProcessTemplate(inputFile, ctx, noteLine='//\n// AUTOGENERATED, DO NOT EDIT\n//'): def ProcessTemplate(inputFile, ctx, noteLine='//\n// AUTOGENERATED, DO NOT EDIT\n//'):
f = open(inputFile, "r") f = open(inputFile, "r")
......
//clAmdBlasAddScratchImage
//clAmdBlasCaxpy
//clAmdBlasCcopy
//clAmdBlasCdotc
//clAmdBlasCdotu
//clAmdBlasCgbmv
//clAmdBlasCgemm
clAmdBlasCgemmEx
//clAmdBlasCgemv
//clAmdBlasCgemvEx
//clAmdBlasCgerc
//clAmdBlasCgeru
//clAmdBlasChbmv
//clAmdBlasChemm
//clAmdBlasChemv
//clAmdBlasCher
//clAmdBlasCher2
//clAmdBlasCher2k
//clAmdBlasCherk
//clAmdBlasChpmv
//clAmdBlasChpr
//clAmdBlasChpr2
//clAmdBlasCrotg
//clAmdBlasCscal
//clAmdBlasCsrot
//clAmdBlasCsscal
//clAmdBlasCswap
//clAmdBlasCsymm
//clAmdBlasCsyr2k
//clAmdBlasCsyr2kEx
//clAmdBlasCsyrk
//clAmdBlasCsyrkEx
//clAmdBlasCtbmv
//clAmdBlasCtbsv
//clAmdBlasCtpmv
//clAmdBlasCtpsv
//clAmdBlasCtrmm
//clAmdBlasCtrmmEx
//clAmdBlasCtrmv
//clAmdBlasCtrsm
//clAmdBlasCtrsmEx
//clAmdBlasCtrsv
//clAmdBlasDasum
//clAmdBlasDaxpy
//clAmdBlasDcopy
//clAmdBlasDdot
//clAmdBlasDgbmv
//clAmdBlasDgemm
clAmdBlasDgemmEx
//clAmdBlasDgemv
//clAmdBlasDgemvEx
//clAmdBlasDger
//clAmdBlasDnrm2
//clAmdBlasDrot
//clAmdBlasDrotg
//clAmdBlasDrotm
//clAmdBlasDrotmg
//clAmdBlasDsbmv
//clAmdBlasDscal
//clAmdBlasDspmv
//clAmdBlasDspr
//clAmdBlasDspr2
//clAmdBlasDswap
//clAmdBlasDsymm
//clAmdBlasDsymv
//clAmdBlasDsymvEx
//clAmdBlasDsyr
//clAmdBlasDsyr2
//clAmdBlasDsyr2k
//clAmdBlasDsyr2kEx
//clAmdBlasDsyrk
//clAmdBlasDsyrkEx
//clAmdBlasDtbmv
//clAmdBlasDtbsv
//clAmdBlasDtpmv
//clAmdBlasDtpsv
//clAmdBlasDtrmm
//clAmdBlasDtrmmEx
//clAmdBlasDtrmv
//clAmdBlasDtrsm
//clAmdBlasDtrsmEx
//clAmdBlasDtrsv
//clAmdBlasDzasum
//clAmdBlasDznrm2
//clAmdBlasGetVersion
//clAmdBlasRemoveScratchImage
//clAmdBlasSasum
//clAmdBlasSaxpy
//clAmdBlasScasum
//clAmdBlasScnrm2
//clAmdBlasScopy
//clAmdBlasSdot
clAmdBlasSetup
//clAmdBlasSgbmv
//clAmdBlasSgemm
clAmdBlasSgemmEx
//clAmdBlasSgemv
//clAmdBlasSgemvEx
//clAmdBlasSger
//clAmdBlasSnrm2
//clAmdBlasSrot
//clAmdBlasSrotg
//clAmdBlasSrotm
//clAmdBlasSrotmg
//clAmdBlasSsbmv
//clAmdBlasSscal
//clAmdBlasSspmv
//clAmdBlasSspr
//clAmdBlasSspr2
//clAmdBlasSswap
//clAmdBlasSsymm
//clAmdBlasSsymv
//clAmdBlasSsymvEx
//clAmdBlasSsyr
//clAmdBlasSsyr2
//clAmdBlasSsyr2k
//clAmdBlasSsyr2kEx
//clAmdBlasSsyrk
//clAmdBlasSsyrkEx
//clAmdBlasStbmv
//clAmdBlasStbsv
//clAmdBlasStpmv
//clAmdBlasStpsv
//clAmdBlasStrmm
//clAmdBlasStrmmEx
//clAmdBlasStrmv
//clAmdBlasStrsm
//clAmdBlasStrsmEx
//clAmdBlasStrsv
clAmdBlasTeardown
//clAmdBlasZaxpy
//clAmdBlasZcopy
//clAmdBlasZdotc
//clAmdBlasZdotu
//clAmdBlasZdrot
//clAmdBlasZdscal
//clAmdBlasZgbmv
//clAmdBlasZgemm
clAmdBlasZgemmEx
//clAmdBlasZgemv
//clAmdBlasZgemvEx
//clAmdBlasZgerc
//clAmdBlasZgeru
//clAmdBlasZhbmv
//clAmdBlasZhemm
//clAmdBlasZhemv
//clAmdBlasZher
//clAmdBlasZher2
//clAmdBlasZher2k
//clAmdBlasZherk
//clAmdBlasZhpmv
//clAmdBlasZhpr
//clAmdBlasZhpr2
//clAmdBlasZrotg
//clAmdBlasZscal
//clAmdBlasZswap
//clAmdBlasZsymm
//clAmdBlasZsyr2k
//clAmdBlasZsyr2kEx
//clAmdBlasZsyrk
//clAmdBlasZsyrkEx
//clAmdBlasZtbmv
//clAmdBlasZtbsv
//clAmdBlasZtpmv
//clAmdBlasZtpsv
//clAmdBlasZtrmm
//clAmdBlasZtrmmEx
//clAmdBlasZtrmv
//clAmdBlasZtrsm
//clAmdBlasZtrsmEx
//clAmdBlasZtrsv
//clAmdBlasiCamax
//clAmdBlasiDamax
//clAmdBlasiSamax
//clAmdBlasiZamax
#total 175
clAmdFftBakePlan
//clAmdFftCopyPlan
clAmdFftCreateDefaultPlan
clAmdFftDestroyPlan
clAmdFftEnqueueTransform
//clAmdFftGetLayout
//clAmdFftGetPlanBatchSize
//clAmdFftGetPlanContext
//clAmdFftGetPlanDim
//clAmdFftGetPlanDistance
//clAmdFftGetPlanInStride
//clAmdFftGetPlanLength
//clAmdFftGetPlanOutStride
//clAmdFftGetPlanPrecision
//clAmdFftGetPlanScale
//clAmdFftGetPlanTransposeResult
//clAmdFftGetResultLocation
clAmdFftGetTmpBufSize
//clAmdFftGetVersion
clAmdFftSetLayout
clAmdFftSetPlanBatchSize
//clAmdFftSetPlanDim
clAmdFftSetPlanDistance
clAmdFftSetPlanInStride
//clAmdFftSetPlanLength
clAmdFftSetPlanOutStride
//clAmdFftSetPlanPrecision
clAmdFftSetPlanScale
//clAmdFftSetPlanTransposeResult
clAmdFftSetResultLocation
clAmdFftSetup
clAmdFftTeardown
#total 32
clBuildProgram
clCompileProgram
clCreateBuffer
clCreateCommandQueue
clCreateContext
clCreateContextFromType
clCreateImage
clCreateImage2D
clCreateImage3D
clCreateKernel
clCreateKernelsInProgram
clCreateProgramWithBinary
clCreateProgramWithBuiltInKernels
clCreateProgramWithSource
clCreateSampler
clCreateSubBuffer
clCreateSubDevices
clCreateUserEvent
clEnqueueBarrier
clEnqueueBarrierWithWaitList
clEnqueueCopyBuffer
clEnqueueCopyBufferRect
clEnqueueCopyBufferToImage
clEnqueueCopyImage
clEnqueueCopyImageToBuffer
clEnqueueFillBuffer
clEnqueueFillImage
clEnqueueMapBuffer
clEnqueueMapImage
clEnqueueMarker
clEnqueueMarkerWithWaitList
clEnqueueMigrateMemObjects
clEnqueueNDRangeKernel
clEnqueueNativeKernel
clEnqueueReadBuffer
clEnqueueReadBufferRect
clEnqueueReadImage
clEnqueueTask
clEnqueueUnmapMemObject
clEnqueueWaitForEvents
clEnqueueWriteBuffer
clEnqueueWriteBufferRect
clEnqueueWriteImage
clFinish
clFlush
clGetCommandQueueInfo
clGetContextInfo
clGetDeviceIDs
clGetDeviceInfo
clGetEventInfo
clGetEventProfilingInfo
clGetExtensionFunctionAddress
clGetExtensionFunctionAddressForPlatform
clGetImageInfo
clGetKernelArgInfo
clGetKernelInfo
clGetKernelWorkGroupInfo
clGetMemObjectInfo
clGetPlatformIDs
clGetPlatformInfo
clGetProgramBuildInfo
clGetProgramInfo
clGetSamplerInfo
clGetSupportedImageFormats
clLinkProgram
clReleaseCommandQueue
clReleaseContext
clReleaseDevice
clReleaseEvent
clReleaseKernel
clReleaseMemObject
clReleaseProgram
clReleaseSampler
clRetainCommandQueue
clRetainContext
clRetainDevice
clRetainEvent
clRetainKernel
clRetainMemObject
clRetainProgram
clRetainSampler
clSetEventCallback
clSetKernelArg
clSetMemObjectDestructorCallback
clSetUserEventStatus
clUnloadCompiler
clUnloadPlatformCompiler
clWaitForEvents
#total 88
#!/bin/bash -e #!/bin/bash -e
echo "Generate files for CL runtime..." echo "Generate files for CL runtime..."
cat sources/cl.h | python parser_cl.py cl_runtime_opencl python parser_cl.py opencl_core < sources/cl.h
cat sources/clAmdBlas.h | python parser_clamdblas.py python parser_clamdblas.py < sources/clAmdBlas.h
cat sources/clAmdFft.h | python parser_clamdfft.py python parser_clamdfft.py < sources/clAmdFft.h
echo "Generate files for CL runtime... Done" echo "Generate files for CL runtime... Done"
...@@ -8,9 +8,9 @@ from common import remove_comments, getTokens, getParameters, postProcessParamet ...@@ -8,9 +8,9 @@ from common import remove_comments, getTokens, getParameters, postProcessParamet
try: try:
if len(sys.argv) > 1: if len(sys.argv) > 1:
outfile = open('../../../include/opencv2/ocl/cl_runtime/' + sys.argv[1] + '.hpp', "w") outfile = open('../../../../include/opencv2/core/opencl/runtime/autogenerated/' + sys.argv[1] + '.hpp', 'wb')
outfile_impl = open('../' + sys.argv[1] + '_impl.hpp', "w") outfile_impl = open('../autogenerated/' + sys.argv[1] + '_impl.hpp', 'wb')
outfile_wrappers = open('../../../include/opencv2/ocl/cl_runtime/' + sys.argv[1] + '_wrappers.hpp', "w") outfile_wrappers = open('../../../../include/opencv2/core/opencl/runtime/autogenerated/' + sys.argv[1] + '_wrappers.hpp', 'wb')
if len(sys.argv) > 2: if len(sys.argv) > 2:
f = open(sys.argv[2], "r") f = open(sys.argv[2], "r")
else: else:
...@@ -95,24 +95,31 @@ pprint(fns) ...@@ -95,24 +95,31 @@ pprint(fns)
from common import * from common import *
filterFileName='./filter/opencl_core_functions.list'
numEnabled = readFunctionFilter(fns, filterFileName)
functionsFilter = generateFilterNames(fns)
filter_file = open(filterFileName, 'wb')
filter_file.write(functionsFilter)
ctx = {} ctx = {}
ctx['CL_REMAP_ORIGIN'] = generateRemapOrigin(fns) ctx['CL_REMAP_ORIGIN'] = generateRemapOrigin(fns)
ctx['CL_REMAP_DYNAMIC'] = generateRemapDynamic(fns) ctx['CL_REMAP_DYNAMIC'] = generateRemapDynamic(fns)
ctx['CL_FN_DECLARATIONS'] = generateFnDeclaration(fns) ctx['CL_FN_DECLARATIONS'] = generateFnDeclaration(fns)
sys.stdout = outfile sys.stdout = outfile
ProcessTemplate('template/cl_runtime_opencl.hpp.in', ctx) ProcessTemplate('template/opencl_core.hpp.in', ctx)
ctx['CL_FN_INLINE_WRAPPERS'] = generateInlineWrappers(fns) ctx['CL_FN_INLINE_WRAPPERS'] = generateInlineWrappers(fns)
sys.stdout = outfile_wrappers sys.stdout = outfile_wrappers
ProcessTemplate('template/cl_runtime_opencl_wrappers.hpp.in', ctx) ProcessTemplate('template/opencl_core_wrappers.hpp.in', ctx)
ctx['CL_FN_ENTRY_DEFINITIONS'] = generateStructDefinitions(fns)
ctx['CL_FN_ENTRY_LIST'] = generateListOfDefinitions(fns)
ctx['CL_FN_ENUMS'] = generateEnums(fns) ctx['CL_FN_ENUMS'] = generateEnums(fns)
ctx['CL_FN_NAMES'] = generateNames(fns)
ctx['CL_FN_DEFINITIONS'] = generateFnDefinition(fns)
ctx['CL_FN_PTRS'] = generatePtrs(fns)
ctx['CL_FN_SWITCH'] = generateTemplates(15, 'opencl_fn', 'opencl_check_fn', 'CL_API_CALL') ctx['CL_FN_SWITCH'] = generateTemplates(15, 'opencl_fn', 'opencl_check_fn', 'CL_API_CALL')
ctx['CL_NUMBER_OF_ENABLED_FUNCTIONS'] = '// number of enabled functions: %d' % (numEnabled)
sys.stdout = outfile_impl sys.stdout = outfile_impl
ProcessTemplate('template/cl_runtime_impl_opencl.hpp.in', ctx) ProcessTemplate('template/opencl_core_impl.hpp.in', ctx)
...@@ -89,19 +89,26 @@ pprint(fns) ...@@ -89,19 +89,26 @@ pprint(fns)
from common import * from common import *
filterFileName='./filter/opencl_clamdblas_functions.list'
numEnabled = readFunctionFilter(fns, filterFileName)
functionsFilter = generateFilterNames(fns)
filter_file = open(filterFileName, 'wb')
filter_file.write(functionsFilter)
ctx = {} ctx = {}
ctx['CLAMDBLAS_REMAP_ORIGIN'] = generateRemapOrigin(fns) ctx['CLAMDBLAS_REMAP_ORIGIN'] = generateRemapOrigin(fns)
ctx['CLAMDBLAS_REMAP_DYNAMIC'] = generateRemapDynamic(fns) ctx['CLAMDBLAS_REMAP_DYNAMIC'] = generateRemapDynamic(fns)
ctx['CLAMDBLAS_FN_DECLARATIONS'] = generateFnDeclaration(fns) ctx['CLAMDBLAS_FN_DECLARATIONS'] = generateFnDeclaration(fns)
sys.stdout = open('../../../include/opencv2/ocl/cl_runtime/clamdblas_runtime.hpp', 'w') sys.stdout = open('../../../../include/opencv2/core/opencl/runtime/autogenerated/opencl_clamdblas.hpp', 'wb')
ProcessTemplate('template/clamdblas_runtime.hpp.in', ctx) ProcessTemplate('template/opencl_clamdblas.hpp.in', ctx)
ctx['CL_FN_ENUMS'] = generateEnums(fns, 'OPENCLAMDBLAS_FN') ctx['CL_FN_ENUMS'] = generateEnums(fns, 'OPENCLAMDBLAS_FN', )
ctx['CL_FN_NAMES'] = generateNames(fns, 'openclamdblas_fn')
ctx['CL_FN_DEFINITIONS'] = generateFnDefinition(fns, 'openclamdblas_fn', 'OPENCLAMDBLAS_FN')
ctx['CL_FN_PTRS'] = generatePtrs(fns, 'openclamdblas_fn')
ctx['CL_FN_SWITCH'] = generateTemplates(23, 'openclamdblas_fn', 'openclamdblas_check_fn', '') ctx['CL_FN_SWITCH'] = generateTemplates(23, 'openclamdblas_fn', 'openclamdblas_check_fn', '')
ctx['CL_FN_ENTRY_DEFINITIONS'] = generateStructDefinitions(fns, 'openclamdblas_fn', 'OPENCLAMDBLAS_FN')
ctx['CL_FN_ENTRY_LIST'] = generateListOfDefinitions(fns, 'openclamdblas_fn')
ctx['CL_NUMBER_OF_ENABLED_FUNCTIONS'] = '// number of enabled functions: %d' % (numEnabled)
sys.stdout = open('../clamdblas_runtime.cpp', 'w') sys.stdout = open('../autogenerated/opencl_clamdblas_impl.hpp', 'wb')
ProcessTemplate('template/clamdblas_runtime.cpp.in', ctx) ProcessTemplate('template/opencl_clamdblas_impl.hpp.in', ctx)
...@@ -86,19 +86,26 @@ pprint(fns) ...@@ -86,19 +86,26 @@ pprint(fns)
from common import * from common import *
filterFileName='./filter/opencl_clamdfft_functions.list'
numEnabled = readFunctionFilter(fns, filterFileName)
functionsFilter = generateFilterNames(fns)
filter_file = open(filterFileName, 'wb')
filter_file.write(functionsFilter)
ctx = {} ctx = {}
ctx['CLAMDFFT_REMAP_ORIGIN'] = generateRemapOrigin(fns) ctx['CLAMDFFT_REMAP_ORIGIN'] = generateRemapOrigin(fns)
ctx['CLAMDFFT_REMAP_DYNAMIC'] = generateRemapDynamic(fns) ctx['CLAMDFFT_REMAP_DYNAMIC'] = generateRemapDynamic(fns)
ctx['CLAMDFFT_FN_DECLARATIONS'] = generateFnDeclaration(fns) ctx['CLAMDFFT_FN_DECLARATIONS'] = generateFnDeclaration(fns)
sys.stdout = open('../../../include/opencv2/ocl/cl_runtime/clamdfft_runtime.hpp', 'w') sys.stdout = open('../../../../include/opencv2/core/opencl/runtime/autogenerated/opencl_clamdfft.hpp', 'wb')
ProcessTemplate('template/clamdfft_runtime.hpp.in', ctx) ProcessTemplate('template/opencl_clamdfft.hpp.in', ctx)
ctx['CL_FN_ENUMS'] = generateEnums(fns, 'OPENCLAMDFFT_FN') ctx['CL_FN_ENUMS'] = generateEnums(fns, 'OPENCLAMDFFT_FN')
ctx['CL_FN_NAMES'] = generateNames(fns, 'openclamdfft_fn')
ctx['CL_FN_DEFINITIONS'] = generateFnDefinition(fns, 'openclamdfft_fn', 'OPENCLAMDFFT_FN')
ctx['CL_FN_PTRS'] = generatePtrs(fns, 'openclamdfft_fn')
ctx['CL_FN_SWITCH'] = generateTemplates(23, 'openclamdfft_fn', 'openclamdfft_check_fn', '') ctx['CL_FN_SWITCH'] = generateTemplates(23, 'openclamdfft_fn', 'openclamdfft_check_fn', '')
ctx['CL_FN_ENTRY_DEFINITIONS'] = generateStructDefinitions(fns, 'openclamdfft_fn', 'OPENCLAMDFFT_FN')
ctx['CL_FN_ENTRY_LIST'] = generateListOfDefinitions(fns, 'openclamdfft_fn')
ctx['CL_NUMBER_OF_ENABLED_FUNCTIONS'] = '// number of enabled functions: %d' % (numEnabled)
sys.stdout = open('../clamdfft_runtime.cpp', 'w') sys.stdout = open('../autogenerated/opencl_clamdfft_impl.hpp', 'wb')
ProcessTemplate('template/clamdfft_runtime.cpp.in', ctx) ProcessTemplate('template/opencl_clamdfft_impl.hpp.in', ctx)
#ifndef __OPENCV_CORE_OCL_RUNTIME_CLAMDBLAS_HPP__
#error "Invalid usage"
#endif
@CLAMDBLAS_REMAP_ORIGIN@
#include <clAmdBlas.h>
@CLAMDBLAS_REMAP_DYNAMIC@
@CLAMDBLAS_FN_DECLARATIONS@
#ifndef ADDITIONAL_FN_DEFINITIONS
#define ADDITIONAL_FN_DEFINITIONS
#endif
@CL_FN_ENUMS@
namespace {
@CL_FN_SWITCH@
}
@CL_FN_ENTRY_DEFINITIONS@
@CL_FN_ENTRY_LIST@
@CL_NUMBER_OF_ENABLED_FUNCTIONS@
#ifndef __OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP__
#error "Invalid usage"
#endif
@CLAMDFFT_REMAP_ORIGIN@
#include <clAmdFft.h>
@CLAMDFFT_REMAP_DYNAMIC@
@CLAMDFFT_FN_DECLARATIONS@
#ifndef ADDITIONAL_FN_DEFINITIONS
#define ADDITIONAL_FN_DEFINITIONS
#endif
@CL_FN_ENUMS@
namespace {
@CL_FN_SWITCH@
}
@CL_FN_ENTRY_DEFINITIONS@
@CL_FN_ENTRY_LIST@
@CL_NUMBER_OF_ENABLED_FUNCTIONS@
#ifndef __OPENCV_CORE_OCL_RUNTIME_OPENCL_CORE_HPP__
#error "Invalid usage"
#endif
@CL_REMAP_ORIGIN@
#if defined __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
@CL_REMAP_DYNAMIC@
@CL_FN_DECLARATIONS@
#ifndef ADDITIONAL_FN_DEFINITIONS
#define ADDITIONAL_FN_DEFINITIONS
#endif
@CL_FN_ENUMS@
namespace {
@CL_FN_SWITCH@
} // anonymous namespace
@CL_FN_ENTRY_DEFINITIONS@
@CL_FN_ENTRY_LIST@
@CL_NUMBER_OF_ENABLED_FUNCTIONS@
#ifndef __OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP__
#error "Invalid usage"
#endif
@CL_FN_INLINE_WRAPPERS@
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the OpenCV Foundation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#include "precomp.hpp"
#ifdef HAVE_CLAMDBLAS
#include "opencv2/core/opencl/runtime/opencl_core.hpp"
#include "opencv2/core/opencl/runtime/opencl_clamdblas.hpp"
#if defined(_WIN32)
#include <windows.h>
static void* WinGetProcAddress(const char* name)
{
static HMODULE opencl_module = NULL;
if (!opencl_module)
{
opencl_module = GetModuleHandleA("clAmdBlas.dll");
if (!opencl_module)
{
opencl_module = LoadLibraryA("clAmdBlas.dll");
if (!opencl_module)
return NULL;
}
}
return (void*)GetProcAddress(opencl_module, name);
}
#define CV_CL_GET_PROC_ADDRESS(name) WinGetProcAddress(name)
#endif // _WIN32
#if defined(linux)
#include <dlfcn.h>
#include <stdio.h>
static void* GetProcAddress (const char* name)
{
static void* h = NULL;
if (!h)
{
h = dlopen("libclAmdBlas.so", RTLD_LAZY | RTLD_GLOBAL);
if (!h)
return NULL;
}
return dlsym(h, name);
}
#define CV_CL_GET_PROC_ADDRESS(name) GetProcAddress(name)
#endif
#ifndef CV_CL_GET_PROC_ADDRESS
#define CV_CL_GET_PROC_ADDRESS(name) NULL
#endif
static void* openclamdblas_check_fn(int ID);
#include "runtime_common.hpp"
//
// BEGIN OF CUSTOM FUNCTIONS
//
#define CUSTOM_FUNCTION_ID 1000
#undef ADDITIONAL_FN_DEFINITIONS
//
// END OF CUSTOM FUNCTIONS HERE
//
#include "autogenerated/opencl_clamdblas_impl.hpp"
static void* openclamdblas_check_fn(int ID)
{
ID = (ID <= CUSTOM_FUNCTION_ID) ? ID : ID - CUSTOM_FUNCTION_ID;
assert(ID >= 0 && ID < (int)(sizeof(openclamdblas_fn)/sizeof(openclamdblas_fn[0])));
const struct DynamicFnEntry* e = openclamdblas_fn[ID];
void* func = CV_CL_GET_PROC_ADDRESS(e->fnName);
if (!func)
{
CV_Error(cv::Error::OpenCLApiCallError, cv::format("OpenCL AMD BLAS function is not available: [%s]", e->fnName));
}
*(e->ppFn) = func;
return func;
}
#endif
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the OpenCV Foundation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#include "precomp.hpp"
#ifdef HAVE_CLAMDFFT
#include "opencv2/core/opencl/runtime/opencl_core.hpp"
#include "opencv2/core/opencl/runtime/opencl_clamdfft.hpp"
#if defined(_WIN32)
#include <windows.h>
static void* WinGetProcAddress(const char* name)
{
static HMODULE opencl_module = NULL;
if (!opencl_module)
{
opencl_module = GetModuleHandleA("clAmdFft.Runtime.dll");
if (!opencl_module)
{
opencl_module = LoadLibraryA("clAmdFft.Runtime.dll");
if (!opencl_module)
return NULL;
}
}
return (void*)GetProcAddress(opencl_module, name);
}
#define CV_CL_GET_PROC_ADDRESS(name) WinGetProcAddress(name)
#endif // _WIN32
#if defined(linux)
#include <dlfcn.h>
#include <stdio.h>
static void* GetProcAddress (const char* name)
{
static void* h = NULL;
if (!h)
{
h = dlopen("libclAmdFft.Runtime.so", RTLD_LAZY | RTLD_GLOBAL);
if (!h)
return NULL;
}
return dlsym(h, name);
}
#define CV_CL_GET_PROC_ADDRESS(name) GetProcAddress(name)
#endif
#ifndef CV_CL_GET_PROC_ADDRESS
#define CV_CL_GET_PROC_ADDRESS(name) NULL
#endif
static void* openclamdfft_check_fn(int ID);
#include "runtime_common.hpp"
//
// BEGIN OF CUSTOM FUNCTIONS
//
#define CUSTOM_FUNCTION_ID 1000
#undef ADDITIONAL_FN_DEFINITIONS
//
// END OF CUSTOM FUNCTIONS HERE
//
#include "autogenerated/opencl_clamdfft_impl.hpp"
static void* openclamdfft_check_fn(int ID)
{
ID = (ID <= CUSTOM_FUNCTION_ID) ? ID : ID - CUSTOM_FUNCTION_ID;
assert(ID >= 0 && ID < (int)(sizeof(openclamdfft_fn)/sizeof(openclamdfft_fn[0])));
const struct DynamicFnEntry* e = openclamdfft_fn[ID];
void* func = CV_CL_GET_PROC_ADDRESS(e->fnName);
if (!func)
{
CV_Error(cv::Error::OpenCLApiCallError, cv::format("OpenCL AMD FFT function is not available: [%s]", e->fnName));
}
*(e->ppFn) = func;
return func;
}
#endif
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the OpenCV Foundation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#include "precomp.hpp"
#if defined(HAVE_OPENCL) && !defined(HAVE_OPENCL_STATIC)
#include "opencv2/core.hpp" // CV_Error
#include "opencv2/core/opencl/runtime/opencl_core.hpp"
static const char* funcToCheckOpenCL1_1 = "clEnqueueReadBufferRect";
#define ERROR_MSG_CANT_LOAD "Failed to load OpenCL runtime\n"
#define ERROR_MSG_INVALID_VERSION "Failed to load OpenCL runtime (expected version 1.1+)\n"
#if defined(__APPLE__)
#include <dlfcn.h>
static void* AppleCLGetProcAddress(const char* name)
{
static bool initialized = false;
static void* handle = NULL;
if (!handle)
{
if(!initialized)
{
initialized = true;
const char* path = "/System/Library/Frameworks/OpenCL.framework/Versions/Current/OpenCL";
const char* envPath = getenv("OPENCV_OPENCL_RUNTIME");
if (envPath)
path = envPath;
handle = dlopen(oclpath, RTLD_LAZY | RTLD_GLOBAL);
if (handle == NULL)
{
fprintf(stderr, ERROR_MSG_CANT_LOAD);
}
else if (dlsym(handle, funcToCheckOpenCL1_1) == NULL)
{
fprintf(stderr, ERROR_MSG_INVALID_VERSION);
handle = NULL;
}
}
if (!handle)
return NULL;
}
return dlsym(handle, name);
}
#define CV_CL_GET_PROC_ADDRESS(name) AppleCLGetProcAddress(name)
#endif // __APPLE__
#if defined(_WIN32)
#include <windows.h>
static void* WinGetProcAddress(const char* name)
{
static bool initialized = false;
static HMODULE handle = NULL;
if (!handle)
{
if(!initialized)
{
initialized = true;
handle = GetModuleHandleA("OpenCL.dll");
if (!handle)
{
const char* path = "OpenCL.dll";
const char* envPath = getenv("OPENCV_OPENCL_RUNTIME");
if (envPath)
path = envPath;
handle = LoadLibraryA(path);
if (!handle)
{
fprintf(stderr, ERROR_MSG_CANT_LOAD);
}
else if (GetProcAddress(handle, funcToCheckOpenCL1_1) == NULL)
{
fprintf(stderr, ERROR_MSG_INVALID_VERSION);
handle = NULL;
}
}
}
if (!handle)
return NULL;
}
return (void*)GetProcAddress(handle, name);
}
#define CV_CL_GET_PROC_ADDRESS(name) WinGetProcAddress(name)
#endif // _WIN32
#if defined(linux)
#include <dlfcn.h>
#include <stdio.h>
static void* GetProcAddress(const char* name)
{
static bool initialized = false;
static void* handle = NULL;
if (!handle)
{
if(!initialized)
{
initialized = true;
const char* path = "libOpenCL.so";
const char* envPath = getenv("OPENCV_OPENCL_RUNTIME");
if (envPath)
path = envPath;
handle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL);
if (handle == NULL)
{
fprintf(stderr, ERROR_MSG_CANT_LOAD);
}
else if (dlsym(handle, funcToCheckOpenCL1_1) == NULL)
{
fprintf(stderr, ERROR_MSG_INVALID_VERSION);
handle = NULL;
}
}
if (!handle)
return NULL;
}
return dlsym(handle, name);
}
#define CV_CL_GET_PROC_ADDRESS(name) GetProcAddress(name)
#endif
#ifndef CV_CL_GET_PROC_ADDRESS
#define CV_CL_GET_PROC_ADDRESS(name) NULL
#endif
static void* opencl_check_fn(int ID);
#include "runtime_common.hpp"
//
// BEGIN OF CUSTOM FUNCTIONS
//
#define CUSTOM_FUNCTION_ID 1000
#undef ADDITIONAL_FN_DEFINITIONS
//
// END OF CUSTOM FUNCTIONS HERE
//
#include "autogenerated/opencl_core_impl.hpp"
static void* opencl_check_fn(int ID)
{
ID = (ID <= CUSTOM_FUNCTION_ID) ? ID : ID - CUSTOM_FUNCTION_ID;
assert(ID >= 0 && ID < (int)(sizeof(opencl_fn_list)/sizeof(opencl_fn_list[0])));
const struct DynamicFnEntry* e = opencl_fn_list[ID];
void* func = CV_CL_GET_PROC_ADDRESS(e->fnName);
if (!func)
{
CV_Error(cv::Error::OpenCLApiCallError, cv::format("OpenCL function is not available: [%s]", e->fnName));
}
*(e->ppFn) = func;
return func;
}
#endif
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the OpenCV Foundation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef __OPENCV_CORE_OCL_RUNTIME_COMMON_HPP__
#define __OPENCV_CORE_OCL_RUNTIME_COMMON_HPP__
namespace cv { namespace ocl { namespace runtime {
struct DynamicFnEntry
{
const char* fnName; // "clCreateContext"
void** ppFn; // &clCreateContext_pfn
};
} } } // namespace cv::ocl::runtime
using namespace cv::ocl::runtime;
#endif // __OPENCV_CORE_OCL_RUNTIME_COMMON_HPP__
...@@ -244,6 +244,18 @@ struct TLSData ...@@ -244,6 +244,18 @@ struct TLSData
static TLSData* get(); static TLSData* get();
}; };
#if defined(BUILD_SHARED_LIBS)
#if defined WIN32 || defined _WIN32 || defined WINCE
#define CL_RUNTIME_EXPORT __declspec(dllexport)
#elif defined __GNUC__ && __GNUC__ >= 4
#define CL_RUNTIME_EXPORT __attribute__ ((visibility ("default")))
#else
#define CL_RUNTIME_EXPORT
#endif
#else
#define CL_RUNTIME_EXPORT
#endif
namespace ocl namespace ocl
{ {
MatAllocator* getOpenCLAllocator(); MatAllocator* getOpenCLAllocator();
......
...@@ -197,7 +197,7 @@ PARAM_TEST_CASE(SplitTestBase, MatType, Channels, bool) ...@@ -197,7 +197,7 @@ PARAM_TEST_CASE(SplitTestBase, MatType, Channels, bool)
typedef SplitTestBase Split; typedef SplitTestBase Split;
OCL_TEST_P(Split, Accuracy) OCL_TEST_P(Split, DISABLED_Accuracy)
{ {
for (int j = 0; j < test_loop_times; j++) for (int j = 0; j < test_loop_times; j++)
{ {
......
#ifndef __OPENCV_OCL_CL_RUNTIME_HPP__
#define __OPENCV_OCL_CL_RUNTIME_HPP__
#ifdef HAVE_OPENCL
#if defined(HAVE_OPENCL_STATIC)
#if defined __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
#else // HAVE_OPENCL_STATIC
#include "cl_runtime_opencl.hpp"
#endif // HAVE_OPENCL_STATIC
#endif // HAVE_OPENCL
#endif // __OPENCV_OCL_CL_RUNTIME_HPP__
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#ifndef __OPENCV_OCL_PRIVATE_OPENCL_UTILS_HPP__ #ifndef __OPENCV_OCL_PRIVATE_OPENCL_UTILS_HPP__
#define __OPENCV_OCL_PRIVATE_OPENCL_UTILS_HPP__ #define __OPENCV_OCL_PRIVATE_OPENCL_UTILS_HPP__
#include "opencv2/ocl/cl_runtime/cl_runtime.hpp" #include "opencv2/core/opencl/runtime/opencl_core.hpp"
#include <vector> #include <vector>
#include <string> #include <string>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#ifndef __OPENCV_OCL_PRIVATE_UTIL__ #ifndef __OPENCV_OCL_PRIVATE_UTIL__
#define __OPENCV_OCL_PRIVATE_UTIL__ #define __OPENCV_OCL_PRIVATE_UTIL__
#include "opencv2/ocl/cl_runtime/cl_runtime.hpp" #include "opencv2/core/opencl/runtime/opencl_core.hpp"
#include "opencv2/core/ocl_genbase.hpp" #include "opencv2/core/ocl_genbase.hpp"
#include "opencv2/ocl.hpp" #include "opencv2/ocl.hpp"
......
#include "precomp.hpp"
#if defined(HAVE_OPENCL) && !defined(HAVE_OPENCL_STATIC)
#include "opencv2/ocl/cl_runtime/cl_runtime.hpp"
#if defined(__APPLE__)
#include <dlfcn.h>
static void* AppleCLGetProcAddress(const char* name)
{
static void * image = NULL;
if (!image)
{
image = dlopen("/System/Library/Frameworks/OpenCL.framework/Versions/Current/OpenCL", RTLD_LAZY | RTLD_GLOBAL);
if (!image)
return NULL;
}
return dlsym(image, name);
}
#define CV_CL_GET_PROC_ADDRESS(name) AppleCLGetProcAddress(name)
#endif // __APPLE__
#if defined(_WIN32)
static void* WinGetProcAddress(const char* name)
{
static HMODULE opencl_module = NULL;
if (!opencl_module)
{
opencl_module = GetModuleHandleA("OpenCL.dll");
if (!opencl_module)
{
const char* name = "OpenCL.dll";
const char* envOpenCLBinary = getenv("OPENCV_OPENCL_BINARY");
if (envOpenCLBinary)
name = envOpenCLBinary;
opencl_module = LoadLibraryA(name);
if (!opencl_module)
return NULL;
}
}
return (void*)GetProcAddress(opencl_module, name);
}
#define CV_CL_GET_PROC_ADDRESS(name) WinGetProcAddress(name)
#endif // _WIN32
#if defined(linux)
#include <dlfcn.h>
#include <stdio.h>
static void* GetProcAddress (const char* name)
{
static void* h = NULL;
if (!h)
{
const char* name = "libOpenCL.so";
const char* envOpenCLBinary = getenv("OPENCV_OPENCL_BINARY");
if (envOpenCLBinary)
name = envOpenCLBinary;
h = dlopen(name, RTLD_LAZY | RTLD_GLOBAL);
if (!h)
return NULL;
}
return dlsym(h, name);
}
#define CV_CL_GET_PROC_ADDRESS(name) GetProcAddress(name)
#endif
#ifndef CV_CL_GET_PROC_ADDRESS
#define CV_CL_GET_PROC_ADDRESS(name) NULL
#endif
static void* opencl_check_fn(int ID)
{
extern const char* opencl_fn_names[];
void* func = CV_CL_GET_PROC_ADDRESS(opencl_fn_names[ID]);
if (!func)
{
std::ostringstream msg;
msg << "OpenCL function is not available: [" << opencl_fn_names[ID] << "]";
CV_Error(CV_StsBadFunc, msg.str());
}
extern void* opencl_fn_ptrs[];
*(void**)(opencl_fn_ptrs[ID]) = func;
return func;
}
#include "cl_runtime_opencl_impl.hpp"
#endif
//
// AUTOGENERATED, DO NOT EDIT
//
// generated by parser_cl.py
enum OPENCL_FN_ID {
OPENCL_FN_clGetPlatformIDs = 0,
OPENCL_FN_clGetPlatformInfo,
OPENCL_FN_clGetDeviceIDs,
OPENCL_FN_clGetDeviceInfo,
OPENCL_FN_clCreateSubDevices,
OPENCL_FN_clRetainDevice,
OPENCL_FN_clReleaseDevice,
OPENCL_FN_clCreateContext,
OPENCL_FN_clCreateContextFromType,
OPENCL_FN_clRetainContext,
OPENCL_FN_clReleaseContext,
OPENCL_FN_clGetContextInfo,
OPENCL_FN_clCreateCommandQueue,
OPENCL_FN_clRetainCommandQueue,
OPENCL_FN_clReleaseCommandQueue,
OPENCL_FN_clGetCommandQueueInfo,
OPENCL_FN_clCreateBuffer,
OPENCL_FN_clCreateSubBuffer,
OPENCL_FN_clCreateImage,
OPENCL_FN_clRetainMemObject,
OPENCL_FN_clReleaseMemObject,
OPENCL_FN_clGetSupportedImageFormats,
OPENCL_FN_clGetMemObjectInfo,
OPENCL_FN_clGetImageInfo,
OPENCL_FN_clSetMemObjectDestructorCallback,
OPENCL_FN_clCreateSampler,
OPENCL_FN_clRetainSampler,
OPENCL_FN_clReleaseSampler,
OPENCL_FN_clGetSamplerInfo,
OPENCL_FN_clCreateProgramWithSource,
OPENCL_FN_clCreateProgramWithBinary,
OPENCL_FN_clCreateProgramWithBuiltInKernels,
OPENCL_FN_clRetainProgram,
OPENCL_FN_clReleaseProgram,
OPENCL_FN_clBuildProgram,
OPENCL_FN_clCompileProgram,
OPENCL_FN_clLinkProgram,
OPENCL_FN_clUnloadPlatformCompiler,
OPENCL_FN_clGetProgramInfo,
OPENCL_FN_clGetProgramBuildInfo,
OPENCL_FN_clCreateKernel,
OPENCL_FN_clCreateKernelsInProgram,
OPENCL_FN_clRetainKernel,
OPENCL_FN_clReleaseKernel,
OPENCL_FN_clSetKernelArg,
OPENCL_FN_clGetKernelInfo,
OPENCL_FN_clGetKernelArgInfo,
OPENCL_FN_clGetKernelWorkGroupInfo,
OPENCL_FN_clWaitForEvents,
OPENCL_FN_clGetEventInfo,
OPENCL_FN_clCreateUserEvent,
OPENCL_FN_clRetainEvent,
OPENCL_FN_clReleaseEvent,
OPENCL_FN_clSetUserEventStatus,
OPENCL_FN_clSetEventCallback,
OPENCL_FN_clGetEventProfilingInfo,
OPENCL_FN_clFlush,
OPENCL_FN_clFinish,
OPENCL_FN_clEnqueueReadBuffer,
OPENCL_FN_clEnqueueReadBufferRect,
OPENCL_FN_clEnqueueWriteBuffer,
OPENCL_FN_clEnqueueWriteBufferRect,
OPENCL_FN_clEnqueueFillBuffer,
OPENCL_FN_clEnqueueCopyBuffer,
OPENCL_FN_clEnqueueCopyBufferRect,
OPENCL_FN_clEnqueueReadImage,
OPENCL_FN_clEnqueueWriteImage,
OPENCL_FN_clEnqueueFillImage,
OPENCL_FN_clEnqueueCopyImage,
OPENCL_FN_clEnqueueCopyImageToBuffer,
OPENCL_FN_clEnqueueCopyBufferToImage,
OPENCL_FN_clEnqueueMapBuffer,
OPENCL_FN_clEnqueueMapImage,
OPENCL_FN_clEnqueueUnmapMemObject,
OPENCL_FN_clEnqueueMigrateMemObjects,
OPENCL_FN_clEnqueueNDRangeKernel,
OPENCL_FN_clEnqueueTask,
OPENCL_FN_clEnqueueNativeKernel,
OPENCL_FN_clEnqueueMarkerWithWaitList,
OPENCL_FN_clEnqueueBarrierWithWaitList,
OPENCL_FN_clGetExtensionFunctionAddressForPlatform,
OPENCL_FN_clCreateImage2D,
OPENCL_FN_clCreateImage3D,
OPENCL_FN_clEnqueueMarker,
OPENCL_FN_clEnqueueWaitForEvents,
OPENCL_FN_clEnqueueBarrier,
OPENCL_FN_clUnloadCompiler,
OPENCL_FN_clGetExtensionFunctionAddress,
};
// generated by parser_cl.py
const char* opencl_fn_names[] = {
"clGetPlatformIDs",
"clGetPlatformInfo",
"clGetDeviceIDs",
"clGetDeviceInfo",
"clCreateSubDevices",
"clRetainDevice",
"clReleaseDevice",
"clCreateContext",
"clCreateContextFromType",
"clRetainContext",
"clReleaseContext",
"clGetContextInfo",
"clCreateCommandQueue",
"clRetainCommandQueue",
"clReleaseCommandQueue",
"clGetCommandQueueInfo",
"clCreateBuffer",
"clCreateSubBuffer",
"clCreateImage",
"clRetainMemObject",
"clReleaseMemObject",
"clGetSupportedImageFormats",
"clGetMemObjectInfo",
"clGetImageInfo",
"clSetMemObjectDestructorCallback",
"clCreateSampler",
"clRetainSampler",
"clReleaseSampler",
"clGetSamplerInfo",
"clCreateProgramWithSource",
"clCreateProgramWithBinary",
"clCreateProgramWithBuiltInKernels",
"clRetainProgram",
"clReleaseProgram",
"clBuildProgram",
"clCompileProgram",
"clLinkProgram",
"clUnloadPlatformCompiler",
"clGetProgramInfo",
"clGetProgramBuildInfo",
"clCreateKernel",
"clCreateKernelsInProgram",
"clRetainKernel",
"clReleaseKernel",
"clSetKernelArg",
"clGetKernelInfo",
"clGetKernelArgInfo",
"clGetKernelWorkGroupInfo",
"clWaitForEvents",
"clGetEventInfo",
"clCreateUserEvent",
"clRetainEvent",
"clReleaseEvent",
"clSetUserEventStatus",
"clSetEventCallback",
"clGetEventProfilingInfo",
"clFlush",
"clFinish",
"clEnqueueReadBuffer",
"clEnqueueReadBufferRect",
"clEnqueueWriteBuffer",
"clEnqueueWriteBufferRect",
"clEnqueueFillBuffer",
"clEnqueueCopyBuffer",
"clEnqueueCopyBufferRect",
"clEnqueueReadImage",
"clEnqueueWriteImage",
"clEnqueueFillImage",
"clEnqueueCopyImage",
"clEnqueueCopyImageToBuffer",
"clEnqueueCopyBufferToImage",
"clEnqueueMapBuffer",
"clEnqueueMapImage",
"clEnqueueUnmapMemObject",
"clEnqueueMigrateMemObjects",
"clEnqueueNDRangeKernel",
"clEnqueueTask",
"clEnqueueNativeKernel",
"clEnqueueMarkerWithWaitList",
"clEnqueueBarrierWithWaitList",
"clGetExtensionFunctionAddressForPlatform",
"clCreateImage2D",
"clCreateImage3D",
"clEnqueueMarker",
"clEnqueueWaitForEvents",
"clEnqueueBarrier",
"clUnloadCompiler",
"clGetExtensionFunctionAddress",
};
namespace {
// generated by parser_cl.py
template <int ID, typename _R>
struct opencl_fn0
{
typedef _R (CL_API_CALL*FN)();
static _R CL_API_CALL switch_fn()
{ return ((FN)opencl_check_fn(ID))(); }
};
template <int ID, typename _R, typename _T1>
struct opencl_fn1
{
typedef _R (CL_API_CALL*FN)(_T1);
static _R CL_API_CALL switch_fn(_T1 p1)
{ return ((FN)opencl_check_fn(ID))(p1); }
};
template <int ID, typename _R, typename _T1, typename _T2>
struct opencl_fn2
{
typedef _R (CL_API_CALL*FN)(_T1, _T2);
static _R CL_API_CALL switch_fn(_T1 p1, _T2 p2)
{ return ((FN)opencl_check_fn(ID))(p1, p2); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3>
struct opencl_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_check_fn(ID))(p1, p2, p3); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); }
};
template <int ID, typename _R, typename _T1, typename _T2, typename _T3, typename _T4, typename _T5, typename _T6, typename _T7, typename _T8, typename _T9, typename _T10, typename _T11, typename _T12, typename _T13, typename _T14>
struct opencl_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_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); }
};
}
// generated by parser_cl.py
cl_int (CL_API_CALL*clGetPlatformIDs)(cl_uint, cl_platform_id*, cl_uint*) = opencl_fn3<OPENCL_FN_clGetPlatformIDs, cl_int, cl_uint, cl_platform_id*, cl_uint*>::switch_fn;
cl_int (CL_API_CALL*clGetPlatformInfo)(cl_platform_id, cl_platform_info, size_t, void*, size_t*) = opencl_fn5<OPENCL_FN_clGetPlatformInfo, cl_int, cl_platform_id, cl_platform_info, size_t, void*, size_t*>::switch_fn;
cl_int (CL_API_CALL*clGetDeviceIDs)(cl_platform_id, cl_device_type, cl_uint, cl_device_id*, cl_uint*) = opencl_fn5<OPENCL_FN_clGetDeviceIDs, cl_int, cl_platform_id, cl_device_type, cl_uint, cl_device_id*, cl_uint*>::switch_fn;
cl_int (CL_API_CALL*clGetDeviceInfo)(cl_device_id, cl_device_info, size_t, void*, size_t*) = opencl_fn5<OPENCL_FN_clGetDeviceInfo, cl_int, cl_device_id, cl_device_info, size_t, void*, size_t*>::switch_fn;
cl_int (CL_API_CALL*clCreateSubDevices)(cl_device_id, const cl_device_partition_property*, cl_uint, cl_device_id*, cl_uint*) = opencl_fn5<OPENCL_FN_clCreateSubDevices, cl_int, cl_device_id, const cl_device_partition_property*, cl_uint, cl_device_id*, cl_uint*>::switch_fn;
cl_int (CL_API_CALL*clRetainDevice)(cl_device_id) = opencl_fn1<OPENCL_FN_clRetainDevice, cl_int, cl_device_id>::switch_fn;
cl_int (CL_API_CALL*clReleaseDevice)(cl_device_id) = opencl_fn1<OPENCL_FN_clReleaseDevice, cl_int, cl_device_id>::switch_fn;
cl_context (CL_API_CALL*clCreateContext)(const cl_context_properties*, cl_uint, const cl_device_id*, void (CL_CALLBACK*) (const char*, const void*, size_t, void*), void*, cl_int*) = opencl_fn6<OPENCL_FN_clCreateContext, cl_context, const cl_context_properties*, cl_uint, const cl_device_id*, void (CL_CALLBACK*) (const char*, const void*, size_t, void*), void*, cl_int*>::switch_fn;
cl_context (CL_API_CALL*clCreateContextFromType)(const cl_context_properties*, cl_device_type, void (CL_CALLBACK*) (const char*, const void*, size_t, void*), void*, cl_int*) = opencl_fn5<OPENCL_FN_clCreateContextFromType, cl_context, const cl_context_properties*, cl_device_type, void (CL_CALLBACK*) (const char*, const void*, size_t, void*), void*, cl_int*>::switch_fn;
cl_int (CL_API_CALL*clRetainContext)(cl_context) = opencl_fn1<OPENCL_FN_clRetainContext, cl_int, cl_context>::switch_fn;
cl_int (CL_API_CALL*clReleaseContext)(cl_context) = opencl_fn1<OPENCL_FN_clReleaseContext, cl_int, cl_context>::switch_fn;
cl_int (CL_API_CALL*clGetContextInfo)(cl_context, cl_context_info, size_t, void*, size_t*) = opencl_fn5<OPENCL_FN_clGetContextInfo, cl_int, cl_context, cl_context_info, size_t, void*, size_t*>::switch_fn;
cl_command_queue (CL_API_CALL*clCreateCommandQueue)(cl_context, cl_device_id, cl_command_queue_properties, cl_int*) = opencl_fn4<OPENCL_FN_clCreateCommandQueue, cl_command_queue, cl_context, cl_device_id, cl_command_queue_properties, cl_int*>::switch_fn;
cl_int (CL_API_CALL*clRetainCommandQueue)(cl_command_queue) = opencl_fn1<OPENCL_FN_clRetainCommandQueue, cl_int, cl_command_queue>::switch_fn;
cl_int (CL_API_CALL*clReleaseCommandQueue)(cl_command_queue) = opencl_fn1<OPENCL_FN_clReleaseCommandQueue, cl_int, cl_command_queue>::switch_fn;
cl_int (CL_API_CALL*clGetCommandQueueInfo)(cl_command_queue, cl_command_queue_info, size_t, void*, size_t*) = opencl_fn5<OPENCL_FN_clGetCommandQueueInfo, cl_int, cl_command_queue, cl_command_queue_info, size_t, void*, size_t*>::switch_fn;
cl_mem (CL_API_CALL*clCreateBuffer)(cl_context, cl_mem_flags, size_t, void*, cl_int*) = opencl_fn5<OPENCL_FN_clCreateBuffer, cl_mem, cl_context, cl_mem_flags, size_t, void*, cl_int*>::switch_fn;
cl_mem (CL_API_CALL*clCreateSubBuffer)(cl_mem, cl_mem_flags, cl_buffer_create_type, const void*, cl_int*) = opencl_fn5<OPENCL_FN_clCreateSubBuffer, cl_mem, cl_mem, cl_mem_flags, cl_buffer_create_type, const void*, cl_int*>::switch_fn;
cl_mem (CL_API_CALL*clCreateImage)(cl_context, cl_mem_flags, const cl_image_format*, const cl_image_desc*, void*, cl_int*) = opencl_fn6<OPENCL_FN_clCreateImage, cl_mem, cl_context, cl_mem_flags, const cl_image_format*, const cl_image_desc*, void*, cl_int*>::switch_fn;
cl_int (CL_API_CALL*clRetainMemObject)(cl_mem) = opencl_fn1<OPENCL_FN_clRetainMemObject, cl_int, cl_mem>::switch_fn;
cl_int (CL_API_CALL*clReleaseMemObject)(cl_mem) = opencl_fn1<OPENCL_FN_clReleaseMemObject, cl_int, cl_mem>::switch_fn;
cl_int (CL_API_CALL*clGetSupportedImageFormats)(cl_context, cl_mem_flags, cl_mem_object_type, cl_uint, cl_image_format*, cl_uint*) = opencl_fn6<OPENCL_FN_clGetSupportedImageFormats, cl_int, cl_context, cl_mem_flags, cl_mem_object_type, cl_uint, cl_image_format*, cl_uint*>::switch_fn;
cl_int (CL_API_CALL*clGetMemObjectInfo)(cl_mem, cl_mem_info, size_t, void*, size_t*) = opencl_fn5<OPENCL_FN_clGetMemObjectInfo, cl_int, cl_mem, cl_mem_info, size_t, void*, size_t*>::switch_fn;
cl_int (CL_API_CALL*clGetImageInfo)(cl_mem, cl_image_info, size_t, void*, size_t*) = opencl_fn5<OPENCL_FN_clGetImageInfo, cl_int, cl_mem, cl_image_info, size_t, void*, size_t*>::switch_fn;
cl_int (CL_API_CALL*clSetMemObjectDestructorCallback)(cl_mem, void (CL_CALLBACK*) (cl_mem, void*), void*) = opencl_fn3<OPENCL_FN_clSetMemObjectDestructorCallback, cl_int, cl_mem, void (CL_CALLBACK*) (cl_mem, void*), void*>::switch_fn;
cl_sampler (CL_API_CALL*clCreateSampler)(cl_context, cl_bool, cl_addressing_mode, cl_filter_mode, cl_int*) = opencl_fn5<OPENCL_FN_clCreateSampler, cl_sampler, cl_context, cl_bool, cl_addressing_mode, cl_filter_mode, cl_int*>::switch_fn;
cl_int (CL_API_CALL*clRetainSampler)(cl_sampler) = opencl_fn1<OPENCL_FN_clRetainSampler, cl_int, cl_sampler>::switch_fn;
cl_int (CL_API_CALL*clReleaseSampler)(cl_sampler) = opencl_fn1<OPENCL_FN_clReleaseSampler, cl_int, cl_sampler>::switch_fn;
cl_int (CL_API_CALL*clGetSamplerInfo)(cl_sampler, cl_sampler_info, size_t, void*, size_t*) = opencl_fn5<OPENCL_FN_clGetSamplerInfo, cl_int, cl_sampler, cl_sampler_info, size_t, void*, size_t*>::switch_fn;
cl_program (CL_API_CALL*clCreateProgramWithSource)(cl_context, cl_uint, const char**, const size_t*, cl_int*) = opencl_fn5<OPENCL_FN_clCreateProgramWithSource, cl_program, cl_context, cl_uint, const char**, const size_t*, cl_int*>::switch_fn;
cl_program (CL_API_CALL*clCreateProgramWithBinary)(cl_context, cl_uint, const cl_device_id*, const size_t*, const unsigned char**, cl_int*, cl_int*) = opencl_fn7<OPENCL_FN_clCreateProgramWithBinary, cl_program, cl_context, cl_uint, const cl_device_id*, const size_t*, const unsigned char**, cl_int*, cl_int*>::switch_fn;
cl_program (CL_API_CALL*clCreateProgramWithBuiltInKernels)(cl_context, cl_uint, const cl_device_id*, const char*, cl_int*) = opencl_fn5<OPENCL_FN_clCreateProgramWithBuiltInKernels, cl_program, cl_context, cl_uint, const cl_device_id*, const char*, cl_int*>::switch_fn;
cl_int (CL_API_CALL*clRetainProgram)(cl_program) = opencl_fn1<OPENCL_FN_clRetainProgram, cl_int, cl_program>::switch_fn;
cl_int (CL_API_CALL*clReleaseProgram)(cl_program) = opencl_fn1<OPENCL_FN_clReleaseProgram, cl_int, cl_program>::switch_fn;
cl_int (CL_API_CALL*clBuildProgram)(cl_program, cl_uint, const cl_device_id*, const char*, void (CL_CALLBACK*) (cl_program, void*), void*) = opencl_fn6<OPENCL_FN_clBuildProgram, cl_int, cl_program, cl_uint, const cl_device_id*, const char*, void (CL_CALLBACK*) (cl_program, void*), void*>::switch_fn;
cl_int (CL_API_CALL*clCompileProgram)(cl_program, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, const char**, void (CL_CALLBACK*) (cl_program, void*), void*) = opencl_fn9<OPENCL_FN_clCompileProgram, cl_int, cl_program, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, const char**, void (CL_CALLBACK*) (cl_program, void*), void*>::switch_fn;
cl_program (CL_API_CALL*clLinkProgram)(cl_context, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, void (CL_CALLBACK*) (cl_program, void*), void*, cl_int*) = opencl_fn9<OPENCL_FN_clLinkProgram, cl_program, cl_context, cl_uint, const cl_device_id*, const char*, cl_uint, const cl_program*, void (CL_CALLBACK*) (cl_program, void*), void*, cl_int*>::switch_fn;
cl_int (CL_API_CALL*clUnloadPlatformCompiler)(cl_platform_id) = opencl_fn1<OPENCL_FN_clUnloadPlatformCompiler, cl_int, cl_platform_id>::switch_fn;
cl_int (CL_API_CALL*clGetProgramInfo)(cl_program, cl_program_info, size_t, void*, size_t*) = opencl_fn5<OPENCL_FN_clGetProgramInfo, cl_int, cl_program, cl_program_info, size_t, void*, size_t*>::switch_fn;
cl_int (CL_API_CALL*clGetProgramBuildInfo)(cl_program, cl_device_id, cl_program_build_info, size_t, void*, size_t*) = opencl_fn6<OPENCL_FN_clGetProgramBuildInfo, cl_int, cl_program, cl_device_id, cl_program_build_info, size_t, void*, size_t*>::switch_fn;
cl_kernel (CL_API_CALL*clCreateKernel)(cl_program, const char*, cl_int*) = opencl_fn3<OPENCL_FN_clCreateKernel, cl_kernel, cl_program, const char*, cl_int*>::switch_fn;
cl_int (CL_API_CALL*clCreateKernelsInProgram)(cl_program, cl_uint, cl_kernel*, cl_uint*) = opencl_fn4<OPENCL_FN_clCreateKernelsInProgram, cl_int, cl_program, cl_uint, cl_kernel*, cl_uint*>::switch_fn;
cl_int (CL_API_CALL*clRetainKernel)(cl_kernel) = opencl_fn1<OPENCL_FN_clRetainKernel, cl_int, cl_kernel>::switch_fn;
cl_int (CL_API_CALL*clReleaseKernel)(cl_kernel) = opencl_fn1<OPENCL_FN_clReleaseKernel, cl_int, cl_kernel>::switch_fn;
cl_int (CL_API_CALL*clSetKernelArg)(cl_kernel, cl_uint, size_t, const void*) = opencl_fn4<OPENCL_FN_clSetKernelArg, cl_int, cl_kernel, cl_uint, size_t, const void*>::switch_fn;
cl_int (CL_API_CALL*clGetKernelInfo)(cl_kernel, cl_kernel_info, size_t, void*, size_t*) = opencl_fn5<OPENCL_FN_clGetKernelInfo, cl_int, cl_kernel, cl_kernel_info, size_t, void*, size_t*>::switch_fn;
cl_int (CL_API_CALL*clGetKernelArgInfo)(cl_kernel, cl_uint, cl_kernel_arg_info, size_t, void*, size_t*) = opencl_fn6<OPENCL_FN_clGetKernelArgInfo, cl_int, cl_kernel, cl_uint, cl_kernel_arg_info, size_t, void*, size_t*>::switch_fn;
cl_int (CL_API_CALL*clGetKernelWorkGroupInfo)(cl_kernel, cl_device_id, cl_kernel_work_group_info, size_t, void*, size_t*) = opencl_fn6<OPENCL_FN_clGetKernelWorkGroupInfo, cl_int, cl_kernel, cl_device_id, cl_kernel_work_group_info, size_t, void*, size_t*>::switch_fn;
cl_int (CL_API_CALL*clWaitForEvents)(cl_uint, const cl_event*) = opencl_fn2<OPENCL_FN_clWaitForEvents, cl_int, cl_uint, const cl_event*>::switch_fn;
cl_int (CL_API_CALL*clGetEventInfo)(cl_event, cl_event_info, size_t, void*, size_t*) = opencl_fn5<OPENCL_FN_clGetEventInfo, cl_int, cl_event, cl_event_info, size_t, void*, size_t*>::switch_fn;
cl_event (CL_API_CALL*clCreateUserEvent)(cl_context, cl_int*) = opencl_fn2<OPENCL_FN_clCreateUserEvent, cl_event, cl_context, cl_int*>::switch_fn;
cl_int (CL_API_CALL*clRetainEvent)(cl_event) = opencl_fn1<OPENCL_FN_clRetainEvent, cl_int, cl_event>::switch_fn;
cl_int (CL_API_CALL*clReleaseEvent)(cl_event) = opencl_fn1<OPENCL_FN_clReleaseEvent, cl_int, cl_event>::switch_fn;
cl_int (CL_API_CALL*clSetUserEventStatus)(cl_event, cl_int) = opencl_fn2<OPENCL_FN_clSetUserEventStatus, cl_int, cl_event, cl_int>::switch_fn;
cl_int (CL_API_CALL*clSetEventCallback)(cl_event, cl_int, void (CL_CALLBACK*) (cl_event, cl_int, void*), void*) = opencl_fn4<OPENCL_FN_clSetEventCallback, cl_int, cl_event, cl_int, void (CL_CALLBACK*) (cl_event, cl_int, void*), void*>::switch_fn;
cl_int (CL_API_CALL*clGetEventProfilingInfo)(cl_event, cl_profiling_info, size_t, void*, size_t*) = opencl_fn5<OPENCL_FN_clGetEventProfilingInfo, cl_int, cl_event, cl_profiling_info, size_t, void*, size_t*>::switch_fn;
cl_int (CL_API_CALL*clFlush)(cl_command_queue) = opencl_fn1<OPENCL_FN_clFlush, cl_int, cl_command_queue>::switch_fn;
cl_int (CL_API_CALL*clFinish)(cl_command_queue) = opencl_fn1<OPENCL_FN_clFinish, cl_int, cl_command_queue>::switch_fn;
cl_int (CL_API_CALL*clEnqueueReadBuffer)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*) = opencl_fn9<OPENCL_FN_clEnqueueReadBuffer, cl_int, cl_command_queue, cl_mem, cl_bool, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueReadBufferRect)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*) = opencl_fn14<OPENCL_FN_clEnqueueReadBufferRect, cl_int, cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueWriteBuffer)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*) = opencl_fn9<OPENCL_FN_clEnqueueWriteBuffer, cl_int, cl_command_queue, cl_mem, cl_bool, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueWriteBufferRect)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*) = opencl_fn14<OPENCL_FN_clEnqueueWriteBufferRect, cl_int, cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueFillBuffer)(cl_command_queue, cl_mem, const void*, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*) = opencl_fn9<OPENCL_FN_clEnqueueFillBuffer, cl_int, cl_command_queue, cl_mem, const void*, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueCopyBuffer)(cl_command_queue, cl_mem, cl_mem, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*) = opencl_fn9<OPENCL_FN_clEnqueueCopyBuffer, cl_int, cl_command_queue, cl_mem, cl_mem, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueCopyBufferRect)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*) = opencl_fn13<OPENCL_FN_clEnqueueCopyBufferRect, cl_int, cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, size_t, size_t, size_t, size_t, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueReadImage)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*) = opencl_fn11<OPENCL_FN_clEnqueueReadImage, cl_int, cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueWriteImage)(cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*) = opencl_fn11<OPENCL_FN_clEnqueueWriteImage, cl_int, cl_command_queue, cl_mem, cl_bool, const size_t*, const size_t*, size_t, size_t, const void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueFillImage)(cl_command_queue, cl_mem, const void*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*) = opencl_fn8<OPENCL_FN_clEnqueueFillImage, cl_int, cl_command_queue, cl_mem, const void*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueCopyImage)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*) = opencl_fn9<OPENCL_FN_clEnqueueCopyImage, cl_int, cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueCopyImageToBuffer)(cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, size_t, cl_uint, const cl_event*, cl_event*) = opencl_fn9<OPENCL_FN_clEnqueueCopyImageToBuffer, cl_int, cl_command_queue, cl_mem, cl_mem, const size_t*, const size_t*, size_t, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueCopyBufferToImage)(cl_command_queue, cl_mem, cl_mem, size_t, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*) = opencl_fn9<OPENCL_FN_clEnqueueCopyBufferToImage, cl_int, cl_command_queue, cl_mem, cl_mem, size_t, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*>::switch_fn;
void* (CL_API_CALL*clEnqueueMapBuffer)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, size_t, size_t, cl_uint, const cl_event*, cl_event*, cl_int*) = opencl_fn10<OPENCL_FN_clEnqueueMapBuffer, void*, cl_command_queue, cl_mem, cl_bool, cl_map_flags, size_t, size_t, cl_uint, const cl_event*, cl_event*, cl_int*>::switch_fn;
void* (CL_API_CALL*clEnqueueMapImage)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, const size_t*, const size_t*, size_t*, size_t*, cl_uint, const cl_event*, cl_event*, cl_int*) = opencl_fn12<OPENCL_FN_clEnqueueMapImage, void*, cl_command_queue, cl_mem, cl_bool, cl_map_flags, const size_t*, const size_t*, size_t*, size_t*, cl_uint, const cl_event*, cl_event*, cl_int*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueUnmapMemObject)(cl_command_queue, cl_mem, void*, cl_uint, const cl_event*, cl_event*) = opencl_fn6<OPENCL_FN_clEnqueueUnmapMemObject, cl_int, cl_command_queue, cl_mem, void*, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueMigrateMemObjects)(cl_command_queue, cl_uint, const cl_mem*, cl_mem_migration_flags, cl_uint, const cl_event*, cl_event*) = opencl_fn7<OPENCL_FN_clEnqueueMigrateMemObjects, cl_int, cl_command_queue, cl_uint, const cl_mem*, cl_mem_migration_flags, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueNDRangeKernel)(cl_command_queue, cl_kernel, cl_uint, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*) = opencl_fn9<OPENCL_FN_clEnqueueNDRangeKernel, cl_int, cl_command_queue, cl_kernel, cl_uint, const size_t*, const size_t*, const size_t*, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueTask)(cl_command_queue, cl_kernel, cl_uint, const cl_event*, cl_event*) = opencl_fn5<OPENCL_FN_clEnqueueTask, cl_int, cl_command_queue, cl_kernel, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueNativeKernel)(cl_command_queue, void (CL_CALLBACK*) (void*), void*, size_t, cl_uint, const cl_mem*, const void**, cl_uint, const cl_event*, cl_event*) = opencl_fn10<OPENCL_FN_clEnqueueNativeKernel, cl_int, cl_command_queue, void (CL_CALLBACK*) (void*), void*, size_t, cl_uint, const cl_mem*, const void**, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueMarkerWithWaitList)(cl_command_queue, cl_uint, const cl_event*, cl_event*) = opencl_fn4<OPENCL_FN_clEnqueueMarkerWithWaitList, cl_int, cl_command_queue, cl_uint, const cl_event*, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueBarrierWithWaitList)(cl_command_queue, cl_uint, const cl_event*, cl_event*) = opencl_fn4<OPENCL_FN_clEnqueueBarrierWithWaitList, cl_int, cl_command_queue, cl_uint, const cl_event*, cl_event*>::switch_fn;
void* (CL_API_CALL*clGetExtensionFunctionAddressForPlatform)(cl_platform_id, const char*) = opencl_fn2<OPENCL_FN_clGetExtensionFunctionAddressForPlatform, void*, cl_platform_id, const char*>::switch_fn;
cl_mem (CL_API_CALL*clCreateImage2D)(cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, void*, cl_int*) = opencl_fn8<OPENCL_FN_clCreateImage2D, cl_mem, cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, void*, cl_int*>::switch_fn;
cl_mem (CL_API_CALL*clCreateImage3D)(cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, size_t, size_t, void*, cl_int*) = opencl_fn10<OPENCL_FN_clCreateImage3D, cl_mem, cl_context, cl_mem_flags, const cl_image_format*, size_t, size_t, size_t, size_t, size_t, void*, cl_int*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueMarker)(cl_command_queue, cl_event*) = opencl_fn2<OPENCL_FN_clEnqueueMarker, cl_int, cl_command_queue, cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueWaitForEvents)(cl_command_queue, cl_uint, const cl_event*) = opencl_fn3<OPENCL_FN_clEnqueueWaitForEvents, cl_int, cl_command_queue, cl_uint, const cl_event*>::switch_fn;
cl_int (CL_API_CALL*clEnqueueBarrier)(cl_command_queue) = opencl_fn1<OPENCL_FN_clEnqueueBarrier, cl_int, cl_command_queue>::switch_fn;
cl_int (CL_API_CALL*clUnloadCompiler)() = opencl_fn0<OPENCL_FN_clUnloadCompiler, cl_int>::switch_fn;
void* (CL_API_CALL*clGetExtensionFunctionAddress)(const char*) = opencl_fn1<OPENCL_FN_clGetExtensionFunctionAddress, void*, const char*>::switch_fn;
// generated by parser_cl.py
void* opencl_fn_ptrs[] = {
&clGetPlatformIDs,
&clGetPlatformInfo,
&clGetDeviceIDs,
&clGetDeviceInfo,
&clCreateSubDevices,
&clRetainDevice,
&clReleaseDevice,
&clCreateContext,
&clCreateContextFromType,
&clRetainContext,
&clReleaseContext,
&clGetContextInfo,
&clCreateCommandQueue,
&clRetainCommandQueue,
&clReleaseCommandQueue,
&clGetCommandQueueInfo,
&clCreateBuffer,
&clCreateSubBuffer,
&clCreateImage,
&clRetainMemObject,
&clReleaseMemObject,
&clGetSupportedImageFormats,
&clGetMemObjectInfo,
&clGetImageInfo,
&clSetMemObjectDestructorCallback,
&clCreateSampler,
&clRetainSampler,
&clReleaseSampler,
&clGetSamplerInfo,
&clCreateProgramWithSource,
&clCreateProgramWithBinary,
&clCreateProgramWithBuiltInKernels,
&clRetainProgram,
&clReleaseProgram,
&clBuildProgram,
&clCompileProgram,
&clLinkProgram,
&clUnloadPlatformCompiler,
&clGetProgramInfo,
&clGetProgramBuildInfo,
&clCreateKernel,
&clCreateKernelsInProgram,
&clRetainKernel,
&clReleaseKernel,
&clSetKernelArg,
&clGetKernelInfo,
&clGetKernelArgInfo,
&clGetKernelWorkGroupInfo,
&clWaitForEvents,
&clGetEventInfo,
&clCreateUserEvent,
&clRetainEvent,
&clReleaseEvent,
&clSetUserEventStatus,
&clSetEventCallback,
&clGetEventProfilingInfo,
&clFlush,
&clFinish,
&clEnqueueReadBuffer,
&clEnqueueReadBufferRect,
&clEnqueueWriteBuffer,
&clEnqueueWriteBufferRect,
&clEnqueueFillBuffer,
&clEnqueueCopyBuffer,
&clEnqueueCopyBufferRect,
&clEnqueueReadImage,
&clEnqueueWriteImage,
&clEnqueueFillImage,
&clEnqueueCopyImage,
&clEnqueueCopyImageToBuffer,
&clEnqueueCopyBufferToImage,
&clEnqueueMapBuffer,
&clEnqueueMapImage,
&clEnqueueUnmapMemObject,
&clEnqueueMigrateMemObjects,
&clEnqueueNDRangeKernel,
&clEnqueueTask,
&clEnqueueNativeKernel,
&clEnqueueMarkerWithWaitList,
&clEnqueueBarrierWithWaitList,
&clGetExtensionFunctionAddressForPlatform,
&clCreateImage2D,
&clCreateImage3D,
&clEnqueueMarker,
&clEnqueueWaitForEvents,
&clEnqueueBarrier,
&clUnloadCompiler,
&clGetExtensionFunctionAddress,
};
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -57,7 +57,7 @@ namespace cv { namespace ocl { ...@@ -57,7 +57,7 @@ namespace cv { namespace ocl {
}} }}
void cv::ocl::fft_teardown(){} void cv::ocl::fft_teardown(){}
#else #else
#include "opencv2/ocl/cl_runtime/clamdfft_runtime.hpp" #include "opencv2/core/opencl/runtime/opencl_clamdfft.hpp"
namespace cv namespace cv
{ {
namespace ocl namespace ocl
......
...@@ -72,7 +72,7 @@ void cv::ocl::clBlasTeardown() ...@@ -72,7 +72,7 @@ void cv::ocl::clBlasTeardown()
} }
#else #else
#include "opencv2/ocl/cl_runtime/clamdblas_runtime.hpp" #include "opencv2/core/opencl/runtime/opencl_clamdblas.hpp"
using namespace cv; using namespace cv;
static bool clBlasInitialized = false; static bool clBlasInitialized = false;
......
...@@ -58,18 +58,6 @@ ...@@ -58,18 +58,6 @@
#include "cvconfig.h" #include "cvconfig.h"
#if defined(BUILD_SHARED_LIBS)
#if defined WIN32 || defined _WIN32 || defined WINCE
#define CL_RUNTIME_EXPORT __declspec(dllexport)
#elif defined __GNUC__ && __GNUC__ >= 4
#define CL_RUNTIME_EXPORT __attribute__ ((visibility ("default")))
#else
#define CL_RUNTIME_EXPORT
#endif
#else
#define CL_RUNTIME_EXPORT
#endif
#include <map> #include <map>
#include <iostream> #include <iostream>
#include <limits> #include <limits>
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#ifndef __OPENCV_OPENCL_SAFE_CALL_HPP__ #ifndef __OPENCV_OPENCL_SAFE_CALL_HPP__
#define __OPENCV_OPENCL_SAFE_CALL_HPP__ #define __OPENCV_OPENCL_SAFE_CALL_HPP__
#include "opencv2/ocl/cl_runtime/cl_runtime.hpp" #include "opencv2/core/opencl/runtime/opencl_core.hpp"
#define openCLSafeCall(expr) ___openCLSafeCall(expr, __FILE__, __LINE__, CV_Func) #define openCLSafeCall(expr) ___openCLSafeCall(expr, __FILE__, __LINE__, CV_Func)
#define openCLVerifyCall(res) ___openCLSafeCall(res, __FILE__, __LINE__, CV_Func) #define openCLVerifyCall(res) ___openCLSafeCall(res, __FILE__, __LINE__, CV_Func)
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
//M*/ //M*/
#include "test_precomp.hpp" #include "test_precomp.hpp"
#include "opencv2/ocl/cl_runtime/cl_runtime.hpp" // for OpenCL types: cl_mem #include "opencv2/core/opencl/runtime/opencl_core.hpp" // for OpenCL types: cl_mem
#include "opencv2/core/ocl.hpp" #include "opencv2/core/ocl.hpp"
TEST(TestAPI, openCLExecuteKernelInterop) TEST(TestAPI, openCLExecuteKernelInterop)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment