mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 08:13:04 +04:00
Merge branch 4.x
This commit is contained in:
@@ -80,15 +80,15 @@ int getTypeFromDXGI_FORMAT(const int iDXGI_FORMAT)
|
||||
case DXGI_FORMAT_R32G32B32_UINT:
|
||||
case DXGI_FORMAT_R32G32B32_SINT: return CV_32SC3;
|
||||
//case DXGI_FORMAT_R16G16B16A16_TYPELESS:
|
||||
//case DXGI_FORMAT_R16G16B16A16_FLOAT:
|
||||
case DXGI_FORMAT_R16G16B16A16_FLOAT: return CV_16FC4;
|
||||
case DXGI_FORMAT_R16G16B16A16_UNORM:
|
||||
case DXGI_FORMAT_R16G16B16A16_UINT: return CV_16UC4;
|
||||
case DXGI_FORMAT_R16G16B16A16_SNORM:
|
||||
case DXGI_FORMAT_R16G16B16A16_SINT: return CV_16SC4;
|
||||
//case DXGI_FORMAT_R32G32_TYPELESS:
|
||||
//case DXGI_FORMAT_R32G32_FLOAT:
|
||||
//case DXGI_FORMAT_R32G32_UINT:
|
||||
//case DXGI_FORMAT_R32G32_SINT:
|
||||
case DXGI_FORMAT_R32G32_FLOAT: return CV_32FC2;
|
||||
case DXGI_FORMAT_R32G32_UINT:
|
||||
case DXGI_FORMAT_R32G32_SINT: return CV_32SC2;
|
||||
//case DXGI_FORMAT_R32G8X24_TYPELESS:
|
||||
//case DXGI_FORMAT_D32_FLOAT_S8X24_UINT:
|
||||
//case DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS:
|
||||
@@ -104,13 +104,13 @@ int getTypeFromDXGI_FORMAT(const int iDXGI_FORMAT)
|
||||
case DXGI_FORMAT_R8G8B8A8_SNORM:
|
||||
case DXGI_FORMAT_R8G8B8A8_SINT: return CV_8SC4;
|
||||
//case DXGI_FORMAT_R16G16_TYPELESS:
|
||||
//case DXGI_FORMAT_R16G16_FLOAT:
|
||||
case DXGI_FORMAT_R16G16_FLOAT: return CV_16FC2;
|
||||
case DXGI_FORMAT_R16G16_UNORM:
|
||||
case DXGI_FORMAT_R16G16_UINT: return CV_16UC2;
|
||||
case DXGI_FORMAT_R16G16_SNORM:
|
||||
case DXGI_FORMAT_R16G16_SINT: return CV_16SC2;
|
||||
//case DXGI_FORMAT_R32_TYPELESS:
|
||||
//case DXGI_FORMAT_D32_FLOAT:
|
||||
case DXGI_FORMAT_D32_FLOAT:
|
||||
case DXGI_FORMAT_R32_FLOAT: return CV_32FC1;
|
||||
case DXGI_FORMAT_R32_UINT:
|
||||
case DXGI_FORMAT_R32_SINT: return CV_32SC1;
|
||||
@@ -124,7 +124,7 @@ int getTypeFromDXGI_FORMAT(const int iDXGI_FORMAT)
|
||||
case DXGI_FORMAT_R8G8_SNORM:
|
||||
case DXGI_FORMAT_R8G8_SINT: return CV_8SC2;
|
||||
//case DXGI_FORMAT_R16_TYPELESS:
|
||||
//case DXGI_FORMAT_R16_FLOAT:
|
||||
case DXGI_FORMAT_R16_FLOAT: return CV_16FC1;
|
||||
case DXGI_FORMAT_D16_UNORM:
|
||||
case DXGI_FORMAT_R16_UNORM:
|
||||
case DXGI_FORMAT_R16_UINT: return CV_16UC1;
|
||||
@@ -138,8 +138,8 @@ int getTypeFromDXGI_FORMAT(const int iDXGI_FORMAT)
|
||||
case DXGI_FORMAT_A8_UNORM: return CV_8UC1;
|
||||
//case DXGI_FORMAT_R1_UNORM:
|
||||
//case DXGI_FORMAT_R9G9B9E5_SHAREDEXP:
|
||||
//case DXGI_FORMAT_R8G8_B8G8_UNORM:
|
||||
//case DXGI_FORMAT_G8R8_G8B8_UNORM:
|
||||
case DXGI_FORMAT_R8G8_B8G8_UNORM:
|
||||
case DXGI_FORMAT_G8R8_G8B8_UNORM: return CV_8UC4;
|
||||
//case DXGI_FORMAT_BC1_TYPELESS:
|
||||
//case DXGI_FORMAT_BC1_UNORM:
|
||||
//case DXGI_FORMAT_BC1_UNORM_SRGB:
|
||||
|
||||
+25
-23
@@ -40,7 +40,7 @@
|
||||
//M*/
|
||||
|
||||
#include "precomp.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_clamdfft.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_clfft.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_core.hpp"
|
||||
#include "opencl_kernels_core.hpp"
|
||||
#include <map>
|
||||
@@ -2420,7 +2420,7 @@ namespace cv {
|
||||
|
||||
#define CLAMDDFT_Assert(func) \
|
||||
{ \
|
||||
clAmdFftStatus s = (func); \
|
||||
clfftStatus s = (func); \
|
||||
CV_Assert(s == CLFFT_SUCCESS); \
|
||||
}
|
||||
|
||||
@@ -2437,8 +2437,8 @@ class PlanCache
|
||||
bool dft_scale = (flags & DFT_SCALE) != 0;
|
||||
bool dft_rows = (flags & DFT_ROWS) != 0;
|
||||
|
||||
clAmdFftLayout inLayout = CLFFT_REAL, outLayout = CLFFT_REAL;
|
||||
clAmdFftDim dim = dft_size.height == 1 || dft_rows ? CLFFT_1D : CLFFT_2D;
|
||||
clfftLayout inLayout = CLFFT_REAL, outLayout = CLFFT_REAL;
|
||||
clfftDim dim = dft_size.height == 1 || dft_rows ? CLFFT_1D : CLFFT_2D;
|
||||
|
||||
size_t batchSize = dft_rows ? dft_size.height : 1;
|
||||
size_t clLengthsIn[3] = { (size_t)dft_size.width, dft_rows ? 1 : (size_t)dft_size.height, 1 };
|
||||
@@ -2475,28 +2475,30 @@ class PlanCache
|
||||
clStridesIn[2] = dft_rows ? clStridesIn[1] : dft_size.width * clStridesIn[1];
|
||||
clStridesOut[2] = dft_rows ? clStridesOut[1] : dft_size.width * clStridesOut[1];
|
||||
|
||||
CLAMDDFT_Assert(clAmdFftCreateDefaultPlan(&plHandle, (cl_context)ocl::Context::getDefault().ptr(), dim, clLengthsIn))
|
||||
CLAMDDFT_Assert(clfftCreateDefaultPlan(&plHandle, (cl_context)ocl::Context::getDefault().ptr(), dim, clLengthsIn))
|
||||
|
||||
// setting plan properties
|
||||
CLAMDDFT_Assert(clAmdFftSetPlanPrecision(plHandle, doubleFP ? CLFFT_DOUBLE : CLFFT_SINGLE));
|
||||
CLAMDDFT_Assert(clAmdFftSetResultLocation(plHandle, inplace ? CLFFT_INPLACE : CLFFT_OUTOFPLACE))
|
||||
CLAMDDFT_Assert(clAmdFftSetLayout(plHandle, inLayout, outLayout))
|
||||
CLAMDDFT_Assert(clAmdFftSetPlanBatchSize(plHandle, batchSize))
|
||||
CLAMDDFT_Assert(clAmdFftSetPlanInStride(plHandle, dim, clStridesIn))
|
||||
CLAMDDFT_Assert(clAmdFftSetPlanOutStride(plHandle, dim, clStridesOut))
|
||||
CLAMDDFT_Assert(clAmdFftSetPlanDistance(plHandle, clStridesIn[dim], clStridesOut[dim]))
|
||||
CLAMDDFT_Assert(clfftSetPlanPrecision(plHandle, doubleFP ? CLFFT_DOUBLE : CLFFT_SINGLE));
|
||||
CLAMDDFT_Assert(clfftSetResultLocation(plHandle, inplace ? CLFFT_INPLACE : CLFFT_OUTOFPLACE))
|
||||
CLAMDDFT_Assert(clfftSetLayout(plHandle, inLayout, outLayout))
|
||||
CLAMDDFT_Assert(clfftSetPlanBatchSize(plHandle, batchSize))
|
||||
CLAMDDFT_Assert(clfftSetPlanInStride(plHandle, dim, clStridesIn))
|
||||
CLAMDDFT_Assert(clfftSetPlanOutStride(plHandle, dim, clStridesOut))
|
||||
CLAMDDFT_Assert(clfftSetPlanDistance(plHandle, clStridesIn[dim], clStridesOut[dim]))
|
||||
|
||||
float scale = dft_scale ? 1.0f / (dft_rows ? dft_size.width : dft_size.area()) : 1.0f;
|
||||
CLAMDDFT_Assert(clAmdFftSetPlanScale(plHandle, dft_inverse ? CLFFT_BACKWARD : CLFFT_FORWARD, scale))
|
||||
CLAMDDFT_Assert(clfftSetPlanScale(plHandle, dft_inverse ? CLFFT_BACKWARD : CLFFT_FORWARD, scale))
|
||||
|
||||
// ready to bake
|
||||
cl_command_queue queue = (cl_command_queue)ocl::Queue::getDefault().ptr();
|
||||
CLAMDDFT_Assert(clAmdFftBakePlan(plHandle, 1, &queue, NULL, NULL))
|
||||
CLAMDDFT_Assert(clfftBakePlan(plHandle, 1, &queue, NULL, NULL))
|
||||
}
|
||||
|
||||
~FftPlan()
|
||||
{
|
||||
// clAmdFftDestroyPlan(&plHandle);
|
||||
// Do not tear down clFFT.
|
||||
// The user application may still use clFFT even after OpenCV is unloaded.
|
||||
/*clfftDestroyPlan(&plHandle);*/
|
||||
}
|
||||
|
||||
friend class PlanCache;
|
||||
@@ -2510,7 +2512,7 @@ class PlanCache
|
||||
FftType fftType;
|
||||
|
||||
cl_context context;
|
||||
clAmdFftPlanHandle plHandle;
|
||||
clfftPlanHandle plHandle;
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -2519,8 +2521,8 @@ public:
|
||||
CV_SINGLETON_LAZY_INIT_REF(PlanCache, new PlanCache())
|
||||
}
|
||||
|
||||
clAmdFftPlanHandle getPlanHandle(const Size & dft_size, int src_step, int dst_step, bool doubleFP,
|
||||
bool inplace, int flags, FftType fftType)
|
||||
clfftPlanHandle getPlanHandle(const Size & dft_size, int src_step, int dst_step, bool doubleFP,
|
||||
bool inplace, int flags, FftType fftType)
|
||||
{
|
||||
cl_context currentContext = (cl_context)ocl::Context::getDefault().ptr();
|
||||
|
||||
@@ -2620,13 +2622,13 @@ static bool ocl_dft_amdfft(InputArray _src, OutputArray _dst, int flags)
|
||||
UMat src = _src.getUMat(), dst = _dst.getUMat();
|
||||
bool inplace = src.u == dst.u;
|
||||
|
||||
clAmdFftPlanHandle plHandle = PlanCache::getInstance().
|
||||
clfftPlanHandle plHandle = PlanCache::getInstance().
|
||||
getPlanHandle(ssize, (int)src.step, (int)dst.step,
|
||||
depth == CV_64F, inplace, flags, fftType);
|
||||
|
||||
// get the bufferSize
|
||||
size_t bufferSize = 0;
|
||||
CLAMDDFT_Assert(clAmdFftGetTmpBufSize(plHandle, &bufferSize))
|
||||
CLAMDDFT_Assert(clfftGetTmpBufSize(plHandle, &bufferSize))
|
||||
UMat tmpBuffer(1, (int)bufferSize, CV_8UC1);
|
||||
|
||||
cl_mem srcarg = (cl_mem)src.handle(ACCESS_READ);
|
||||
@@ -2635,9 +2637,9 @@ static bool ocl_dft_amdfft(InputArray _src, OutputArray _dst, int flags)
|
||||
cl_command_queue queue = (cl_command_queue)ocl::Queue::getDefault().ptr();
|
||||
cl_event e = 0;
|
||||
|
||||
CLAMDDFT_Assert(clAmdFftEnqueueTransform(plHandle, dft_inverse ? CLFFT_BACKWARD : CLFFT_FORWARD,
|
||||
1, &queue, 0, NULL, &e,
|
||||
&srcarg, &dstarg, (cl_mem)tmpBuffer.handle(ACCESS_RW)))
|
||||
CLAMDDFT_Assert(clfftEnqueueTransform(plHandle, dft_inverse ? CLFFT_BACKWARD : CLFFT_FORWARD,
|
||||
1, &queue, 0, NULL, &e,
|
||||
&srcarg, &dstarg, (cl_mem)tmpBuffer.handle(ACCESS_RW)))
|
||||
|
||||
tmpBuffer.addref();
|
||||
clSetEventCallback(e, CL_COMPLETE, oclCleanupCallback, tmpBuffer.u);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include <sstream>
|
||||
#include "opencl_kernels_core.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_clamdblas.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_clblas.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_core.hpp"
|
||||
|
||||
namespace cv
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#include "precomp.hpp"
|
||||
#include "opencl_kernels_core.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_clamdblas.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_clblas.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_core.hpp"
|
||||
#include "intel_gpu_gemm.inl.hpp"
|
||||
|
||||
@@ -106,47 +106,47 @@ static bool ocl_gemm_amdblas( InputArray matA, InputArray matB, double alpha,
|
||||
int offa = (int)A.offset / esz, offb = (int)B.offset / esz, offc = (int)D.offset / esz;
|
||||
|
||||
cl_command_queue clq = (cl_command_queue)ocl::Queue::getDefault().ptr();
|
||||
clAmdBlasTranspose transA = atrans ? clAmdBlasTrans : clAmdBlasNoTrans;
|
||||
clAmdBlasTranspose transB = btrans ? clAmdBlasTrans : clAmdBlasNoTrans;
|
||||
clAmdBlasOrder order = clAmdBlasRowMajor;
|
||||
clAmdBlasStatus status = clAmdBlasSuccess;
|
||||
clblasTranspose transA = atrans ? clblasTrans : clblasNoTrans;
|
||||
clblasTranspose transB = btrans ? clblasTrans : clblasNoTrans;
|
||||
clblasOrder order = clblasRowMajor;
|
||||
clblasStatus status = clblasSuccess;
|
||||
|
||||
if (type == CV_32FC1)
|
||||
status = clAmdBlasSgemmEx(order, transA, transB, M, N, K,
|
||||
(cl_float)alpha, (const cl_mem)A.handle(ACCESS_READ), offa, lda,
|
||||
(const cl_mem)B.handle(ACCESS_READ), offb, ldb,
|
||||
(cl_float)beta, (cl_mem)D.handle(ACCESS_RW), offc, ldc,
|
||||
1, &clq, 0, NULL, NULL);
|
||||
status = clblasSgemm(order, transA, transB, M, N, K,
|
||||
(cl_float)alpha, (const cl_mem)A.handle(ACCESS_READ), offa, lda,
|
||||
(const cl_mem)B.handle(ACCESS_READ), offb, ldb,
|
||||
(cl_float)beta, (cl_mem)D.handle(ACCESS_RW), offc, ldc,
|
||||
1, &clq, 0, NULL, NULL);
|
||||
else if (type == CV_64FC1)
|
||||
status = clAmdBlasDgemmEx(order, transA, transB, M, N, K,
|
||||
alpha, (const cl_mem)A.handle(ACCESS_READ), offa, lda,
|
||||
(const cl_mem)B.handle(ACCESS_READ), offb, ldb,
|
||||
beta, (cl_mem)D.handle(ACCESS_RW), offc, ldc,
|
||||
1, &clq, 0, NULL, NULL);
|
||||
status = clblasDgemm(order, transA, transB, M, N, K,
|
||||
alpha, (const cl_mem)A.handle(ACCESS_READ), offa, lda,
|
||||
(const cl_mem)B.handle(ACCESS_READ), offb, ldb,
|
||||
beta, (cl_mem)D.handle(ACCESS_RW), offc, ldc,
|
||||
1, &clq, 0, NULL, NULL);
|
||||
else if (type == CV_32FC2)
|
||||
{
|
||||
cl_float2 alpha_2 = { { (cl_float)alpha, 0 } };
|
||||
cl_float2 beta_2 = { { (cl_float)beta, 0 } };
|
||||
status = clAmdBlasCgemmEx(order, transA, transB, M, N, K,
|
||||
alpha_2, (const cl_mem)A.handle(ACCESS_READ), offa, lda,
|
||||
(const cl_mem)B.handle(ACCESS_READ), offb, ldb,
|
||||
beta_2, (cl_mem)D.handle(ACCESS_RW), offc, ldc,
|
||||
1, &clq, 0, NULL, NULL);
|
||||
status = clblasCgemm(order, transA, transB, M, N, K,
|
||||
alpha_2, (const cl_mem)A.handle(ACCESS_READ), offa, lda,
|
||||
(const cl_mem)B.handle(ACCESS_READ), offb, ldb,
|
||||
beta_2, (cl_mem)D.handle(ACCESS_RW), offc, ldc,
|
||||
1, &clq, 0, NULL, NULL);
|
||||
}
|
||||
else if (type == CV_64FC2)
|
||||
{
|
||||
cl_double2 alpha_2 = { { alpha, 0 } };
|
||||
cl_double2 beta_2 = { { beta, 0 } };
|
||||
status = clAmdBlasZgemmEx(order, transA, transB, M, N, K,
|
||||
alpha_2, (const cl_mem)A.handle(ACCESS_READ), offa, lda,
|
||||
(const cl_mem)B.handle(ACCESS_READ), offb, ldb,
|
||||
beta_2, (cl_mem)D.handle(ACCESS_RW), offc, ldc,
|
||||
1, &clq, 0, NULL, NULL);
|
||||
status = clblasZgemm(order, transA, transB, M, N, K,
|
||||
alpha_2, (const cl_mem)A.handle(ACCESS_READ), offa, lda,
|
||||
(const cl_mem)B.handle(ACCESS_READ), offb, ldb,
|
||||
beta_2, (cl_mem)D.handle(ACCESS_RW), offc, ldc,
|
||||
1, &clq, 0, NULL, NULL);
|
||||
}
|
||||
else
|
||||
CV_Error(Error::StsUnsupportedFormat, "");
|
||||
|
||||
return status == clAmdBlasSuccess;
|
||||
return status == clblasSuccess;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+25
-15
@@ -108,8 +108,8 @@
|
||||
#define CV_OPENCL_SVM_TRACE_ERROR_P(...)
|
||||
#endif
|
||||
|
||||
#include "opencv2/core/opencl/runtime/opencl_clamdblas.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_clamdfft.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_clblas.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_clfft.hpp"
|
||||
|
||||
#include "opencv2/core/opencl/runtime/opencl_core.hpp"
|
||||
|
||||
@@ -1254,11 +1254,13 @@ public:
|
||||
|
||||
~AmdBlasHelper()
|
||||
{
|
||||
try
|
||||
// Do not tear down clBLAS.
|
||||
// The user application may still use clBLAS even after OpenCV is unloaded.
|
||||
/*try
|
||||
{
|
||||
clAmdBlasTeardown();
|
||||
clblasTeardown();
|
||||
}
|
||||
catch (...) { }
|
||||
catch (...) { }*/
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -1274,7 +1276,7 @@ protected:
|
||||
{
|
||||
try
|
||||
{
|
||||
g_isAmdBlasAvailable = clAmdBlasSetup() == clAmdBlasSuccess;
|
||||
g_isAmdBlasAvailable = clblasSetup() == clblasSuccess;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@@ -1328,11 +1330,13 @@ public:
|
||||
|
||||
~AmdFftHelper()
|
||||
{
|
||||
try
|
||||
// Do not tear down clFFT.
|
||||
// The user application may still use clFFT even after OpenCV is unloaded.
|
||||
/*try
|
||||
{
|
||||
// clAmdFftTeardown();
|
||||
clfftTeardown();
|
||||
}
|
||||
catch (...) { }
|
||||
catch (...) { }*/
|
||||
}
|
||||
|
||||
protected:
|
||||
@@ -1349,10 +1353,10 @@ protected:
|
||||
try
|
||||
{
|
||||
cl_uint major, minor, patch;
|
||||
CV_Assert(clAmdFftInitSetupData(&setupData) == CLFFT_SUCCESS);
|
||||
CV_Assert(clfftInitSetupData(&setupData) == CLFFT_SUCCESS);
|
||||
|
||||
// it throws exception in case AmdFft binaries are not found
|
||||
CV_Assert(clAmdFftGetVersion(&major, &minor, &patch) == CLFFT_SUCCESS);
|
||||
CV_Assert(clfftGetVersion(&major, &minor, &patch) == CLFFT_SUCCESS);
|
||||
g_isAmdFftAvailable = true;
|
||||
}
|
||||
catch (const Exception &)
|
||||
@@ -1369,12 +1373,12 @@ protected:
|
||||
}
|
||||
|
||||
private:
|
||||
static clAmdFftSetupData setupData;
|
||||
static clfftSetupData setupData;
|
||||
static bool g_isAmdFftInitialized;
|
||||
static bool g_isAmdFftAvailable;
|
||||
};
|
||||
|
||||
clAmdFftSetupData AmdFftHelper::setupData;
|
||||
clfftSetupData AmdFftHelper::setupData;
|
||||
bool AmdFftHelper::g_isAmdFftAvailable = false;
|
||||
bool AmdFftHelper::g_isAmdFftInitialized = false;
|
||||
|
||||
@@ -5518,13 +5522,19 @@ public:
|
||||
&& !(u->originalUMatData && u->originalUMatData->handle)
|
||||
)
|
||||
{
|
||||
handle = clCreateBuffer(ctx_handle, CL_MEM_USE_HOST_PTR|createFlags,
|
||||
// Change the host-side origdata[size] to "pinned memory" that enables fast
|
||||
// DMA-transfers over PCIe to the device. Often used with clEnqueueMapBuffer/clEnqueueUnmapMemObject
|
||||
handle = clCreateBuffer(ctx_handle, CL_MEM_USE_HOST_PTR|(createFlags & ~CL_MEM_ALLOC_HOST_PTR),
|
||||
u->size, u->origdata, &retval);
|
||||
CV_OCL_DBG_CHECK_RESULT(retval, cv::format("clCreateBuffer(CL_MEM_USE_HOST_PTR|createFlags, sz=%lld, origdata=%p) => %p",
|
||||
CV_OCL_DBG_CHECK_RESULT(retval, cv::format("clCreateBuffer(CL_MEM_USE_HOST_PTR|(createFlags & ~CL_MEM_ALLOC_HOST_PTR), sz=%lld, origdata=%p) => %p",
|
||||
(long long int)u->size, u->origdata, (void*)handle).c_str());
|
||||
}
|
||||
if((!handle || retval < 0) && !(accessFlags & ACCESS_FAST))
|
||||
{
|
||||
// Allocate device-side memory and immediately copy data from the host-side pointer origdata[size].
|
||||
// If createFlags=CL_MEM_ALLOC_HOST_PTR (aka cv::USAGE_ALLOCATE_HOST_MEMORY), then
|
||||
// additionally allocate a host-side "pinned" duplicate of the origdata that is
|
||||
// managed by OpenCL. This is potentially faster in unaligned/unmanaged scenarios.
|
||||
handle = clCreateBuffer(ctx_handle, CL_MEM_COPY_HOST_PTR|CL_MEM_READ_WRITE|createFlags,
|
||||
u->size, u->origdata, &retval);
|
||||
CV_OCL_DBG_CHECK_RESULT(retval, cv::format("clCreateBuffer(CL_MEM_COPY_HOST_PTR|CL_MEM_READ_WRITE|createFlags, sz=%lld, origdata=%p) => %p",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,357 +0,0 @@
|
||||
//
|
||||
// AUTOGENERATED, DO NOT EDIT
|
||||
//
|
||||
// generated by parser_clamdfft.py
|
||||
enum OPENCLAMDFFT_FN_ID {
|
||||
OPENCLAMDFFT_FN_clAmdFftBakePlan = 0,
|
||||
// OPENCLAMDFFT_FN_clAmdFftCopyPlan = 1,
|
||||
OPENCLAMDFFT_FN_clAmdFftCreateDefaultPlan = 2,
|
||||
OPENCLAMDFFT_FN_clAmdFftDestroyPlan = 3,
|
||||
OPENCLAMDFFT_FN_clAmdFftEnqueueTransform = 4,
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetLayout = 5,
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanBatchSize = 6,
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanContext = 7,
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanDim = 8,
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanDistance = 9,
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanInStride = 10,
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanLength = 11,
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanOutStride = 12,
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanPrecision = 13,
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanScale = 14,
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanTransposeResult = 15,
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetResultLocation = 16,
|
||||
OPENCLAMDFFT_FN_clAmdFftGetTmpBufSize = 17,
|
||||
OPENCLAMDFFT_FN_clAmdFftGetVersion = 18,
|
||||
OPENCLAMDFFT_FN_clAmdFftSetLayout = 19,
|
||||
OPENCLAMDFFT_FN_clAmdFftSetPlanBatchSize = 20,
|
||||
// OPENCLAMDFFT_FN_clAmdFftSetPlanDim = 21,
|
||||
OPENCLAMDFFT_FN_clAmdFftSetPlanDistance = 22,
|
||||
OPENCLAMDFFT_FN_clAmdFftSetPlanInStride = 23,
|
||||
// OPENCLAMDFFT_FN_clAmdFftSetPlanLength = 24,
|
||||
OPENCLAMDFFT_FN_clAmdFftSetPlanOutStride = 25,
|
||||
OPENCLAMDFFT_FN_clAmdFftSetPlanPrecision = 26,
|
||||
OPENCLAMDFFT_FN_clAmdFftSetPlanScale = 27,
|
||||
// OPENCLAMDFFT_FN_clAmdFftSetPlanTransposeResult = 28,
|
||||
OPENCLAMDFFT_FN_clAmdFftSetResultLocation = 29,
|
||||
OPENCLAMDFFT_FN_clAmdFftSetup = 30,
|
||||
OPENCLAMDFFT_FN_clAmdFftTeardown = 31,
|
||||
};
|
||||
|
||||
namespace {
|
||||
// generated by parser_clamdfft.py
|
||||
#define openclamdfft_fn0(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(); } \
|
||||
|
||||
#define openclamdfft_fn1(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1); } \
|
||||
|
||||
#define openclamdfft_fn2(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2); } \
|
||||
|
||||
#define openclamdfft_fn3(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3); } \
|
||||
|
||||
#define openclamdfft_fn4(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4); } \
|
||||
|
||||
#define openclamdfft_fn5(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5); } \
|
||||
|
||||
#define openclamdfft_fn6(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6); } \
|
||||
|
||||
#define openclamdfft_fn7(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7); } \
|
||||
|
||||
#define openclamdfft_fn8(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8); } \
|
||||
|
||||
#define openclamdfft_fn9(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9); } \
|
||||
|
||||
#define openclamdfft_fn10(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } \
|
||||
|
||||
#define openclamdfft_fn11(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } \
|
||||
|
||||
#define openclamdfft_fn12(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } \
|
||||
|
||||
#define openclamdfft_fn13(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); } \
|
||||
|
||||
#define openclamdfft_fn14(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); } \
|
||||
|
||||
#define openclamdfft_fn15(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15); } \
|
||||
|
||||
#define openclamdfft_fn16(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16); } \
|
||||
|
||||
#define openclamdfft_fn17(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17); } \
|
||||
|
||||
#define openclamdfft_fn18(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18); } \
|
||||
|
||||
#define openclamdfft_fn19(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19); } \
|
||||
|
||||
#define openclamdfft_fn20(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20); } \
|
||||
|
||||
#define openclamdfft_fn21(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21); } \
|
||||
|
||||
#define openclamdfft_fn22(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22); } \
|
||||
|
||||
}
|
||||
|
||||
// generated by parser_clamdfft.py
|
||||
openclamdfft_fn5(OPENCLAMDFFT_FN_clAmdFftBakePlan, clAmdFftStatus, (clAmdFftPlanHandle p1, cl_uint p2, cl_command_queue* p3, void (CL_CALLBACK*p4) (clAmdFftPlanHandle plHandle, void* user_data), void* p5))
|
||||
clAmdFftStatus (*clAmdFftBakePlan)(clAmdFftPlanHandle, cl_uint, cl_command_queue*, void (CL_CALLBACK*) (clAmdFftPlanHandle plHandle, void* user_data), void*) =
|
||||
OPENCLAMDFFT_FN_clAmdFftBakePlan_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftBakePlan_definition = { "clAmdFftBakePlan", (void**)&clAmdFftBakePlan};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftCopyPlan, clAmdFftStatus, (clAmdFftPlanHandle* p1, cl_context p2, clAmdFftPlanHandle p3))
|
||||
//clAmdFftStatus (*clAmdFftCopyPlan)(clAmdFftPlanHandle*, cl_context, clAmdFftPlanHandle) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftCopyPlan_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftCopyPlan_definition = { "clAmdFftCopyPlan", (void**)&clAmdFftCopyPlan};
|
||||
|
||||
openclamdfft_fn4(OPENCLAMDFFT_FN_clAmdFftCreateDefaultPlan, clAmdFftStatus, (clAmdFftPlanHandle* p1, cl_context p2, const clAmdFftDim p3, const size_t* p4))
|
||||
clAmdFftStatus (*clAmdFftCreateDefaultPlan)(clAmdFftPlanHandle*, cl_context, const clAmdFftDim, const size_t*) =
|
||||
OPENCLAMDFFT_FN_clAmdFftCreateDefaultPlan_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftCreateDefaultPlan_definition = { "clAmdFftCreateDefaultPlan", (void**)&clAmdFftCreateDefaultPlan};
|
||||
|
||||
openclamdfft_fn1(OPENCLAMDFFT_FN_clAmdFftDestroyPlan, clAmdFftStatus, (clAmdFftPlanHandle* p1))
|
||||
clAmdFftStatus (*clAmdFftDestroyPlan)(clAmdFftPlanHandle*) =
|
||||
OPENCLAMDFFT_FN_clAmdFftDestroyPlan_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftDestroyPlan_definition = { "clAmdFftDestroyPlan", (void**)&clAmdFftDestroyPlan};
|
||||
|
||||
openclamdfft_fn10(OPENCLAMDFFT_FN_clAmdFftEnqueueTransform, clAmdFftStatus, (clAmdFftPlanHandle p1, clAmdFftDirection p2, cl_uint p3, cl_command_queue* p4, cl_uint p5, const cl_event* p6, cl_event* p7, cl_mem* p8, cl_mem* p9, cl_mem p10))
|
||||
clAmdFftStatus (*clAmdFftEnqueueTransform)(clAmdFftPlanHandle, clAmdFftDirection, cl_uint, cl_command_queue*, cl_uint, const cl_event*, cl_event*, cl_mem*, cl_mem*, cl_mem) =
|
||||
OPENCLAMDFFT_FN_clAmdFftEnqueueTransform_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftEnqueueTransform_definition = { "clAmdFftEnqueueTransform", (void**)&clAmdFftEnqueueTransform};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftGetLayout, clAmdFftStatus, (const clAmdFftPlanHandle p1, clAmdFftLayout* p2, clAmdFftLayout* p3))
|
||||
//clAmdFftStatus (*clAmdFftGetLayout)(const clAmdFftPlanHandle, clAmdFftLayout*, clAmdFftLayout*) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetLayout_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftGetLayout_definition = { "clAmdFftGetLayout", (void**)&clAmdFftGetLayout};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clAmdFftGetPlanBatchSize, clAmdFftStatus, (const clAmdFftPlanHandle p1, size_t* p2))
|
||||
//clAmdFftStatus (*clAmdFftGetPlanBatchSize)(const clAmdFftPlanHandle, size_t*) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanBatchSize_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftGetPlanBatchSize_definition = { "clAmdFftGetPlanBatchSize", (void**)&clAmdFftGetPlanBatchSize};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clAmdFftGetPlanContext, clAmdFftStatus, (const clAmdFftPlanHandle p1, cl_context* p2))
|
||||
//clAmdFftStatus (*clAmdFftGetPlanContext)(const clAmdFftPlanHandle, cl_context*) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanContext_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftGetPlanContext_definition = { "clAmdFftGetPlanContext", (void**)&clAmdFftGetPlanContext};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftGetPlanDim, clAmdFftStatus, (const clAmdFftPlanHandle p1, clAmdFftDim* p2, cl_uint* p3))
|
||||
//clAmdFftStatus (*clAmdFftGetPlanDim)(const clAmdFftPlanHandle, clAmdFftDim*, cl_uint*) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanDim_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftGetPlanDim_definition = { "clAmdFftGetPlanDim", (void**)&clAmdFftGetPlanDim};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftGetPlanDistance, clAmdFftStatus, (const clAmdFftPlanHandle p1, size_t* p2, size_t* p3))
|
||||
//clAmdFftStatus (*clAmdFftGetPlanDistance)(const clAmdFftPlanHandle, size_t*, size_t*) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanDistance_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftGetPlanDistance_definition = { "clAmdFftGetPlanDistance", (void**)&clAmdFftGetPlanDistance};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftGetPlanInStride, clAmdFftStatus, (const clAmdFftPlanHandle p1, const clAmdFftDim p2, size_t* p3))
|
||||
//clAmdFftStatus (*clAmdFftGetPlanInStride)(const clAmdFftPlanHandle, const clAmdFftDim, size_t*) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanInStride_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftGetPlanInStride_definition = { "clAmdFftGetPlanInStride", (void**)&clAmdFftGetPlanInStride};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftGetPlanLength, clAmdFftStatus, (const clAmdFftPlanHandle p1, const clAmdFftDim p2, size_t* p3))
|
||||
//clAmdFftStatus (*clAmdFftGetPlanLength)(const clAmdFftPlanHandle, const clAmdFftDim, size_t*) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanLength_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftGetPlanLength_definition = { "clAmdFftGetPlanLength", (void**)&clAmdFftGetPlanLength};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftGetPlanOutStride, clAmdFftStatus, (const clAmdFftPlanHandle p1, const clAmdFftDim p2, size_t* p3))
|
||||
//clAmdFftStatus (*clAmdFftGetPlanOutStride)(const clAmdFftPlanHandle, const clAmdFftDim, size_t*) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanOutStride_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftGetPlanOutStride_definition = { "clAmdFftGetPlanOutStride", (void**)&clAmdFftGetPlanOutStride};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clAmdFftGetPlanPrecision, clAmdFftStatus, (const clAmdFftPlanHandle p1, clAmdFftPrecision* p2))
|
||||
//clAmdFftStatus (*clAmdFftGetPlanPrecision)(const clAmdFftPlanHandle, clAmdFftPrecision*) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanPrecision_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftGetPlanPrecision_definition = { "clAmdFftGetPlanPrecision", (void**)&clAmdFftGetPlanPrecision};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftGetPlanScale, clAmdFftStatus, (const clAmdFftPlanHandle p1, clAmdFftDirection p2, cl_float* p3))
|
||||
//clAmdFftStatus (*clAmdFftGetPlanScale)(const clAmdFftPlanHandle, clAmdFftDirection, cl_float*) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanScale_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftGetPlanScale_definition = { "clAmdFftGetPlanScale", (void**)&clAmdFftGetPlanScale};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clAmdFftGetPlanTransposeResult, clAmdFftStatus, (const clAmdFftPlanHandle p1, clAmdFftResultTransposed* p2))
|
||||
//clAmdFftStatus (*clAmdFftGetPlanTransposeResult)(const clAmdFftPlanHandle, clAmdFftResultTransposed*) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetPlanTransposeResult_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftGetPlanTransposeResult_definition = { "clAmdFftGetPlanTransposeResult", (void**)&clAmdFftGetPlanTransposeResult};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clAmdFftGetResultLocation, clAmdFftStatus, (const clAmdFftPlanHandle p1, clAmdFftResultLocation* p2))
|
||||
//clAmdFftStatus (*clAmdFftGetResultLocation)(const clAmdFftPlanHandle, clAmdFftResultLocation*) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftGetResultLocation_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftGetResultLocation_definition = { "clAmdFftGetResultLocation", (void**)&clAmdFftGetResultLocation};
|
||||
|
||||
openclamdfft_fn2(OPENCLAMDFFT_FN_clAmdFftGetTmpBufSize, clAmdFftStatus, (const clAmdFftPlanHandle p1, size_t* p2))
|
||||
clAmdFftStatus (*clAmdFftGetTmpBufSize)(const clAmdFftPlanHandle, size_t*) =
|
||||
OPENCLAMDFFT_FN_clAmdFftGetTmpBufSize_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftGetTmpBufSize_definition = { "clAmdFftGetTmpBufSize", (void**)&clAmdFftGetTmpBufSize};
|
||||
|
||||
openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftGetVersion, clAmdFftStatus, (cl_uint* p1, cl_uint* p2, cl_uint* p3))
|
||||
clAmdFftStatus (*clAmdFftGetVersion)(cl_uint*, cl_uint*, cl_uint*) =
|
||||
OPENCLAMDFFT_FN_clAmdFftGetVersion_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftGetVersion_definition = { "clAmdFftGetVersion", (void**)&clAmdFftGetVersion};
|
||||
|
||||
openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftSetLayout, clAmdFftStatus, (clAmdFftPlanHandle p1, clAmdFftLayout p2, clAmdFftLayout p3))
|
||||
clAmdFftStatus (*clAmdFftSetLayout)(clAmdFftPlanHandle, clAmdFftLayout, clAmdFftLayout) =
|
||||
OPENCLAMDFFT_FN_clAmdFftSetLayout_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftSetLayout_definition = { "clAmdFftSetLayout", (void**)&clAmdFftSetLayout};
|
||||
|
||||
openclamdfft_fn2(OPENCLAMDFFT_FN_clAmdFftSetPlanBatchSize, clAmdFftStatus, (clAmdFftPlanHandle p1, size_t p2))
|
||||
clAmdFftStatus (*clAmdFftSetPlanBatchSize)(clAmdFftPlanHandle, size_t) =
|
||||
OPENCLAMDFFT_FN_clAmdFftSetPlanBatchSize_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftSetPlanBatchSize_definition = { "clAmdFftSetPlanBatchSize", (void**)&clAmdFftSetPlanBatchSize};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clAmdFftSetPlanDim, clAmdFftStatus, (clAmdFftPlanHandle p1, const clAmdFftDim p2))
|
||||
//clAmdFftStatus (*clAmdFftSetPlanDim)(clAmdFftPlanHandle, const clAmdFftDim) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftSetPlanDim_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftSetPlanDim_definition = { "clAmdFftSetPlanDim", (void**)&clAmdFftSetPlanDim};
|
||||
|
||||
openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftSetPlanDistance, clAmdFftStatus, (clAmdFftPlanHandle p1, size_t p2, size_t p3))
|
||||
clAmdFftStatus (*clAmdFftSetPlanDistance)(clAmdFftPlanHandle, size_t, size_t) =
|
||||
OPENCLAMDFFT_FN_clAmdFftSetPlanDistance_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftSetPlanDistance_definition = { "clAmdFftSetPlanDistance", (void**)&clAmdFftSetPlanDistance};
|
||||
|
||||
openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftSetPlanInStride, clAmdFftStatus, (clAmdFftPlanHandle p1, const clAmdFftDim p2, size_t* p3))
|
||||
clAmdFftStatus (*clAmdFftSetPlanInStride)(clAmdFftPlanHandle, const clAmdFftDim, size_t*) =
|
||||
OPENCLAMDFFT_FN_clAmdFftSetPlanInStride_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftSetPlanInStride_definition = { "clAmdFftSetPlanInStride", (void**)&clAmdFftSetPlanInStride};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftSetPlanLength, clAmdFftStatus, (clAmdFftPlanHandle p1, const clAmdFftDim p2, const size_t* p3))
|
||||
//clAmdFftStatus (*clAmdFftSetPlanLength)(clAmdFftPlanHandle, const clAmdFftDim, const size_t*) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftSetPlanLength_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftSetPlanLength_definition = { "clAmdFftSetPlanLength", (void**)&clAmdFftSetPlanLength};
|
||||
|
||||
openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftSetPlanOutStride, clAmdFftStatus, (clAmdFftPlanHandle p1, const clAmdFftDim p2, size_t* p3))
|
||||
clAmdFftStatus (*clAmdFftSetPlanOutStride)(clAmdFftPlanHandle, const clAmdFftDim, size_t*) =
|
||||
OPENCLAMDFFT_FN_clAmdFftSetPlanOutStride_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftSetPlanOutStride_definition = { "clAmdFftSetPlanOutStride", (void**)&clAmdFftSetPlanOutStride};
|
||||
|
||||
openclamdfft_fn2(OPENCLAMDFFT_FN_clAmdFftSetPlanPrecision, clAmdFftStatus, (clAmdFftPlanHandle p1, clAmdFftPrecision p2))
|
||||
clAmdFftStatus (*clAmdFftSetPlanPrecision)(clAmdFftPlanHandle, clAmdFftPrecision) =
|
||||
OPENCLAMDFFT_FN_clAmdFftSetPlanPrecision_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftSetPlanPrecision_definition = { "clAmdFftSetPlanPrecision", (void**)&clAmdFftSetPlanPrecision};
|
||||
|
||||
openclamdfft_fn3(OPENCLAMDFFT_FN_clAmdFftSetPlanScale, clAmdFftStatus, (clAmdFftPlanHandle p1, clAmdFftDirection p2, cl_float p3))
|
||||
clAmdFftStatus (*clAmdFftSetPlanScale)(clAmdFftPlanHandle, clAmdFftDirection, cl_float) =
|
||||
OPENCLAMDFFT_FN_clAmdFftSetPlanScale_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftSetPlanScale_definition = { "clAmdFftSetPlanScale", (void**)&clAmdFftSetPlanScale};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clAmdFftSetPlanTransposeResult, clAmdFftStatus, (clAmdFftPlanHandle p1, clAmdFftResultTransposed p2))
|
||||
//clAmdFftStatus (*clAmdFftSetPlanTransposeResult)(clAmdFftPlanHandle, clAmdFftResultTransposed) =
|
||||
// OPENCLAMDFFT_FN_clAmdFftSetPlanTransposeResult_switch_fn;
|
||||
//static const struct DynamicFnEntry clAmdFftSetPlanTransposeResult_definition = { "clAmdFftSetPlanTransposeResult", (void**)&clAmdFftSetPlanTransposeResult};
|
||||
|
||||
openclamdfft_fn2(OPENCLAMDFFT_FN_clAmdFftSetResultLocation, clAmdFftStatus, (clAmdFftPlanHandle p1, clAmdFftResultLocation p2))
|
||||
clAmdFftStatus (*clAmdFftSetResultLocation)(clAmdFftPlanHandle, clAmdFftResultLocation) =
|
||||
OPENCLAMDFFT_FN_clAmdFftSetResultLocation_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftSetResultLocation_definition = { "clAmdFftSetResultLocation", (void**)&clAmdFftSetResultLocation};
|
||||
|
||||
openclamdfft_fn1(OPENCLAMDFFT_FN_clAmdFftSetup, clAmdFftStatus, (const clAmdFftSetupData* p1))
|
||||
clAmdFftStatus (*clAmdFftSetup)(const clAmdFftSetupData*) =
|
||||
OPENCLAMDFFT_FN_clAmdFftSetup_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftSetup_definition = { "clAmdFftSetup", (void**)&clAmdFftSetup};
|
||||
|
||||
openclamdfft_fn0(OPENCLAMDFFT_FN_clAmdFftTeardown, clAmdFftStatus, ())
|
||||
clAmdFftStatus (*clAmdFftTeardown)() =
|
||||
OPENCLAMDFFT_FN_clAmdFftTeardown_switch_fn;
|
||||
static const struct DynamicFnEntry clAmdFftTeardown_definition = { "clAmdFftTeardown", (void**)&clAmdFftTeardown};
|
||||
|
||||
|
||||
// generated by parser_clamdfft.py
|
||||
static const struct DynamicFnEntry* openclamdfft_fn[] = {
|
||||
&clAmdFftBakePlan_definition,
|
||||
NULL/*&clAmdFftCopyPlan_definition*/,
|
||||
&clAmdFftCreateDefaultPlan_definition,
|
||||
&clAmdFftDestroyPlan_definition,
|
||||
&clAmdFftEnqueueTransform_definition,
|
||||
NULL/*&clAmdFftGetLayout_definition*/,
|
||||
NULL/*&clAmdFftGetPlanBatchSize_definition*/,
|
||||
NULL/*&clAmdFftGetPlanContext_definition*/,
|
||||
NULL/*&clAmdFftGetPlanDim_definition*/,
|
||||
NULL/*&clAmdFftGetPlanDistance_definition*/,
|
||||
NULL/*&clAmdFftGetPlanInStride_definition*/,
|
||||
NULL/*&clAmdFftGetPlanLength_definition*/,
|
||||
NULL/*&clAmdFftGetPlanOutStride_definition*/,
|
||||
NULL/*&clAmdFftGetPlanPrecision_definition*/,
|
||||
NULL/*&clAmdFftGetPlanScale_definition*/,
|
||||
NULL/*&clAmdFftGetPlanTransposeResult_definition*/,
|
||||
NULL/*&clAmdFftGetResultLocation_definition*/,
|
||||
&clAmdFftGetTmpBufSize_definition,
|
||||
&clAmdFftGetVersion_definition,
|
||||
&clAmdFftSetLayout_definition,
|
||||
&clAmdFftSetPlanBatchSize_definition,
|
||||
NULL/*&clAmdFftSetPlanDim_definition*/,
|
||||
&clAmdFftSetPlanDistance_definition,
|
||||
&clAmdFftSetPlanInStride_definition,
|
||||
NULL/*&clAmdFftSetPlanLength_definition*/,
|
||||
&clAmdFftSetPlanOutStride_definition,
|
||||
&clAmdFftSetPlanPrecision_definition,
|
||||
&clAmdFftSetPlanScale_definition,
|
||||
NULL/*&clAmdFftSetPlanTransposeResult_definition*/,
|
||||
&clAmdFftSetResultLocation_definition,
|
||||
&clAmdFftSetup_definition,
|
||||
&clAmdFftTeardown_definition,
|
||||
};
|
||||
|
||||
// number of enabled functions: 16
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,364 @@
|
||||
//
|
||||
// AUTOGENERATED, DO NOT EDIT
|
||||
//
|
||||
// generated by parser_clfft.py
|
||||
enum OPENCLAMDFFT_FN_ID {
|
||||
OPENCLAMDFFT_FN_clfftBakePlan = 0,
|
||||
// OPENCLAMDFFT_FN_clfftCopyPlan = 1,
|
||||
OPENCLAMDFFT_FN_clfftCreateDefaultPlan = 2,
|
||||
OPENCLAMDFFT_FN_clfftDestroyPlan = 3,
|
||||
OPENCLAMDFFT_FN_clfftEnqueueTransform = 4,
|
||||
// OPENCLAMDFFT_FN_clfftGetLayout = 5,
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanBatchSize = 6,
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanContext = 7,
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanDim = 8,
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanDistance = 9,
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanInStride = 10,
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanLength = 11,
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanOutStride = 12,
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanPrecision = 13,
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanScale = 14,
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanTransposeResult = 15,
|
||||
// OPENCLAMDFFT_FN_clfftGetResultLocation = 16,
|
||||
OPENCLAMDFFT_FN_clfftGetTmpBufSize = 17,
|
||||
OPENCLAMDFFT_FN_clfftGetVersion = 18,
|
||||
OPENCLAMDFFT_FN_clfftSetLayout = 19,
|
||||
OPENCLAMDFFT_FN_clfftSetPlanBatchSize = 20,
|
||||
// OPENCLAMDFFT_FN_clfftSetPlanCallback = 21,
|
||||
// OPENCLAMDFFT_FN_clfftSetPlanDim = 22,
|
||||
OPENCLAMDFFT_FN_clfftSetPlanDistance = 23,
|
||||
OPENCLAMDFFT_FN_clfftSetPlanInStride = 24,
|
||||
// OPENCLAMDFFT_FN_clfftSetPlanLength = 25,
|
||||
OPENCLAMDFFT_FN_clfftSetPlanOutStride = 26,
|
||||
OPENCLAMDFFT_FN_clfftSetPlanPrecision = 27,
|
||||
OPENCLAMDFFT_FN_clfftSetPlanScale = 28,
|
||||
// OPENCLAMDFFT_FN_clfftSetPlanTransposeResult = 29,
|
||||
OPENCLAMDFFT_FN_clfftSetResultLocation = 30,
|
||||
OPENCLAMDFFT_FN_clfftSetup = 31,
|
||||
OPENCLAMDFFT_FN_clfftTeardown = 32,
|
||||
};
|
||||
|
||||
namespace {
|
||||
// generated by parser_clfft.py
|
||||
#define openclamdfft_fn0(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(); } \
|
||||
|
||||
#define openclamdfft_fn1(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1); } \
|
||||
|
||||
#define openclamdfft_fn2(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2); } \
|
||||
|
||||
#define openclamdfft_fn3(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3); } \
|
||||
|
||||
#define openclamdfft_fn4(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4); } \
|
||||
|
||||
#define openclamdfft_fn5(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5); } \
|
||||
|
||||
#define openclamdfft_fn6(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6); } \
|
||||
|
||||
#define openclamdfft_fn7(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7); } \
|
||||
|
||||
#define openclamdfft_fn8(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8); } \
|
||||
|
||||
#define openclamdfft_fn9(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9); } \
|
||||
|
||||
#define openclamdfft_fn10(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10); } \
|
||||
|
||||
#define openclamdfft_fn11(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11); } \
|
||||
|
||||
#define openclamdfft_fn12(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12); } \
|
||||
|
||||
#define openclamdfft_fn13(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13); } \
|
||||
|
||||
#define openclamdfft_fn14(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14); } \
|
||||
|
||||
#define openclamdfft_fn15(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15); } \
|
||||
|
||||
#define openclamdfft_fn16(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16); } \
|
||||
|
||||
#define openclamdfft_fn17(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17); } \
|
||||
|
||||
#define openclamdfft_fn18(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18); } \
|
||||
|
||||
#define openclamdfft_fn19(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19); } \
|
||||
|
||||
#define openclamdfft_fn20(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20); } \
|
||||
|
||||
#define openclamdfft_fn21(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21); } \
|
||||
|
||||
#define openclamdfft_fn22(ID, _R, decl_args) \
|
||||
typedef _R (*ID##FN)decl_args; \
|
||||
static _R ID##_switch_fn decl_args \
|
||||
{ return ((ID##FN)openclamdfft_check_fn(ID))(p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16, p17, p18, p19, p20, p21, p22); } \
|
||||
|
||||
}
|
||||
|
||||
// generated by parser_clfft.py
|
||||
openclamdfft_fn5(OPENCLAMDFFT_FN_clfftBakePlan, clfftStatus, (clfftPlanHandle p1, cl_uint p2, cl_command_queue* p3, void (CL_CALLBACK*p4) (clfftPlanHandle plHandle, void* user_data), void* p5))
|
||||
clfftStatus (*clfftBakePlan)(clfftPlanHandle, cl_uint, cl_command_queue*, void (CL_CALLBACK*) (clfftPlanHandle plHandle, void* user_data), void*) =
|
||||
OPENCLAMDFFT_FN_clfftBakePlan_switch_fn;
|
||||
static const struct DynamicFnEntry clfftBakePlan_definition = { "clfftBakePlan", (void**)&clfftBakePlan};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clfftCopyPlan, clfftStatus, (clfftPlanHandle* p1, cl_context p2, clfftPlanHandle p3))
|
||||
//clfftStatus (*clfftCopyPlan)(clfftPlanHandle*, cl_context, clfftPlanHandle) =
|
||||
// OPENCLAMDFFT_FN_clfftCopyPlan_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftCopyPlan_definition = { "clfftCopyPlan", (void**)&clfftCopyPlan};
|
||||
|
||||
openclamdfft_fn4(OPENCLAMDFFT_FN_clfftCreateDefaultPlan, clfftStatus, (clfftPlanHandle* p1, cl_context p2, const clfftDim p3, const size_t* p4))
|
||||
clfftStatus (*clfftCreateDefaultPlan)(clfftPlanHandle*, cl_context, const clfftDim, const size_t*) =
|
||||
OPENCLAMDFFT_FN_clfftCreateDefaultPlan_switch_fn;
|
||||
static const struct DynamicFnEntry clfftCreateDefaultPlan_definition = { "clfftCreateDefaultPlan", (void**)&clfftCreateDefaultPlan};
|
||||
|
||||
openclamdfft_fn1(OPENCLAMDFFT_FN_clfftDestroyPlan, clfftStatus, (clfftPlanHandle* p1))
|
||||
clfftStatus (*clfftDestroyPlan)(clfftPlanHandle*) =
|
||||
OPENCLAMDFFT_FN_clfftDestroyPlan_switch_fn;
|
||||
static const struct DynamicFnEntry clfftDestroyPlan_definition = { "clfftDestroyPlan", (void**)&clfftDestroyPlan};
|
||||
|
||||
openclamdfft_fn10(OPENCLAMDFFT_FN_clfftEnqueueTransform, clfftStatus, (clfftPlanHandle p1, clfftDirection p2, cl_uint p3, cl_command_queue* p4, cl_uint p5, const cl_event* p6, cl_event* p7, cl_mem* p8, cl_mem* p9, cl_mem p10))
|
||||
clfftStatus (*clfftEnqueueTransform)(clfftPlanHandle, clfftDirection, cl_uint, cl_command_queue*, cl_uint, const cl_event*, cl_event*, cl_mem*, cl_mem*, cl_mem) =
|
||||
OPENCLAMDFFT_FN_clfftEnqueueTransform_switch_fn;
|
||||
static const struct DynamicFnEntry clfftEnqueueTransform_definition = { "clfftEnqueueTransform", (void**)&clfftEnqueueTransform};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clfftGetLayout, clfftStatus, (const clfftPlanHandle p1, clfftLayout* p2, clfftLayout* p3))
|
||||
//clfftStatus (*clfftGetLayout)(const clfftPlanHandle, clfftLayout*, clfftLayout*) =
|
||||
// OPENCLAMDFFT_FN_clfftGetLayout_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftGetLayout_definition = { "clfftGetLayout", (void**)&clfftGetLayout};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clfftGetPlanBatchSize, clfftStatus, (const clfftPlanHandle p1, size_t* p2))
|
||||
//clfftStatus (*clfftGetPlanBatchSize)(const clfftPlanHandle, size_t*) =
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanBatchSize_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftGetPlanBatchSize_definition = { "clfftGetPlanBatchSize", (void**)&clfftGetPlanBatchSize};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clfftGetPlanContext, clfftStatus, (const clfftPlanHandle p1, cl_context* p2))
|
||||
//clfftStatus (*clfftGetPlanContext)(const clfftPlanHandle, cl_context*) =
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanContext_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftGetPlanContext_definition = { "clfftGetPlanContext", (void**)&clfftGetPlanContext};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clfftGetPlanDim, clfftStatus, (const clfftPlanHandle p1, clfftDim* p2, cl_uint* p3))
|
||||
//clfftStatus (*clfftGetPlanDim)(const clfftPlanHandle, clfftDim*, cl_uint*) =
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanDim_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftGetPlanDim_definition = { "clfftGetPlanDim", (void**)&clfftGetPlanDim};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clfftGetPlanDistance, clfftStatus, (const clfftPlanHandle p1, size_t* p2, size_t* p3))
|
||||
//clfftStatus (*clfftGetPlanDistance)(const clfftPlanHandle, size_t*, size_t*) =
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanDistance_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftGetPlanDistance_definition = { "clfftGetPlanDistance", (void**)&clfftGetPlanDistance};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clfftGetPlanInStride, clfftStatus, (const clfftPlanHandle p1, const clfftDim p2, size_t* p3))
|
||||
//clfftStatus (*clfftGetPlanInStride)(const clfftPlanHandle, const clfftDim, size_t*) =
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanInStride_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftGetPlanInStride_definition = { "clfftGetPlanInStride", (void**)&clfftGetPlanInStride};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clfftGetPlanLength, clfftStatus, (const clfftPlanHandle p1, const clfftDim p2, size_t* p3))
|
||||
//clfftStatus (*clfftGetPlanLength)(const clfftPlanHandle, const clfftDim, size_t*) =
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanLength_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftGetPlanLength_definition = { "clfftGetPlanLength", (void**)&clfftGetPlanLength};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clfftGetPlanOutStride, clfftStatus, (const clfftPlanHandle p1, const clfftDim p2, size_t* p3))
|
||||
//clfftStatus (*clfftGetPlanOutStride)(const clfftPlanHandle, const clfftDim, size_t*) =
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanOutStride_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftGetPlanOutStride_definition = { "clfftGetPlanOutStride", (void**)&clfftGetPlanOutStride};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clfftGetPlanPrecision, clfftStatus, (const clfftPlanHandle p1, clfftPrecision* p2))
|
||||
//clfftStatus (*clfftGetPlanPrecision)(const clfftPlanHandle, clfftPrecision*) =
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanPrecision_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftGetPlanPrecision_definition = { "clfftGetPlanPrecision", (void**)&clfftGetPlanPrecision};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clfftGetPlanScale, clfftStatus, (const clfftPlanHandle p1, clfftDirection p2, cl_float* p3))
|
||||
//clfftStatus (*clfftGetPlanScale)(const clfftPlanHandle, clfftDirection, cl_float*) =
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanScale_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftGetPlanScale_definition = { "clfftGetPlanScale", (void**)&clfftGetPlanScale};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clfftGetPlanTransposeResult, clfftStatus, (const clfftPlanHandle p1, clfftResultTransposed* p2))
|
||||
//clfftStatus (*clfftGetPlanTransposeResult)(const clfftPlanHandle, clfftResultTransposed*) =
|
||||
// OPENCLAMDFFT_FN_clfftGetPlanTransposeResult_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftGetPlanTransposeResult_definition = { "clfftGetPlanTransposeResult", (void**)&clfftGetPlanTransposeResult};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clfftGetResultLocation, clfftStatus, (const clfftPlanHandle p1, clfftResultLocation* p2))
|
||||
//clfftStatus (*clfftGetResultLocation)(const clfftPlanHandle, clfftResultLocation*) =
|
||||
// OPENCLAMDFFT_FN_clfftGetResultLocation_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftGetResultLocation_definition = { "clfftGetResultLocation", (void**)&clfftGetResultLocation};
|
||||
|
||||
openclamdfft_fn2(OPENCLAMDFFT_FN_clfftGetTmpBufSize, clfftStatus, (const clfftPlanHandle p1, size_t* p2))
|
||||
clfftStatus (*clfftGetTmpBufSize)(const clfftPlanHandle, size_t*) =
|
||||
OPENCLAMDFFT_FN_clfftGetTmpBufSize_switch_fn;
|
||||
static const struct DynamicFnEntry clfftGetTmpBufSize_definition = { "clfftGetTmpBufSize", (void**)&clfftGetTmpBufSize};
|
||||
|
||||
openclamdfft_fn3(OPENCLAMDFFT_FN_clfftGetVersion, clfftStatus, (cl_uint* p1, cl_uint* p2, cl_uint* p3))
|
||||
clfftStatus (*clfftGetVersion)(cl_uint*, cl_uint*, cl_uint*) =
|
||||
OPENCLAMDFFT_FN_clfftGetVersion_switch_fn;
|
||||
static const struct DynamicFnEntry clfftGetVersion_definition = { "clfftGetVersion", (void**)&clfftGetVersion};
|
||||
|
||||
openclamdfft_fn3(OPENCLAMDFFT_FN_clfftSetLayout, clfftStatus, (clfftPlanHandle p1, clfftLayout p2, clfftLayout p3))
|
||||
clfftStatus (*clfftSetLayout)(clfftPlanHandle, clfftLayout, clfftLayout) =
|
||||
OPENCLAMDFFT_FN_clfftSetLayout_switch_fn;
|
||||
static const struct DynamicFnEntry clfftSetLayout_definition = { "clfftSetLayout", (void**)&clfftSetLayout};
|
||||
|
||||
openclamdfft_fn2(OPENCLAMDFFT_FN_clfftSetPlanBatchSize, clfftStatus, (clfftPlanHandle p1, size_t p2))
|
||||
clfftStatus (*clfftSetPlanBatchSize)(clfftPlanHandle, size_t) =
|
||||
OPENCLAMDFFT_FN_clfftSetPlanBatchSize_switch_fn;
|
||||
static const struct DynamicFnEntry clfftSetPlanBatchSize_definition = { "clfftSetPlanBatchSize", (void**)&clfftSetPlanBatchSize};
|
||||
|
||||
//openclamdfft_fn7(OPENCLAMDFFT_FN_clfftSetPlanCallback, clfftStatus, (clfftPlanHandle p1, const char* p2, const char* p3, int p4, clfftCallbackType p5, cl_mem* p6, int p7))
|
||||
//clfftStatus (*clfftSetPlanCallback)(clfftPlanHandle, const char*, const char*, int, clfftCallbackType, cl_mem*, int) =
|
||||
// OPENCLAMDFFT_FN_clfftSetPlanCallback_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftSetPlanCallback_definition = { "clfftSetPlanCallback", (void**)&clfftSetPlanCallback};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clfftSetPlanDim, clfftStatus, (clfftPlanHandle p1, const clfftDim p2))
|
||||
//clfftStatus (*clfftSetPlanDim)(clfftPlanHandle, const clfftDim) =
|
||||
// OPENCLAMDFFT_FN_clfftSetPlanDim_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftSetPlanDim_definition = { "clfftSetPlanDim", (void**)&clfftSetPlanDim};
|
||||
|
||||
openclamdfft_fn3(OPENCLAMDFFT_FN_clfftSetPlanDistance, clfftStatus, (clfftPlanHandle p1, size_t p2, size_t p3))
|
||||
clfftStatus (*clfftSetPlanDistance)(clfftPlanHandle, size_t, size_t) =
|
||||
OPENCLAMDFFT_FN_clfftSetPlanDistance_switch_fn;
|
||||
static const struct DynamicFnEntry clfftSetPlanDistance_definition = { "clfftSetPlanDistance", (void**)&clfftSetPlanDistance};
|
||||
|
||||
openclamdfft_fn3(OPENCLAMDFFT_FN_clfftSetPlanInStride, clfftStatus, (clfftPlanHandle p1, const clfftDim p2, size_t* p3))
|
||||
clfftStatus (*clfftSetPlanInStride)(clfftPlanHandle, const clfftDim, size_t*) =
|
||||
OPENCLAMDFFT_FN_clfftSetPlanInStride_switch_fn;
|
||||
static const struct DynamicFnEntry clfftSetPlanInStride_definition = { "clfftSetPlanInStride", (void**)&clfftSetPlanInStride};
|
||||
|
||||
//openclamdfft_fn3(OPENCLAMDFFT_FN_clfftSetPlanLength, clfftStatus, (clfftPlanHandle p1, const clfftDim p2, const size_t* p3))
|
||||
//clfftStatus (*clfftSetPlanLength)(clfftPlanHandle, const clfftDim, const size_t*) =
|
||||
// OPENCLAMDFFT_FN_clfftSetPlanLength_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftSetPlanLength_definition = { "clfftSetPlanLength", (void**)&clfftSetPlanLength};
|
||||
|
||||
openclamdfft_fn3(OPENCLAMDFFT_FN_clfftSetPlanOutStride, clfftStatus, (clfftPlanHandle p1, const clfftDim p2, size_t* p3))
|
||||
clfftStatus (*clfftSetPlanOutStride)(clfftPlanHandle, const clfftDim, size_t*) =
|
||||
OPENCLAMDFFT_FN_clfftSetPlanOutStride_switch_fn;
|
||||
static const struct DynamicFnEntry clfftSetPlanOutStride_definition = { "clfftSetPlanOutStride", (void**)&clfftSetPlanOutStride};
|
||||
|
||||
openclamdfft_fn2(OPENCLAMDFFT_FN_clfftSetPlanPrecision, clfftStatus, (clfftPlanHandle p1, clfftPrecision p2))
|
||||
clfftStatus (*clfftSetPlanPrecision)(clfftPlanHandle, clfftPrecision) =
|
||||
OPENCLAMDFFT_FN_clfftSetPlanPrecision_switch_fn;
|
||||
static const struct DynamicFnEntry clfftSetPlanPrecision_definition = { "clfftSetPlanPrecision", (void**)&clfftSetPlanPrecision};
|
||||
|
||||
openclamdfft_fn3(OPENCLAMDFFT_FN_clfftSetPlanScale, clfftStatus, (clfftPlanHandle p1, clfftDirection p2, cl_float p3))
|
||||
clfftStatus (*clfftSetPlanScale)(clfftPlanHandle, clfftDirection, cl_float) =
|
||||
OPENCLAMDFFT_FN_clfftSetPlanScale_switch_fn;
|
||||
static const struct DynamicFnEntry clfftSetPlanScale_definition = { "clfftSetPlanScale", (void**)&clfftSetPlanScale};
|
||||
|
||||
//openclamdfft_fn2(OPENCLAMDFFT_FN_clfftSetPlanTransposeResult, clfftStatus, (clfftPlanHandle p1, clfftResultTransposed p2))
|
||||
//clfftStatus (*clfftSetPlanTransposeResult)(clfftPlanHandle, clfftResultTransposed) =
|
||||
// OPENCLAMDFFT_FN_clfftSetPlanTransposeResult_switch_fn;
|
||||
//static const struct DynamicFnEntry clfftSetPlanTransposeResult_definition = { "clfftSetPlanTransposeResult", (void**)&clfftSetPlanTransposeResult};
|
||||
|
||||
openclamdfft_fn2(OPENCLAMDFFT_FN_clfftSetResultLocation, clfftStatus, (clfftPlanHandle p1, clfftResultLocation p2))
|
||||
clfftStatus (*clfftSetResultLocation)(clfftPlanHandle, clfftResultLocation) =
|
||||
OPENCLAMDFFT_FN_clfftSetResultLocation_switch_fn;
|
||||
static const struct DynamicFnEntry clfftSetResultLocation_definition = { "clfftSetResultLocation", (void**)&clfftSetResultLocation};
|
||||
|
||||
openclamdfft_fn1(OPENCLAMDFFT_FN_clfftSetup, clfftStatus, (const clfftSetupData* p1))
|
||||
clfftStatus (*clfftSetup)(const clfftSetupData*) =
|
||||
OPENCLAMDFFT_FN_clfftSetup_switch_fn;
|
||||
static const struct DynamicFnEntry clfftSetup_definition = { "clfftSetup", (void**)&clfftSetup};
|
||||
|
||||
openclamdfft_fn0(OPENCLAMDFFT_FN_clfftTeardown, clfftStatus, ())
|
||||
clfftStatus (*clfftTeardown)() =
|
||||
OPENCLAMDFFT_FN_clfftTeardown_switch_fn;
|
||||
static const struct DynamicFnEntry clfftTeardown_definition = { "clfftTeardown", (void**)&clfftTeardown};
|
||||
|
||||
|
||||
// generated by parser_clfft.py
|
||||
static const struct DynamicFnEntry* openclamdfft_fn[] = {
|
||||
&clfftBakePlan_definition,
|
||||
NULL/*&clfftCopyPlan_definition*/,
|
||||
&clfftCreateDefaultPlan_definition,
|
||||
&clfftDestroyPlan_definition,
|
||||
&clfftEnqueueTransform_definition,
|
||||
NULL/*&clfftGetLayout_definition*/,
|
||||
NULL/*&clfftGetPlanBatchSize_definition*/,
|
||||
NULL/*&clfftGetPlanContext_definition*/,
|
||||
NULL/*&clfftGetPlanDim_definition*/,
|
||||
NULL/*&clfftGetPlanDistance_definition*/,
|
||||
NULL/*&clfftGetPlanInStride_definition*/,
|
||||
NULL/*&clfftGetPlanLength_definition*/,
|
||||
NULL/*&clfftGetPlanOutStride_definition*/,
|
||||
NULL/*&clfftGetPlanPrecision_definition*/,
|
||||
NULL/*&clfftGetPlanScale_definition*/,
|
||||
NULL/*&clfftGetPlanTransposeResult_definition*/,
|
||||
NULL/*&clfftGetResultLocation_definition*/,
|
||||
&clfftGetTmpBufSize_definition,
|
||||
&clfftGetVersion_definition,
|
||||
&clfftSetLayout_definition,
|
||||
&clfftSetPlanBatchSize_definition,
|
||||
NULL/*&clfftSetPlanCallback_definition*/,
|
||||
NULL/*&clfftSetPlanDim_definition*/,
|
||||
&clfftSetPlanDistance_definition,
|
||||
&clfftSetPlanInStride_definition,
|
||||
NULL/*&clfftSetPlanLength_definition*/,
|
||||
&clfftSetPlanOutStride_definition,
|
||||
&clfftSetPlanPrecision_definition,
|
||||
&clfftSetPlanScale_definition,
|
||||
NULL/*&clfftSetPlanTransposeResult_definition*/,
|
||||
&clfftSetResultLocation_definition,
|
||||
&clfftSetup_definition,
|
||||
&clfftTeardown_definition,
|
||||
};
|
||||
|
||||
// number of enabled functions: 16
|
||||
@@ -116,7 +116,7 @@ def readFunctionFilter(fns, fileName):
|
||||
|
||||
def outputToString(f):
|
||||
def wrapped(*args, **kwargs):
|
||||
from cStringIO import StringIO
|
||||
from io import StringIO
|
||||
old_stdout = sys.stdout
|
||||
sys.stdout = str_stdout = StringIO()
|
||||
res = f(*args, **kwargs)
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
//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
|
||||
@@ -1,33 +0,0 @@
|
||||
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
|
||||
@@ -0,0 +1,148 @@
|
||||
//clblasCaxpy
|
||||
//clblasCcopy
|
||||
//clblasCdotc
|
||||
//clblasCdotu
|
||||
//clblasCgbmv
|
||||
clblasCgemm
|
||||
//clblasCgemv
|
||||
//clblasCgerc
|
||||
//clblasCgeru
|
||||
//clblasChbmv
|
||||
//clblasChemm
|
||||
//clblasChemv
|
||||
//clblasCher
|
||||
//clblasCher2
|
||||
//clblasCher2k
|
||||
//clblasCherk
|
||||
//clblasChpmv
|
||||
//clblasChpr
|
||||
//clblasChpr2
|
||||
//clblasCrotg
|
||||
//clblasCscal
|
||||
//clblasCsrot
|
||||
//clblasCsscal
|
||||
//clblasCswap
|
||||
//clblasCsymm
|
||||
//clblasCsyr2k
|
||||
//clblasCsyrk
|
||||
//clblasCtbmv
|
||||
//clblasCtbsv
|
||||
//clblasCtpmv
|
||||
//clblasCtpsv
|
||||
//clblasCtrmm
|
||||
//clblasCtrmv
|
||||
//clblasCtrsm
|
||||
//clblasCtrsv
|
||||
//clblasDasum
|
||||
//clblasDaxpy
|
||||
//clblasDcopy
|
||||
//clblasDdot
|
||||
//clblasDgbmv
|
||||
clblasDgemm
|
||||
//clblasDgemv
|
||||
//clblasDger
|
||||
//clblasDnrm2
|
||||
//clblasDrot
|
||||
//clblasDrotg
|
||||
//clblasDrotm
|
||||
//clblasDrotmg
|
||||
//clblasDsbmv
|
||||
//clblasDscal
|
||||
//clblasDspmv
|
||||
//clblasDspr
|
||||
//clblasDspr2
|
||||
//clblasDswap
|
||||
//clblasDsymm
|
||||
//clblasDsymv
|
||||
//clblasDsyr
|
||||
//clblasDsyr2
|
||||
//clblasDsyr2k
|
||||
//clblasDsyrk
|
||||
//clblasDtbmv
|
||||
//clblasDtbsv
|
||||
//clblasDtpmv
|
||||
//clblasDtpsv
|
||||
//clblasDtrmm
|
||||
//clblasDtrmv
|
||||
//clblasDtrsm
|
||||
//clblasDtrsv
|
||||
//clblasDzasum
|
||||
//clblasDznrm2
|
||||
//clblasGetVersion
|
||||
//clblasSasum
|
||||
//clblasSaxpy
|
||||
//clblasScasum
|
||||
//clblasScnrm2
|
||||
//clblasScopy
|
||||
//clblasSdot
|
||||
clblasSetup
|
||||
//clblasSgbmv
|
||||
clblasSgemm
|
||||
//clblasSgemv
|
||||
//clblasSger
|
||||
//clblasSnrm2
|
||||
//clblasSrot
|
||||
//clblasSrotg
|
||||
//clblasSrotm
|
||||
//clblasSrotmg
|
||||
//clblasSsbmv
|
||||
//clblasSscal
|
||||
//clblasSspmv
|
||||
//clblasSspr
|
||||
//clblasSspr2
|
||||
//clblasSswap
|
||||
//clblasSsymm
|
||||
//clblasSsymv
|
||||
//clblasSsyr
|
||||
//clblasSsyr2
|
||||
//clblasSsyr2k
|
||||
//clblasSsyrk
|
||||
//clblasStbmv
|
||||
//clblasStbsv
|
||||
//clblasStpmv
|
||||
//clblasStpsv
|
||||
//clblasStrmm
|
||||
//clblasStrmv
|
||||
//clblasStrsm
|
||||
//clblasStrsv
|
||||
clblasTeardown
|
||||
//clblasZaxpy
|
||||
//clblasZcopy
|
||||
//clblasZdotc
|
||||
//clblasZdotu
|
||||
//clblasZdrot
|
||||
//clblasZdscal
|
||||
//clblasZgbmv
|
||||
clblasZgemm
|
||||
//clblasZgemv
|
||||
//clblasZgerc
|
||||
//clblasZgeru
|
||||
//clblasZhbmv
|
||||
//clblasZhemm
|
||||
//clblasZhemv
|
||||
//clblasZher
|
||||
//clblasZher2
|
||||
//clblasZher2k
|
||||
//clblasZherk
|
||||
//clblasZhpmv
|
||||
//clblasZhpr
|
||||
//clblasZhpr2
|
||||
//clblasZrotg
|
||||
//clblasZscal
|
||||
//clblasZswap
|
||||
//clblasZsymm
|
||||
//clblasZsyr2k
|
||||
//clblasZsyrk
|
||||
//clblasZtbmv
|
||||
//clblasZtbsv
|
||||
//clblasZtpmv
|
||||
//clblasZtpsv
|
||||
//clblasZtrmm
|
||||
//clblasZtrmv
|
||||
//clblasZtrsm
|
||||
//clblasZtrsv
|
||||
//clblasiCamax
|
||||
//clblasiDamax
|
||||
//clblasiSamax
|
||||
//clblasiZamax
|
||||
#total 147
|
||||
@@ -0,0 +1,34 @@
|
||||
clfftBakePlan
|
||||
//clfftCopyPlan
|
||||
clfftCreateDefaultPlan
|
||||
clfftDestroyPlan
|
||||
clfftEnqueueTransform
|
||||
//clfftGetLayout
|
||||
//clfftGetPlanBatchSize
|
||||
//clfftGetPlanContext
|
||||
//clfftGetPlanDim
|
||||
//clfftGetPlanDistance
|
||||
//clfftGetPlanInStride
|
||||
//clfftGetPlanLength
|
||||
//clfftGetPlanOutStride
|
||||
//clfftGetPlanPrecision
|
||||
//clfftGetPlanScale
|
||||
//clfftGetPlanTransposeResult
|
||||
//clfftGetResultLocation
|
||||
clfftGetTmpBufSize
|
||||
clfftGetVersion
|
||||
clfftSetLayout
|
||||
clfftSetPlanBatchSize
|
||||
//clfftSetPlanCallback
|
||||
//clfftSetPlanDim
|
||||
clfftSetPlanDistance
|
||||
clfftSetPlanInStride
|
||||
//clfftSetPlanLength
|
||||
clfftSetPlanOutStride
|
||||
clfftSetPlanPrecision
|
||||
clfftSetPlanScale
|
||||
//clfftSetPlanTransposeResult
|
||||
clfftSetResultLocation
|
||||
clfftSetup
|
||||
clfftTeardown
|
||||
#total 33
|
||||
@@ -10,10 +10,10 @@ from common import remove_comments, getTokens, getParameters, postProcessParamet
|
||||
try:
|
||||
if len(sys.argv) > 1:
|
||||
module_name = sys.argv[1]
|
||||
outfile = open('../../../../include/opencv2/core/opencl/runtime/autogenerated/%s.hpp' % module_name, 'wb')
|
||||
outfile_impl = open('../autogenerated/%s_impl.hpp' % module_name, 'wb')
|
||||
outfile_static_impl = open('../autogenerated/%s_static_impl.hpp' % module_name, 'wb')
|
||||
outfile_wrappers = open('../../../../include/opencv2/core/opencl/runtime/autogenerated/%s_wrappers.hpp' % module_name, 'wb')
|
||||
outfile = open('../../../../include/opencv2/core/opencl/runtime/autogenerated/%s.hpp' % module_name, 'w')
|
||||
outfile_impl = open('../autogenerated/%s_impl.hpp' % module_name, 'w')
|
||||
outfile_static_impl = open('../autogenerated/%s_static_impl.hpp' % module_name, 'w')
|
||||
outfile_wrappers = open('../../../../include/opencv2/core/opencl/runtime/autogenerated/%s_wrappers.hpp' % module_name, 'w')
|
||||
if len(sys.argv) > 2:
|
||||
f = open(sys.argv[2], "r")
|
||||
else:
|
||||
@@ -102,7 +102,7 @@ filterFileName = './filter/%s_functions.list' % module_name
|
||||
numEnabled = readFunctionFilter(fns, filterFileName)
|
||||
|
||||
functionsFilter = generateFilterNames(fns)
|
||||
filter_file = open(filterFileName, 'wb')
|
||||
filter_file = open(filterFileName, 'w')
|
||||
filter_file.write(functionsFilter)
|
||||
|
||||
ctx = {}
|
||||
|
||||
+8
-8
@@ -1,6 +1,6 @@
|
||||
#!/bin/python
|
||||
# usage:
|
||||
# cat clAmdBlas.h | $0
|
||||
# cat clBLAS.h | $0
|
||||
from __future__ import print_function
|
||||
import sys, re;
|
||||
|
||||
@@ -23,7 +23,7 @@ while True:
|
||||
assert isinstance(line, str)
|
||||
line = line.strip()
|
||||
parts = line.split();
|
||||
if (line.startswith('clAmd') or line.startswith('cl_') or line == 'void') and len(line.split()) == 1 and line.find('(') == -1:
|
||||
if (line.startswith('clblas') or line.startswith('cl_') or line == 'void') and len(line.split()) == 1 and line.find('(') == -1:
|
||||
fn = {}
|
||||
modifiers = []
|
||||
ret = []
|
||||
@@ -90,11 +90,11 @@ pprint(fns)
|
||||
|
||||
from common import *
|
||||
|
||||
filterFileName='./filter/opencl_clamdblas_functions.list'
|
||||
filterFileName='./filter/opencl_clblas_functions.list'
|
||||
numEnabled = readFunctionFilter(fns, filterFileName)
|
||||
|
||||
functionsFilter = generateFilterNames(fns)
|
||||
filter_file = open(filterFileName, 'wb')
|
||||
filter_file = open(filterFileName, 'w')
|
||||
filter_file.write(functionsFilter)
|
||||
|
||||
ctx = {}
|
||||
@@ -102,8 +102,8 @@ ctx['CLAMDBLAS_REMAP_ORIGIN'] = generateRemapOrigin(fns)
|
||||
ctx['CLAMDBLAS_REMAP_DYNAMIC'] = generateRemapDynamic(fns)
|
||||
ctx['CLAMDBLAS_FN_DECLARATIONS'] = generateFnDeclaration(fns)
|
||||
|
||||
sys.stdout = open('../../../../include/opencv2/core/opencl/runtime/autogenerated/opencl_clamdblas.hpp', 'wb')
|
||||
ProcessTemplate('template/opencl_clamdblas.hpp.in', ctx)
|
||||
sys.stdout = open('../../../../include/opencv2/core/opencl/runtime/autogenerated/opencl_clblas.hpp', 'w')
|
||||
ProcessTemplate('template/opencl_clblas.hpp.in', ctx)
|
||||
|
||||
ctx['CL_FN_ENUMS'] = generateEnums(fns, 'OPENCLAMDBLAS_FN', )
|
||||
ctx['CL_FN_SWITCH'] = generateTemplates(23, 'openclamdblas_fn', 'openclamdblas_check_fn', '')
|
||||
@@ -111,5 +111,5 @@ ctx['CL_FN_ENTRY_DEFINITIONS'] = generateStructDefinitions(fns, 'openclamdblas_f
|
||||
ctx['CL_FN_ENTRY_LIST'] = generateListOfDefinitions(fns, 'openclamdblas_fn')
|
||||
ctx['CL_NUMBER_OF_ENABLED_FUNCTIONS'] = '// number of enabled functions: %d' % (numEnabled)
|
||||
|
||||
sys.stdout = open('../autogenerated/opencl_clamdblas_impl.hpp', 'wb')
|
||||
ProcessTemplate('template/opencl_clamdblas_impl.hpp.in', ctx)
|
||||
sys.stdout = open('../autogenerated/opencl_clblas_impl.hpp', 'w')
|
||||
ProcessTemplate('template/opencl_clblas_impl.hpp.in', ctx)
|
||||
+9
-9
@@ -1,6 +1,6 @@
|
||||
#!/bin/python
|
||||
# usage:
|
||||
# cat clAmdFft.h | $0
|
||||
# cat clFFT.h | $0
|
||||
from __future__ import print_function
|
||||
import sys, re;
|
||||
|
||||
@@ -23,7 +23,7 @@ while True:
|
||||
break
|
||||
assert isinstance(line, str)
|
||||
line = line.strip()
|
||||
if line.startswith('CLAMDFFTAPI'):
|
||||
if line.startswith('CLFFTAPI'):
|
||||
line = re.sub(r'\n', r'', line)
|
||||
while True:
|
||||
nl = f.readline()
|
||||
@@ -44,7 +44,7 @@ while True:
|
||||
|
||||
i = 0
|
||||
while True:
|
||||
if parts[i] == "CLAMDFFTAPI":
|
||||
if parts[i] == "CLFFTAPI":
|
||||
modifiers.append(parts[i])
|
||||
else:
|
||||
break
|
||||
@@ -87,11 +87,11 @@ pprint(fns)
|
||||
|
||||
from common import *
|
||||
|
||||
filterFileName='./filter/opencl_clamdfft_functions.list'
|
||||
filterFileName='./filter/opencl_clfft_functions.list'
|
||||
numEnabled = readFunctionFilter(fns, filterFileName)
|
||||
|
||||
functionsFilter = generateFilterNames(fns)
|
||||
filter_file = open(filterFileName, 'wb')
|
||||
filter_file = open(filterFileName, 'w')
|
||||
filter_file.write(functionsFilter)
|
||||
|
||||
ctx = {}
|
||||
@@ -99,8 +99,8 @@ ctx['CLAMDFFT_REMAP_ORIGIN'] = generateRemapOrigin(fns)
|
||||
ctx['CLAMDFFT_REMAP_DYNAMIC'] = generateRemapDynamic(fns)
|
||||
ctx['CLAMDFFT_FN_DECLARATIONS'] = generateFnDeclaration(fns)
|
||||
|
||||
sys.stdout = open('../../../../include/opencv2/core/opencl/runtime/autogenerated/opencl_clamdfft.hpp', 'wb')
|
||||
ProcessTemplate('template/opencl_clamdfft.hpp.in', ctx)
|
||||
sys.stdout = open('../../../../include/opencv2/core/opencl/runtime/autogenerated/opencl_clfft.hpp', 'w')
|
||||
ProcessTemplate('template/opencl_clfft.hpp.in', ctx)
|
||||
|
||||
ctx['CL_FN_ENUMS'] = generateEnums(fns, 'OPENCLAMDFFT_FN')
|
||||
ctx['CL_FN_SWITCH'] = generateTemplates(23, 'openclamdfft_fn', 'openclamdfft_check_fn', '')
|
||||
@@ -108,5 +108,5 @@ ctx['CL_FN_ENTRY_DEFINITIONS'] = generateStructDefinitions(fns, '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('../autogenerated/opencl_clamdfft_impl.hpp', 'wb')
|
||||
ProcessTemplate('template/opencl_clamdfft_impl.hpp.in', ctx)
|
||||
sys.stdout = open('../autogenerated/opencl_clfft_impl.hpp', 'w')
|
||||
ProcessTemplate('template/opencl_clfft_impl.hpp.in', ctx)
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
@CLAMDBLAS_REMAP_ORIGIN@
|
||||
|
||||
#include <clAmdBlas.h>
|
||||
#include <clBLAS.h>
|
||||
|
||||
@CLAMDBLAS_REMAP_DYNAMIC@
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
|
||||
@CLAMDFFT_REMAP_ORIGIN@
|
||||
|
||||
#include <clAmdFft.h>
|
||||
#include <clFFT.h>
|
||||
|
||||
@CLAMDFFT_REMAP_DYNAMIC@
|
||||
|
||||
+5
-5
@@ -44,7 +44,7 @@
|
||||
#ifdef HAVE_CLAMDBLAS
|
||||
|
||||
#include "opencv2/core/opencl/runtime/opencl_core.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_clamdblas.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_clblas.hpp"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
@@ -54,10 +54,10 @@
|
||||
static HMODULE opencl_module = NULL;
|
||||
if (!opencl_module)
|
||||
{
|
||||
opencl_module = GetModuleHandleA("clAmdBlas.dll");
|
||||
opencl_module = GetModuleHandleA("clBLAS.dll");
|
||||
if (!opencl_module)
|
||||
{
|
||||
opencl_module = LoadLibraryA("clAmdBlas.dll");
|
||||
opencl_module = LoadLibraryA("clBLAS.dll");
|
||||
if (!opencl_module)
|
||||
return NULL;
|
||||
}
|
||||
@@ -76,7 +76,7 @@
|
||||
static void* h = NULL;
|
||||
if (!h)
|
||||
{
|
||||
h = dlopen("libclAmdBlas.so", RTLD_LAZY | RTLD_GLOBAL);
|
||||
h = dlopen("libclBLAS.so", RTLD_LAZY | RTLD_GLOBAL);
|
||||
if (!h)
|
||||
return NULL;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ static void* openclamdblas_check_fn(int ID);
|
||||
// END OF CUSTOM FUNCTIONS HERE
|
||||
//
|
||||
|
||||
#include "autogenerated/opencl_clamdblas_impl.hpp"
|
||||
#include "autogenerated/opencl_clblas_impl.hpp"
|
||||
|
||||
static void* openclamdblas_check_fn(int ID)
|
||||
{
|
||||
+5
-5
@@ -44,7 +44,7 @@
|
||||
#ifdef HAVE_CLAMDFFT
|
||||
|
||||
#include "opencv2/core/opencl/runtime/opencl_core.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_clamdfft.hpp"
|
||||
#include "opencv2/core/opencl/runtime/opencl_clfft.hpp"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
@@ -54,10 +54,10 @@
|
||||
static HMODULE opencl_module = NULL;
|
||||
if (!opencl_module)
|
||||
{
|
||||
opencl_module = GetModuleHandleA("clAmdFft.Runtime.dll");
|
||||
opencl_module = GetModuleHandleA("clFFT.dll");
|
||||
if (!opencl_module)
|
||||
{
|
||||
opencl_module = LoadLibraryA("clAmdFft.Runtime.dll");
|
||||
opencl_module = LoadLibraryA("clFFT.dll");
|
||||
if (!opencl_module)
|
||||
return NULL;
|
||||
}
|
||||
@@ -76,7 +76,7 @@
|
||||
static void* h = NULL;
|
||||
if (!h)
|
||||
{
|
||||
h = dlopen("libclAmdFft.Runtime.so", RTLD_LAZY | RTLD_GLOBAL);
|
||||
h = dlopen("libclFFT.so", RTLD_LAZY | RTLD_GLOBAL);
|
||||
if (!h)
|
||||
return NULL;
|
||||
}
|
||||
@@ -109,7 +109,7 @@ static void* openclamdfft_check_fn(int ID);
|
||||
// END OF CUSTOM FUNCTIONS HERE
|
||||
//
|
||||
|
||||
#include "autogenerated/opencl_clamdfft_impl.hpp"
|
||||
#include "autogenerated/opencl_clfft_impl.hpp"
|
||||
|
||||
static void* openclamdfft_check_fn(int ID)
|
||||
{
|
||||
@@ -307,8 +307,7 @@ UMat& UMat::operator=(const UMat& m)
|
||||
else
|
||||
copySize(m);
|
||||
allocator = m.allocator;
|
||||
if (usageFlags == USAGE_DEFAULT)
|
||||
usageFlags = m.usageFlags;
|
||||
usageFlags = m.usageFlags;
|
||||
u = m.u;
|
||||
offset = m.offset;
|
||||
}
|
||||
@@ -332,9 +331,6 @@ void UMat::assignTo(UMat& m, int _type) const
|
||||
|
||||
void UMat::create(int _rows, int _cols, int _type, UMatUsageFlags _usageFlags)
|
||||
{
|
||||
_type &= TYPE_MASK;
|
||||
if( dims <= 2 && rows == _rows && cols == _cols && type() == _type && u )
|
||||
return;
|
||||
int sz[] = {_rows, _cols};
|
||||
create(2, sz, _type, _usageFlags);
|
||||
}
|
||||
@@ -426,7 +422,9 @@ UMat& UMat::operator=(UMat&& m)
|
||||
m.step.p = m.step.buf;
|
||||
m.size.p = &m.rows;
|
||||
}
|
||||
m.flags = MAGIC_VAL; m.dims = m.rows = m.cols = 0;
|
||||
m.flags = MAGIC_VAL;
|
||||
m.usageFlags = USAGE_DEFAULT;
|
||||
m.dims = m.rows = m.cols = 0;
|
||||
m.allocator = NULL;
|
||||
m.u = NULL;
|
||||
m.offset = 0;
|
||||
@@ -600,6 +598,7 @@ UMat Mat::getUMat(AccessFlag accessFlags, UMatUsageFlags usageFlags) const
|
||||
CV_XADD(&(u->urefcount), 1);
|
||||
}
|
||||
hdr.flags = flags;
|
||||
hdr.usageFlags = usageFlags;
|
||||
setSize(hdr, dims, size.p, step.p);
|
||||
finalizeHdr(hdr);
|
||||
hdr.u = new_u;
|
||||
@@ -610,16 +609,21 @@ UMat Mat::getUMat(AccessFlag accessFlags, UMatUsageFlags usageFlags) const
|
||||
|
||||
void UMat::create(int d, const int* _sizes, int _type, UMatUsageFlags _usageFlags)
|
||||
{
|
||||
this->usageFlags = _usageFlags;
|
||||
|
||||
int i;
|
||||
CV_Assert(0 <= d && d <= CV_MAX_DIM && _sizes);
|
||||
_type = CV_MAT_TYPE(_type);
|
||||
|
||||
if( u && (d == dims || (d == 1 && dims <= 2)) && _type == type() )
|
||||
// if param value is USAGE_DEFAULT by implicit default param value -or- explicit value
|
||||
// ...then don't change the existing usageFlags
|
||||
// it is not possible to change usage from non-default to USAGE_DEFAULT through create()
|
||||
// ...instead must construct UMat()
|
||||
if (_usageFlags == cv::USAGE_DEFAULT)
|
||||
{
|
||||
_usageFlags = usageFlags;
|
||||
}
|
||||
|
||||
if( u && (d == dims || (d == 1 && dims <= 2)) && _type == type() && _usageFlags == usageFlags )
|
||||
{
|
||||
if( d == 2 && rows == _sizes[0] && cols == _sizes[1] )
|
||||
return;
|
||||
for( i = 0; i < d; i++ )
|
||||
if( size[i] != _sizes[i] )
|
||||
break;
|
||||
@@ -636,6 +640,7 @@ void UMat::create(int d, const int* _sizes, int _type, UMatUsageFlags _usageFlag
|
||||
}
|
||||
|
||||
release();
|
||||
usageFlags = _usageFlags;
|
||||
if( d == 0 )
|
||||
return;
|
||||
flags = (_type & CV_MAT_TYPE_MASK) | MAGIC_VAL;
|
||||
|
||||
Reference in New Issue
Block a user