14#if defined(HAVE_OPENCL)
20#if defined(DEBUG_OPENCL) && DEBUG_OPENCL == 1
21#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
24#define CL_TARGET_OPENCL_VERSION 100
27#include <OpenCL/opencl.h>
54 cl_command_queue queue;
65 int useUnifiedSrcDensity;
66 int useUnifiedSrcValid;
72 OCLResampAlg resampAlg;
74 cl_channel_type imageFormat;
99 cl_mem *dstRealWorkCL;
111 cl_mem *dstImagWorkCL;
123 unsigned int imgChSize1;
124 cl_channel_order imgChOrder1;
125 unsigned int imgChSize4;
126 cl_channel_order imgChOrder4;
129 cl_mem useBandSrcValidCL;
130 char *useBandSrcValid;
132 cl_mem nBandSrcValidCL;
133 float *nBandSrcValid;
142 unsigned int xyChSize;
143 cl_channel_order xyChOrder;
145 cl_mem fDstNoDataRealCL;
146 float *fDstNoDataReal;
151 struct oclWarper *GDALWarpKernelOpenCL_createEnv(
152 int srcWidth,
int srcHeight,
int dstWidth,
int dstHeight,
153 cl_channel_type imageFormat,
int numBands,
int coordMult,
int useImag,
154 int useBandSrcValid,
float *fDstDensity,
double *dfDstNoDataReal,
155 OCLResampAlg resampAlg, cl_int *envErr);
157 cl_int GDALWarpKernelOpenCL_setSrcValid(
struct oclWarper *warper,
158 int *bandSrcValid,
int bandNum);
160 cl_int GDALWarpKernelOpenCL_setSrcImg(
struct oclWarper *warper,
161 void *imgData,
int bandNum);
163 cl_int GDALWarpKernelOpenCL_setDstImg(
struct oclWarper *warper,
164 void *imgData,
int bandNum);
166 cl_int GDALWarpKernelOpenCL_setCoordRow(
struct oclWarper *warper,
167 double *rowSrcX,
double *rowSrcY,
168 double srcXOff,
double srcYOff,
169 int *success,
int rowNum);
171 cl_int GDALWarpKernelOpenCL_runResamp(
172 struct oclWarper *warper,
float *unifiedSrcDensity,
173 unsigned int *unifiedSrcValid,
float *dstDensity,
174 unsigned int *dstValid,
double dfXScale,
double dfYScale,
175 double dfXFilter,
double dfYFilter,
int nXRadius,
int nYRadius,
176 int nFiltInitX,
int nFiltInitY);
178 cl_int GDALWarpKernelOpenCL_getRow(
struct oclWarper *warper,
void **rowReal,
179 void **rowImag,
int rowNum,
int bandNum);
181 cl_int GDALWarpKernelOpenCL_deleteEnv(
struct oclWarper *warper);