Bolt  1.3
C++ template library with support for OpenCL
functional.h
Go to the documentation of this file.
1 /***************************************************************************
2 * © 2012,2014 Advanced Micro Devices, Inc. All rights reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 ***************************************************************************/
16 
17 #pragma once
18 #if !defined( BOLT_CL_FUNCTIONAL_H )
19 #define BOLT_CL_FUNCTIONAL_H
20 
21 #include "bolt/cl/bolt.h"
22 
27 namespace bolt {
28 namespace cl {
29 
30 /******************************************************************************
31  * Unary Operators
32  *****************************************************************************/
33 static const std::string squareFunctor = BOLT_HOST_DEVICE_DEFINITION(
34 template< typename T >
35 struct square
36 {
37  T operator() (const T& x) const { return x * x; }
38 };
39 );
40 
41 static const std::string cubeFunctor = BOLT_HOST_DEVICE_DEFINITION(
42 template< typename T >
43 struct cube
44 {
45  T operator() (const T& x) const { return x * x * x; }
46 };
47 );
48 
49 static const std::string negateFunctor = BOLT_HOST_DEVICE_DEFINITION(
50 template< typename T >
51 struct negate
52 {
53  T operator()(const T& x) const {return -x;}
54 };
55 );
56 
57 /******************************************************************************
58  * Binary Operators
59  *****************************************************************************/
60 
61 static const std::string plusFunctor = BOLT_HOST_DEVICE_DEFINITION(
62 template<typename T>
63 struct plus
64 {
65  T operator()(const T &lhs, const T &rhs) const {return lhs + rhs;}
66 };
67 );
68 
69 static const std::string minusFunctor = BOLT_HOST_DEVICE_DEFINITION(
70 template<typename T>
71 struct minus
72 {
73  T operator()(const T &lhs, const T &rhs) const {return lhs - rhs;}
74 };
75 );
76 
77 static const std::string multipliesFunctor = BOLT_HOST_DEVICE_DEFINITION(
78 template<typename T>
79 struct multiplies
80 {
81  T operator()(const T &lhs, const T &rhs) const {return lhs * rhs;}
82 };
83 );
84 
85 static const std::string dividesFunctor = BOLT_HOST_DEVICE_DEFINITION(
86 template<typename T>
87 struct divides
88 {
89  T operator()(const T &lhs, const T &rhs) const {return lhs / rhs;}
90 };
91 );
92 
93 static const std::string modulusFunctor = BOLT_HOST_DEVICE_DEFINITION(
94 template<typename T>
95 struct modulus
96 {
97  T operator()(const T &lhs, const T &rhs) const {return lhs % rhs;}
98 };
99 );
100 
101 static const std::string maximumFunctor = BOLT_HOST_DEVICE_DEFINITION(
102 template<typename T>
103 struct maximum
104 {
105  T operator()(const T &lhs, const T &rhs) const {return (lhs > rhs) ? lhs:rhs;}
106 };
107 );
108 
109 static const std::string minimumFunctor = BOLT_HOST_DEVICE_DEFINITION(
110 template<typename T>
111 struct minimum
112 {
113  T operator()(const T &lhs, const T &rhs) const {return (lhs < rhs) ? lhs:rhs;}
114 };
115 );
116 
117 static const std::string bit_andFunctor = BOLT_HOST_DEVICE_DEFINITION(
118 template<typename T>
119 struct bit_and
120 {
121  T operator()(const T &lhs, const T &rhs) const {return lhs & rhs;}
122 };
123 );
124 
125 static const std::string bit_orFunctor = BOLT_HOST_DEVICE_DEFINITION(
126 template<typename T>
127 struct bit_or
128 {
129  T operator()(const T &lhs, const T &rhs) const {return lhs | rhs;}
130 };
131 );
132 
133 static const std::string bit_xorFunctor = BOLT_HOST_DEVICE_DEFINITION(
134 template<typename T>
135 struct bit_xor
136 {
137  T operator()(const T &lhs, const T &rhs) const {return lhs ^ rhs;}
138 };
139 );
140 
141 
142 /******************************************************************************
143  * Unary Predicates
144  *****************************************************************************/
145 
146 static const std::string logical_notFunctor = BOLT_HOST_DEVICE_DEFINITION(
147 template<typename T>
148 struct logical_not
149 {
150  bool operator()(const T &x) const {return !x;}
151 };
152 );
153 
154 static const std::string identityFunctor = BOLT_HOST_DEVICE_DEFINITION(
155 template<typename T>
156 struct identity
157 {
158  T operator()(const T &x) const {return x;}
159 };
160 );
161 
162 
163 /******************************************************************************
164  * Binary Predicates
165  *****************************************************************************/
166 
167 static const std::string equal_toFunctor = BOLT_HOST_DEVICE_DEFINITION(
168 template<typename T>
169 struct equal_to
170 {
171  bool operator()(const T &lhs, const T &rhs) const {return lhs == rhs;}
172 };
173 );
174 
175 static const std::string not_equal_toFunctor = BOLT_HOST_DEVICE_DEFINITION(
176 template<typename T>
177 struct not_equal_to
178 {
179  bool operator()(const T &lhs, const T &rhs) const {return lhs != rhs;}
180 };
181 );
182 
183 static const std::string greaterFunctor = BOLT_HOST_DEVICE_DEFINITION(
184 template<typename T>
185 struct greater
186 {
187  bool operator()(const T &lhs, const T &rhs) const {return lhs > rhs;}
188 };
189 );
190 
191 static const std::string lessFunctor = BOLT_HOST_DEVICE_DEFINITION(
192 template<typename T>
193 struct less
194 {
195  bool operator()(const T &lhs, const T &rhs) const {return lhs < rhs;}
196 };
197 );
198 
199 static const std::string greater_equalFunctor = BOLT_HOST_DEVICE_DEFINITION(
200 template<typename T>
201 struct greater_equal
202 {
203  bool operator()(const T &lhs, const T &rhs) const {return lhs >= rhs;}
204 };
205 );
206 
207 static const std::string less_equalFunctor = BOLT_HOST_DEVICE_DEFINITION(
208 template<typename T>
209 struct less_equal
210 {
211  bool operator()(const T &lhs, const T &rhs) const {return lhs <= rhs;}
212 };
213 );
214 
215 static const std::string logical_andFunctor = BOLT_HOST_DEVICE_DEFINITION(
216 template<typename T>
217 struct logical_and
218 {
219  bool operator()(const T &lhs, const T &rhs) const {return lhs && rhs;}
220 };
221 );
222 
223 static const std::string logical_orFunctor = BOLT_HOST_DEVICE_DEFINITION(
224 template<typename T>
225 struct logical_or
226 {
227  bool operator()(const T &lhs, const T &rhs) const {return lhs || rhs;}
228 };
229 );
230 
231 }; // namespace cl
232 }; // namespace bolt
233 
234 BOLT_CREATE_TYPENAME( bolt::cl::square< cl_int > );
235 BOLT_CREATE_CLCODE( bolt::cl::square< cl_int >, bolt::cl::squareFunctor );
236 
237 
238 BOLT_CREATE_TYPENAME( bolt::cl::cube< cl_int > );
239 BOLT_CREATE_CLCODE( bolt::cl::cube< cl_int >, bolt::cl::cubeFunctor );
240 
241 BOLT_CREATE_TYPENAME( bolt::cl::negate< cl_int > );
242 BOLT_CREATE_CLCODE( bolt::cl::negate< cl_int >, bolt::cl::negateFunctor );
243 
244 BOLT_CREATE_TYPENAME( bolt::cl::plus< cl_int > );
245 BOLT_CREATE_CLCODE( bolt::cl::plus< cl_int >, bolt::cl::plusFunctor );
246 
247 BOLT_CREATE_TYPENAME( bolt::cl::minus< cl_int > );
248 BOLT_CREATE_CLCODE( bolt::cl::minus< cl_int >, bolt::cl::minusFunctor );
249 
250 BOLT_CREATE_TYPENAME( bolt::cl::multiplies< cl_int > );
251 BOLT_CREATE_CLCODE( bolt::cl::multiplies< cl_int >, bolt::cl::multipliesFunctor );
252 
253 BOLT_CREATE_TYPENAME( bolt::cl::divides< cl_int > );
254 BOLT_CREATE_CLCODE( bolt::cl::divides< cl_int >, bolt::cl::dividesFunctor );
255 
256 BOLT_CREATE_TYPENAME( bolt::cl::modulus< cl_int > );
257 BOLT_CREATE_CLCODE( bolt::cl::modulus< cl_int >, bolt::cl::modulusFunctor );
258 
259 BOLT_CREATE_TYPENAME( bolt::cl::maximum< cl_int > );
260 BOLT_CREATE_CLCODE( bolt::cl::maximum< cl_int >, bolt::cl::maximumFunctor );
261 
262 BOLT_CREATE_TYPENAME( bolt::cl::minimum< cl_int > );
263 BOLT_CREATE_CLCODE( bolt::cl::minimum< cl_int >, bolt::cl::minimumFunctor );
264 
265 BOLT_CREATE_TYPENAME( bolt::cl::bit_and< cl_int > );
266 BOLT_CREATE_CLCODE( bolt::cl::bit_and< cl_int >, bolt::cl::bit_andFunctor );
267 
268 BOLT_CREATE_TYPENAME( bolt::cl::bit_or< cl_int > );
269 BOLT_CREATE_CLCODE( bolt::cl::bit_or< cl_int >, bolt::cl::bit_orFunctor );
270 
271 BOLT_CREATE_TYPENAME( bolt::cl::bit_xor< cl_int > );
272 BOLT_CREATE_CLCODE( bolt::cl::bit_xor< cl_int >, bolt::cl::bit_xorFunctor );
273 
274 BOLT_CREATE_TYPENAME( bolt::cl::logical_not< cl_int > );
275 BOLT_CREATE_CLCODE( bolt::cl::logical_not< cl_int >, bolt::cl::logical_notFunctor );
276 
277 BOLT_CREATE_TYPENAME( bolt::cl::identity< cl_int > );
278 BOLT_CREATE_CLCODE( bolt::cl::identity< cl_int >, bolt::cl::identityFunctor );
279 
280 BOLT_CREATE_TYPENAME( bolt::cl::equal_to< cl_int > );
281 BOLT_CREATE_CLCODE( bolt::cl::equal_to< cl_int >, bolt::cl::equal_toFunctor );
282 
283 BOLT_CREATE_TYPENAME( bolt::cl::not_equal_to< cl_int > );
284 BOLT_CREATE_CLCODE( bolt::cl::not_equal_to< cl_int >, bolt::cl::not_equal_toFunctor );
285 
286 BOLT_CREATE_TYPENAME( bolt::cl::greater< cl_int > );
287 BOLT_CREATE_CLCODE( bolt::cl::greater< cl_int >, bolt::cl::greaterFunctor );
288 
289 BOLT_CREATE_TYPENAME( bolt::cl::less< cl_int > );
290 BOLT_CREATE_CLCODE( bolt::cl::less< cl_int >, bolt::cl::lessFunctor );
291 
292 BOLT_CREATE_TYPENAME( bolt::cl::greater_equal< cl_int > );
293 BOLT_CREATE_CLCODE( bolt::cl::greater_equal< cl_int >, bolt::cl::greater_equalFunctor );
294 
295 BOLT_CREATE_TYPENAME( bolt::cl::less_equal< cl_int > );
296 BOLT_CREATE_CLCODE( bolt::cl::less_equal< cl_int >, bolt::cl::less_equalFunctor );
297 
298 BOLT_CREATE_TYPENAME( bolt::cl::logical_and< cl_int > );
299 BOLT_CREATE_CLCODE( bolt::cl::logical_and< cl_int >, bolt::cl::logical_andFunctor );
300 
301 BOLT_CREATE_TYPENAME( bolt::cl::logical_or< cl_int > );
302 BOLT_CREATE_CLCODE( bolt::cl::logical_or< cl_int >, bolt::cl::logical_orFunctor );
303 
304 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::square, int, cl_short );
305 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::square, int, cl_ushort );
306 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::square, int, cl_uint );
307 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::square, int, cl_long );
308 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::square, int, cl_ulong );
309 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::square, int, cl_float );
310 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::square, int, cl_double );
311 
312 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::cube, int, cl_short );
313 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::cube, int, cl_ushort );
314 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::cube, int, cl_uint );
315 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::cube, int, cl_long );
316 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::cube, int, cl_ulong );
317 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::cube, int, cl_float );
318 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::cube, int, cl_double );
319 
320 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::negate, int, cl_short );
321 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::negate, int, cl_ushort );
322 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::negate, int, cl_uint );
323 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::negate, int, cl_long );
324 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::negate, int, cl_ulong );
325 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::negate, int, cl_float );
326 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::negate, int, cl_double );
327 
328 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::plus, int, cl_short );
329 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::plus, int, cl_ushort );
330 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::plus, int, cl_uint );
331 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::plus, int, cl_long );
332 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::plus, int, cl_ulong );
333 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::plus, int, cl_float );
334 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::plus, int, cl_double );
335 
336 
337 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minus, int, cl_short );
338 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minus, int, cl_ushort );
339 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minus, int, cl_uint );
340 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minus, int, cl_long );
341 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minus, int, cl_ulong );
342 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minus, int, cl_float );
343 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minus, int, cl_double );
344 
345 
346 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::multiplies, int, cl_short );
347 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::multiplies, int, cl_ushort );
348 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::multiplies, int, cl_uint );
349 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::multiplies, int, cl_long );
350 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::multiplies, int, cl_ulong );
351 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::multiplies, int, cl_float );
352 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::multiplies, int, cl_double );
353 
354 
355 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::divides, int, cl_short );
356 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::divides, int, cl_ushort );
357 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::divides, int, cl_uint );
358 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::divides, int, cl_long );
359 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::divides, int, cl_ulong );
360 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::divides, int, cl_float );
361 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::divides, int, cl_double );
362 
363 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::modulus, int, cl_short );
364 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::modulus, int, cl_ushort );
365 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::modulus, int, cl_uint );
366 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::modulus, int, cl_long );
367 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::modulus, int, cl_ulong );
368 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::modulus, int, cl_float );
369 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::modulus, int, cl_double );
370 
371 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::maximum, int, cl_short );
372 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::maximum, int, cl_ushort );
373 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::maximum, int, cl_uint );
374 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::maximum, int, cl_long );
375 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::maximum, int, cl_ulong );
376 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::maximum, int, cl_float );
377 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::maximum, int, cl_double );
378 
379 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minimum, int, cl_short );
380 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minimum, int, cl_ushort );
381 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minimum, int, cl_uint );
382 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minimum, int, cl_long );
383 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minimum, int, cl_ulong );
384 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minimum, int, cl_float );
385 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::minimum, int, cl_double );
386 
387 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_and, int, cl_short );
388 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_and, int, cl_ushort );
389 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_and, int, cl_uint );
390 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_and, int, cl_long );
391 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_and, int, cl_ulong );
392 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_and, int, cl_float );
393 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_and, int, cl_double );
394 
395 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_or, int, cl_short );
396 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_or, int, cl_ushort );
397 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_or, int, cl_uint );
398 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_or, int, cl_long );
399 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_or, int, cl_ulong );
400 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_or, int, cl_float );
401 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_or, int, cl_double );
402 
403 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_xor, int, cl_short );
404 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_xor, int, cl_ushort );
405 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_xor, int, cl_uint );
406 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_xor, int, cl_long );
407 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_xor, int, cl_ulong );
408 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_xor, int, cl_float );
409 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::bit_xor, int, cl_double );
410 
411 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_not, int, cl_short );
412 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_not, int, cl_ushort );
413 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_not, int, cl_uint );
414 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_not, int, cl_long );
415 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_not, int, cl_ulong );
416 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_not, int, cl_float );
417 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_not, int, cl_double );
418 
419 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::identity, int, cl_short );
420 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::identity, int, cl_ushort );
421 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::identity, int, cl_uint );
422 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::identity, int, cl_long );
423 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::identity, int, cl_ulong );
424 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::identity, int, cl_float );
425 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::identity, int, cl_double );
426 
427 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::equal_to, int, cl_short );
428 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::equal_to, int, cl_ushort );
429 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::equal_to, int, cl_uint );
430 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::equal_to, int, cl_long );
431 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::equal_to, int, cl_ulong );
432 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::equal_to, int, cl_float );
433 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::equal_to, int, cl_double );
434 
435 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::not_equal_to, int, cl_short );
436 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::not_equal_to, int, cl_ushort );
437 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::not_equal_to, int, cl_uint );
438 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::not_equal_to, int, cl_long );
439 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::not_equal_to, int, cl_ulong );
440 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::not_equal_to, int, cl_float );
441 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::not_equal_to, int, cl_double );
442 
443 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater, int, cl_short );
444 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater, int, cl_ushort );
445 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater, int, cl_uint );
446 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater, int, cl_long );
447 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater, int, cl_ulong );
448 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater, int, cl_float );
449 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater, int, cl_double );
450 
451 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less, int, cl_short );
452 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less, int, cl_ushort );
453 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less, int, cl_uint );
454 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less, int, cl_long );
455 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less, int, cl_ulong );
456 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less, int, cl_float );
457 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less, int, cl_double );
458 
459 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater_equal, int, cl_short );
460 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater_equal, int, cl_ushort );
461 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater_equal, int, cl_uint );
462 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater_equal, int, cl_long );
463 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater_equal, int, cl_ulong );
464 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater_equal, int, cl_float );
465 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::greater_equal, int, cl_double );
466 
467 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less_equal, int, cl_short );
468 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less_equal, int, cl_ushort );
469 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less_equal, int, cl_uint );
470 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less_equal, int, cl_long );
471 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less_equal, int, cl_ulong );
472 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less_equal, int, cl_float );
473 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::less_equal, int, cl_double );
474 
475 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_and, int, cl_short );
476 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_and, int, cl_ushort );
477 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_and, int, cl_uint );
478 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_and, int, cl_long );
479 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_and, int, cl_ulong );
480 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_and, int, cl_float );
481 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_and, int, cl_double );
482 
483 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_or, int, cl_short );
484 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_or, int, cl_ushort );
485 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_or, int, cl_uint );
486 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_or, int, cl_long );
487 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_or, int, cl_ulong );
488 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_or, int, cl_float );
489 BOLT_TEMPLATE_REGISTER_NEW_TYPE( bolt::cl::logical_or, int, cl_double );
490 
491 #endif