33 #ifdef ICL_HAVE_OPENCL 77 CLKernel(
const string &
id, cl::Program & program,
78 cl::CommandQueue& cmdQueue) ;
104 void apply(
int gloW,
int gloH = 0,
int gloC = 0,
105 int locW = 0,
int locH = 0,
int locC = 0) ;
115 void setArg(
const unsigned idx,
const unsigned int &value) ;
118 void setArg(
const unsigned idx,
const int &value) ;
121 void setArg(
const unsigned idx,
const short &value) ;
124 void setArg(
const unsigned idx,
const long &value) ;
127 void setArg(
const unsigned idx,
const unsigned long &value) ;
130 void setArg(
const unsigned idx,
const float &value) ;
133 void setArg(
const unsigned idx,
const double &value) ;
136 void setArg(
const unsigned idx,
const char &value) ;
139 void setArg(
const unsigned idx,
const unsigned char &value) ;
148 void setArg(
const unsigned idx,
const CLBuffer &value) ;
151 void setArg(
const unsigned idx,
const CLImage2D &value) ;
154 void setArg(
const unsigned idx,
const LocalMemory &value) ;
163 template<
typename A,
typename B>
164 void setArgs(
const A &valueA,
const B &valueB) {
170 template<
typename A,
typename B,
typename C>
171 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC) {
172 setArgs(valueA, valueB);
177 template<
typename A,
typename B,
typename C,
typename D>
178 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD) {
179 setArgs(valueA, valueB, valueC);
184 template<
typename A,
typename B,
typename C,
typename D,
typename E>
185 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD,
187 setArgs(valueA, valueB, valueC, valueD);
192 template<
typename A,
typename B,
typename C,
typename D,
typename E,
typename F>
193 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD,
194 const E &valueE,
const F &valueF) {
195 setArgs(valueA, valueB, valueC, valueD, valueE);
200 template<
typename A,
typename B,
typename C,
typename D,
typename E,
typename F,
202 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD,
203 const E &valueE,
const F &valueF,
const G &valueG)
205 setArgs(valueA, valueB, valueC, valueD, valueE, valueF);
210 template<
typename A,
typename B,
typename C,
typename D,
typename E,
typename F,
211 typename G,
typename H>
212 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD,
213 const E &valueE,
const F &valueF,
const G &valueG,
const H &valueH)
215 setArgs(valueA, valueB, valueC, valueD, valueE, valueF, valueG);
220 template<
typename A,
typename B,
typename C,
typename D,
typename E,
typename F,
221 typename G,
typename H,
typename I>
222 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD,
223 const E &valueE,
const F &valueF,
const G &valueG,
const H &valueH,
225 setArgs(valueA, valueB, valueC, valueD, valueE, valueF, valueG, valueH);
230 template<
typename A,
typename B,
typename C,
typename D,
typename E,
typename F,
231 typename G,
typename H,
typename I,
typename J>
232 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD,
233 const E &valueE,
const F &valueF,
const G &valueG,
const H &valueH,
234 const I &valueI,
const J &valueJ) {
235 setArgs(valueA, valueB, valueC, valueD, valueE, valueF, valueG, valueH, valueI);
240 template<
typename A,
typename B,
typename C,
typename D,
typename E,
typename F,
241 typename G,
typename H,
typename I,
typename J,
typename K>
242 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD,
243 const E &valueE,
const F &valueF,
const G &valueG,
const H &valueH,
244 const I &valueI,
const J &valueJ,
const K &valueK)
246 setArgs(valueA, valueB, valueC, valueD, valueE, valueF, valueG, valueH, valueI,
251 template<
typename A,
typename B,
typename C,
typename D,
typename E,
typename F,
252 typename G,
typename H,
typename I,
typename J,
typename K,
typename L>
253 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD,
254 const E &valueE,
const F &valueF,
const G &valueG,
const H &valueH,
255 const I &valueI,
const J &valueJ,
const K &valueK,
const L &valueL)
257 setArgs(valueA, valueB, valueC, valueD, valueE, valueF, valueG, valueH, valueI,
263 template<
typename A,
typename B,
typename C,
typename D,
typename E,
typename F,
264 typename G,
typename H,
typename I,
typename J,
typename K,
typename L,
266 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD,
267 const E &valueE,
const F &valueF,
const G &valueG,
const H &valueH,
268 const I &valueI,
const J &valueJ,
const K &valueK,
const L &valueL,
270 setArgs(valueA, valueB, valueC, valueD, valueE, valueF, valueG, valueH, valueI,
271 valueJ, valueK, valueL);
276 template<
typename A,
typename B,
typename C,
typename D,
typename E,
typename F,
277 typename G,
typename H,
typename I,
typename J,
typename K,
typename L,
278 typename M,
typename N>
279 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD,
280 const E &valueE,
const F &valueF,
const G &valueG,
const H &valueH,
281 const I &valueI,
const J &valueJ,
const K &valueK,
const L &valueL,
282 const M &valueM,
const N &valueN) {
283 setArgs(valueA, valueB, valueC, valueD, valueE, valueF, valueG, valueH, valueI,
284 valueJ, valueK, valueL, valueM);
289 template<
typename A,
typename B,
typename C,
typename D,
typename E,
typename F,
290 typename G,
typename H,
typename I,
typename J,
typename K,
typename L,
291 typename M,
typename N,
typename O>
292 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD,
293 const E &valueE,
const F &valueF,
const G &valueG,
const H &valueH,
294 const I &valueI,
const J &valueJ,
const K &valueK,
const L &valueL,
295 const M &valueM,
const N &valueN,
const O &valueO)
297 setArgs(valueA, valueB, valueC, valueD, valueE, valueF, valueG, valueH, valueI,
298 valueJ, valueK, valueL, valueM, valueN);
303 template<
typename A,
typename B,
typename C,
typename D,
typename E,
typename F,
304 typename G,
typename H,
typename I,
typename J,
typename K,
typename L,
305 typename M,
typename N,
typename O,
typename P>
306 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD,
307 const E &valueE,
const F &valueF,
const G &valueG,
const H &valueH,
308 const I &valueI,
const J &valueJ,
const K &valueK,
const L &valueL,
309 const M &valueM,
const N &valueN,
const O &valueO,
const P &valueP)
311 setArgs(valueA, valueB, valueC, valueD, valueE, valueF, valueG, valueH, valueI,
312 valueJ, valueK, valueL, valueM, valueN, valueP);
317 template<
typename A,
typename B,
typename C,
typename D,
typename E,
typename F,
318 typename G,
typename H,
typename I,
typename J,
typename K,
typename L,
319 typename M,
typename N,
typename O,
typename P,
typename Q>
320 void setArgs(
const A &valueA,
const B &valueB,
const C &valueC,
const D &valueD,
321 const E &valueE,
const F &valueF,
const G &valueG,
const H &valueH,
322 const I &valueI,
const J &valueJ,
const K &valueK,
const L &valueL,
323 const M &valueM,
const N &valueN,
const O &valueO,
const P &valueP,
326 setArgs(valueA, valueB, valueC, valueD, valueE, valueF, valueG, valueH, valueI,
327 valueJ, valueK, valueL, valueM, valueN, valueP, valueQ);
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD, const E &valueE, const F &valueF, const G &valueG, const H &valueH, const I &valueI, const J &valueJ)
sets mutiple kernel arguments at once
Definition: CLKernel.h:232
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD, const E &valueE, const F &valueF, const G &valueG, const H &valueH, const I &valueI)
sets mutiple kernel arguments at once
Definition: CLKernel.h:222
undocument this line if you encounter any issues!
Definition: Any.h:37
LocalMemory(size_t size)
constructor
Definition: CLKernel.h:87
Definition: CLDeviceContext.h:43
Fixed C++-array wrapper class for data handling.
Definition: FixedArray.h:45
#define ICLUtils_API
this macros are important for creating dll's
Definition: CompatMacros.h:171
Arg operator[](int idx)
for index operator-based setting of kernel arguments
Definition: CLKernel.h:347
Wrapper for an OpenCL Kernel.
Definition: CLKernel.h:72
int idx
Argument index.
Definition: CLKernel.h:334
void operator=(const T &t)
template-based assigment (calls the parent kernel's setArg method)
Definition: CLKernel.h:341
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD, const E &valueE, const F &valueF, const G &valueG, const H &valueH, const I &valueI, const J &valueJ, const K &valueK, const L &valueL, const M &valueM, const N &valueN, const O &valueO, const P &valueP, const Q &valueQ)
sets mutiple kernel arguments at once
Definition: CLKernel.h:320
size_t size
size of the dynamic local memory
Definition: CLKernel.h:84
void setArgs(const A &valueA, const B &valueB)
sets mutiple kernel arguments at once
Definition: CLKernel.h:164
Wrapper for an OpenCL Buffer.
Definition: CLBuffer.h:52
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD, const E &valueE, const F &valueF, const G &valueG)
sets mutiple kernel arguments at once
Definition: CLKernel.h:202
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD, const E &valueE, const F &valueF, const G &valueG, const H &valueH, const I &valueI, const J &valueJ, const K &valueK, const L &valueL, const M &valueM, const N &valueN, const O &valueO)
sets mutiple kernel arguments at once
Definition: CLKernel.h:292
CLKernel & k
parent CLKernel
Definition: CLKernel.h:333
struct that represents the dynamic local memory for a kernel
Definition: CLKernel.h:83
void setArgs(const A &value)
sets mutiple kernel arguments at once
Definition: CLKernel.h:158
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD, const E &valueE, const F &valueF, const G &valueG, const H &valueH)
sets mutiple kernel arguments at once
Definition: CLKernel.h:212
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD, const E &valueE, const F &valueF, const G &valueG, const H &valueH, const I &valueI, const J &valueJ, const K &valueK, const L &valueL, const M &valueM, const N &valueN, const O &valueO, const P &valueP)
sets mutiple kernel arguments at once
Definition: CLKernel.h:306
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD, const E &valueE, const F &valueF, const G &valueG, const H &valueH, const I &valueI, const J &valueJ, const K &valueK, const L &valueL, const M &valueM, const N &valueN)
sets mutiple kernel arguments at once
Definition: CLKernel.h:279
Utility structure for the CLKernel's index operator.
Definition: CLKernel.h:332
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD, const E &valueE, const F &valueF, const G &valueG, const H &valueH, const I &valueI, const J &valueJ, const K &valueK)
sets mutiple kernel arguments at once
Definition: CLKernel.h:242
The CLDeviceContext class allows preparation of the device used for CLPrograms.
Definition: CLDeviceContext.h:61
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD, const E &valueE, const F &valueF, const G &valueG, const H &valueH, const I &valueI, const J &valueJ, const K &valueK, const L &valueL)
sets mutiple kernel arguments at once
Definition: CLKernel.h:253
Wrapper for an OpenCL Image2D.
Definition: CLImage2D.h:57
Impl * impl
internal implementation
Definition: CLKernel.h:73
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD)
sets mutiple kernel arguments at once
Definition: CLKernel.h:178
void setArgs(const A &valueA, const B &valueB, const C &valueC)
sets mutiple kernel arguments at once
Definition: CLKernel.h:171
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD, const E &valueE, const F &valueF, const G &valueG, const H &valueH, const I &valueI, const J &valueJ, const K &valueK, const L &valueL, const M &valueM)
sets mutiple kernel arguments at once
Definition: CLKernel.h:266
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD, const E &valueE)
sets mutiple kernel arguments at once
Definition: CLKernel.h:185
void setArg(const unsigned idx, const unsigned int &value)
Overloaded Kernel argument setter for unsigned int values.
void setArgs(const A &valueA, const B &valueB, const C &valueC, const D &valueD, const E &valueE, const F &valueF)
sets mutiple kernel arguments at once
Definition: CLKernel.h:193
Main class for OpenCL based accelleration.
Definition: CLProgram.h:259
Arg(CLKernel &k, int idx)
constructor
Definition: CLKernel.h:337