30 #if defined(HAVE_OPENCL) 36 #if defined(DEBUG_OPENCL) && DEBUG_OPENCL == 1 37 #define CL_USE_DEPRECATED_OPENCL_1_0_APIS 41 #include <OpenCL/OpenCL.h> 43 #include <CL/opencl.h> 65 cl_command_queue queue;
76 int useUnifiedSrcDensity;
77 int useUnifiedSrcValid;
83 OCLResampAlg resampAlg;
85 cl_channel_type imageFormat;
106 cl_mem *dstRealWorkCL;
116 cl_mem *dstImagWorkCL;
126 unsigned int imgChSize1;
127 cl_channel_order imgChOrder1;
128 unsigned int imgChSize4;
129 cl_channel_order imgChOrder4;
132 cl_mem useBandSrcValidCL;
133 char *useBandSrcValid;
135 cl_mem nBandSrcValidCL;
136 float *nBandSrcValid;
145 unsigned int xyChSize;
146 cl_channel_order xyChOrder;
148 cl_mem fDstNoDataRealCL;
149 float *fDstNoDataReal;
154 struct oclWarper* GDALWarpKernelOpenCL_createEnv(
int srcWidth,
int srcHeight,
155 int dstWidth,
int dstHeight,
156 cl_channel_type imageFormat,
157 int numBands,
int coordMult,
158 int useImag,
int useBandSrcValid,
160 double *dfDstNoDataReal,
161 OCLResampAlg resampAlg, cl_int *envErr);
163 cl_int GDALWarpKernelOpenCL_setSrcValid(
struct oclWarper *warper,
164 int *bandSrcValid,
int bandNum);
166 cl_int GDALWarpKernelOpenCL_setSrcImg(
struct oclWarper *warper,
void *imgData,
169 cl_int GDALWarpKernelOpenCL_setDstImg(
struct oclWarper *warper,
void *imgData,
172 cl_int GDALWarpKernelOpenCL_setCoordRow(
struct oclWarper *warper,
173 double *rowSrcX,
double *rowSrcY,
174 double srcXOff,
double srcYOff,
175 int *success,
int rowNum);
177 cl_int GDALWarpKernelOpenCL_runResamp(
struct oclWarper *warper,
178 float *unifiedSrcDensity,
179 unsigned int *unifiedSrcValid,
181 unsigned int *dstValid,
182 double dfXScale,
double dfYScale,
183 double dfXFilter,
double dfYFilter,
184 int nXRadius,
int nYRadius,
185 int nFiltInitX,
int nFiltInitY);
187 cl_int GDALWarpKernelOpenCL_getRow(
struct oclWarper *warper,
188 void **rowReal,
void **rowImag,
189 int rowNum,
int bandNum);
191 cl_int GDALWarpKernelOpenCL_deleteEnv(
struct oclWarper *warper);