ViennaCL - The Vienna Computing Library: viennacl/device_specific/utils.hpp Source File

ViennaCL - The Vienna Computing Library 1.7.1 Free open-source GPU-accelerated linear algebra and solver library. |

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
utils.hpp
Go to the documentation of this file.
1 #ifndef VIENNACL_DEVICE_SPECIFIC_UTILS_HPP
2 #define VIENNACL_DEVICE_SPECIFIC_UTILS_HPP
3
4 /* =========================================================================
5 Copyright (c) 2010-2016, Institute for Microelectronics,
6 Institute for Analysis and Scientific Computing,
7 TU Wien.
8 Portions of this software are copyright by UChicago Argonne, LLC.
9
10 -----------------
11 ViennaCL - The Vienna Computing Library
12 -----------------
13
14 Project Head: Karl Rupp rupp@iue.tuwien.ac.at
15
16 (A list of authors and contributors can be found in the manual)
17
18 License: MIT (X11), see file LICENSE in the base directory
19 ============================================================================= */
20
21
26 #include <sstream>
27
28 #include "viennacl/detail/matrix_def.hpp"
29 #include "viennacl/detail/vector_def.hpp"
30
31 #include "viennacl/device_specific/forwards.h"
32 #include "viennacl/ocl/forwards.h"
33
34 #include "viennacl/scheduler/forwards.h"
35
36 #include "viennacl/traits/size.hpp"
37 #include "viennacl/traits/handle.hpp"
38 #include "viennacl/traits/row_major.hpp"
39
40 #include "viennacl/tools/tools.hpp"
41
42 namespace viennacl
43 {
44 namespace device_specific
45 {
46 namespace utils
47 {
48
49 //CUDA Conversion
50 inline std::string opencl_source_to_cuda_source(std::string const & opencl_src)
51 {
52 std::string res = opencl_src;
53
54 viennacl::tools::find_and_replace(res,"__attribute__","//__attribute__");
55
56 //Pointer
57 viennacl::tools::find_and_replace(res, "__global float*", "float*");
58 viennacl::tools::find_and_replace(res, "__local float*", "float*");
59
60 viennacl::tools::find_and_replace(res, "__global double*", "double*");
61 viennacl::tools::find_and_replace(res, "__local double*", "double*");
62
63 //Qualifiers
64 viennacl::tools::find_and_replace(res,"__global","__device__");
65 viennacl::tools::find_and_replace(res,"__kernel","__global__");
66 viennacl::tools::find_and_replace(res,"__constant","__constant__");
67 viennacl::tools::find_and_replace(res,"__local","__shared__");
68
69 //Indexing
70 viennacl::tools::find_and_replace(res,"get_num_groups(0)","gridDim.x");
71 viennacl::tools::find_and_replace(res,"get_num_groups(1)","gridDim.y");
72
73 viennacl::tools::find_and_replace(res,"get_local_size(0)","blockDim.x");
74 viennacl::tools::find_and_replace(res,"get_local_size(1)","blockDim.y");
75
76 viennacl::tools::find_and_replace(res,"get_group_id(0)","blockIdx.x");
77 viennacl::tools::find_and_replace(res,"get_group_id(1)","blockIdx.y");
78
79 viennacl::tools::find_and_replace(res,"get_local_id(0)","threadIdx.x");
80 viennacl::tools::find_and_replace(res,"get_local_id(1)","threadIdx.y");
81
82 viennacl::tools::find_and_replace(res,"get_global_id(0)","(blockIdx.x*blockDim.x + threadIdx.x)");
83 viennacl::tools::find_and_replace(res,"get_global_id(1)","(blockIdx.y*blockDim.y + threadIdx.y)");
84
85 //Synchronization
86 viennacl::tools::find_and_replace(res,"barrier(CLK_LOCAL_MEM_FENCE)","__syncthreads()");
87 viennacl::tools::find_and_replace(res,"barrier(CLK_GLOBAL_MEM_FENCE)","__syncthreads()");
88
89
90 return res;
91 }
92
93 static std::string numeric_type_to_string(scheduler::statement_node_numeric_type const & type){
94 switch (type)
95 {
96 //case scheduler::CHAR_TYPE: return "char";
97 //case scheduler::UCHAR_TYPE: return "unsigned char";
98 //case scheduler::SHORT_TYPE: return "short";
99 //case scheduler::USHORT_TYPE: return "unsigned short";
100 case scheduler::INT_TYPE: return "int";
101 case scheduler::UINT_TYPE: return "unsigned int";
102 case scheduler::LONG_TYPE: return "long";
103 case scheduler::ULONG_TYPE: return "unsigned long";
104 case scheduler::FLOAT_TYPE : return "float";
105 case scheduler::DOUBLE_TYPE : return "double";
106 default : throw generator_not_supported_exception("Unsupported Scalartype");
107 }
108 }
109
110
111 template<class Fun>
112 static typename Fun::result_type call_on_host_scalar(scheduler::lhs_rhs_element element, Fun const & fun){
113 assert(element.type_family == scheduler::SCALAR_TYPE_FAMILY && bool("Must be called on a host scalar"));
114 switch (element.numeric_type)
115 {
116 //case scheduler::CHAR_TYPE: return fun(element.host_char);
117 //case scheduler::UCHAR_TYPE: return fun(element.host_uchar);
118 //case scheduler::SHORT_TYPE: return fun(element.host_short);
119 //case scheduler::USHORT_TYPE: return fun(element.host_ushort);
120 case scheduler::INT_TYPE: return fun(element.host_int);
121 case scheduler::UINT_TYPE: return fun(element.host_uint);
122 case scheduler::LONG_TYPE: return fun(element.host_long);
123 case scheduler::ULONG_TYPE: return fun(element.host_ulong);
124 case scheduler::FLOAT_TYPE : return fun(element.host_float);
125 case scheduler::DOUBLE_TYPE : return fun(element.host_double);
126 default : throw generator_not_supported_exception("Unsupported Scalartype");
127 }
128 }
129
130 template<class Fun>
131 static typename Fun::result_type call_on_scalar(scheduler::lhs_rhs_element element, Fun const & fun){
132 assert(element.type_family == scheduler::SCALAR_TYPE_FAMILY && bool("Must be called on a scalar"));
133 switch (element.numeric_type)
134 {
135 //case scheduler::CHAR_TYPE: return fun(*element.scalar_char);
136 //case scheduler::UCHAR_TYPE: return fun(*element.scalar_uchar);
137 //case scheduler::SHORT_TYPE: return fun(*element.scalar_short);
138 //case scheduler::USHORT_TYPE: return fun(*element.scalar_ushort);
139 case scheduler::INT_TYPE: return fun(*element.scalar_int);
140 case scheduler::UINT_TYPE: return fun(*element.scalar_uint);
141 case scheduler::LONG_TYPE: return fun(*element.scalar_long);
142 case scheduler::ULONG_TYPE: return fun(*element.scalar_ulong);
143 case scheduler::FLOAT_TYPE : return fun(*element.scalar_float);
144 case scheduler::DOUBLE_TYPE : return fun(*element.scalar_double);
145 default : throw generator_not_supported_exception("Unsupported Scalartype");
146 }
147 }
148
149 template<class Fun>
150 static typename Fun::result_type call_on_vector(scheduler::lhs_rhs_element element, Fun const & fun){
151 assert(element.type_family == scheduler::VECTOR_TYPE_FAMILY && bool("Must be called on a vector"));
152 switch (element.numeric_type)
153 {
154 //case scheduler::CHAR_TYPE: return fun(*element.vector_char);
155 //case scheduler::UCHAR_TYPE: return fun(*element.vector_uchar);
156 //case scheduler::SHORT_TYPE: return fun(*element.vector_short);
157 //case scheduler::USHORT_TYPE: return fun(*element.vector_ushort);
158 case scheduler::INT_TYPE: return fun(*element.vector_int);
159 case scheduler::UINT_TYPE: return fun(*element.vector_uint);
160 case scheduler::LONG_TYPE: return fun(*element.vector_long);
161 case scheduler::ULONG_TYPE: return fun(*element.vector_ulong);
162 case scheduler::FLOAT_TYPE : return fun(*element.vector_float);
163 case scheduler::DOUBLE_TYPE : return fun(*element.vector_double);
164 default : throw generator_not_supported_exception("Unsupported Scalartype");
165 }
166 }
167
168 template<class Fun>
169 static typename Fun::result_type call_on_implicit_vector(scheduler::lhs_rhs_element element, Fun const & fun){
170 assert(element.type_family == scheduler::VECTOR_TYPE_FAMILY && bool("Must be called on a implicit_vector"));
171 assert(element.subtype == scheduler::IMPLICIT_VECTOR_TYPE && bool("Must be called on a implicit_vector"));
172 switch (element.numeric_type)
173 {
174 //case scheduler::CHAR_TYPE: return fun(*element.implicit_vector_char);
175 //case scheduler::UCHAR_TYPE: return fun(*element.implicit_vector_uchar);
176 //case scheduler::SHORT_TYPE: return fun(*element.implicit_vector_short);
177 //case scheduler::USHORT_TYPE: return fun(*element.implicit_vector_ushort);
178 case scheduler::INT_TYPE: return fun(*element.implicit_vector_int);
179 case scheduler::UINT_TYPE: return fun(*element.implicit_vector_uint);
180 case scheduler::LONG_TYPE: return fun(*element.implicit_vector_long);
181 case scheduler::ULONG_TYPE: return fun(*element.implicit_vector_ulong);
182 case scheduler::FLOAT_TYPE : return fun(*element.implicit_vector_float);
183 case scheduler::DOUBLE_TYPE : return fun(*element.implicit_vector_double);
184 default : throw generator_not_supported_exception("Unsupported Scalartype");
185 }
186 }
187
188 template<class Fun>
189 static typename Fun::result_type call_on_matrix(scheduler::lhs_rhs_element element, Fun const & fun){
190 assert(element.type_family == scheduler::MATRIX_TYPE_FAMILY && bool("Must be called on a matrix"));
191 switch (element.numeric_type)
192 {
193 //case scheduler::CHAR_TYPE: return fun(*element.matrix_char);
194 //case scheduler::UCHAR_TYPE: return fun(*element.matrix_uchar);
195 //case scheduler::SHORT_TYPE: return fun(*element.matrix_short);
196 //case scheduler::USHORT_TYPE: return fun(*element.matrix_ushort);
197 case scheduler::INT_TYPE: return fun(*element.matrix_int);
198 case scheduler::UINT_TYPE: return fun(*element.matrix_uint);
199 case scheduler::LONG_TYPE: return fun(*element.matrix_long);
200 case scheduler::ULONG_TYPE: return fun(*element.matrix_ulong);
201 case scheduler::FLOAT_TYPE : return fun(*element.matrix_float);
202 case scheduler::DOUBLE_TYPE : return fun(*element.matrix_double);
203 default : throw generator_not_supported_exception("Unsupported Scalartype");
204 }
205 }
206
207
208 template<class Fun>
209 static typename Fun::result_type call_on_implicit_matrix(scheduler::lhs_rhs_element element, Fun const & fun){
210 assert(element.subtype == scheduler::IMPLICIT_MATRIX_TYPE && bool("Must be called on a implicit matrix"));
211 switch (element.numeric_type)
212 {
213 //case scheduler::CHAR_TYPE: return fun(*element.implicit_matrix_char);
214 //case scheduler::UCHAR_TYPE: return fun(*element.implicit_matrix_uchar);
215 //case scheduler::SHORT_TYPE: return fun(*element.implicit_matrix_short);
216 //case scheduler::USHORT_TYPE: return fun(*element.implicit_matrix_ushort);
217 case scheduler::INT_TYPE: return fun(*element.implicit_matrix_int);
218 case scheduler::UINT_TYPE: return fun(*element.implicit_matrix_uint);
219 case scheduler::LONG_TYPE: return fun(*element.implicit_matrix_long);
220 case scheduler::ULONG_TYPE: return fun(*element.implicit_matrix_ulong);
221 case scheduler::FLOAT_TYPE : return fun(*element.implicit_matrix_float);
222 case scheduler::DOUBLE_TYPE : return fun(*element.implicit_matrix_double);
223 default : throw generator_not_supported_exception("Unsupported Scalartype");
224 }
225 }
226
227 template<class Fun>
228 static typename Fun::result_type call_on_element(scheduler::lhs_rhs_element const & element, Fun const & fun){
229 switch (element.type_family)
230 {
231 case scheduler::SCALAR_TYPE_FAMILY:
232 if (element.subtype == scheduler::HOST_SCALAR_TYPE)
233 return call_on_host_scalar(element, fun);
234 else
235 return call_on_scalar(element, fun);
236 case scheduler::VECTOR_TYPE_FAMILY :
237 if (element.subtype == scheduler::IMPLICIT_VECTOR_TYPE)
238 return call_on_implicit_vector(element, fun);
239 else
240 return call_on_vector(element, fun);
241 case scheduler::MATRIX_TYPE_FAMILY:
242 if (element.subtype == scheduler::IMPLICIT_MATRIX_TYPE)
243 return call_on_implicit_matrix(element, fun);
244 else
245 return call_on_matrix(element,fun);
246 default:
247 throw generator_not_supported_exception("Unsupported datastructure type : Not among {Scalar, Vector, Matrix}");
248 }
249 }
250
251 struct scalartype_size_fun
252 {
253 typedef vcl_size_t result_type;
254 result_type operator()(float const &) const { return sizeof(float); }
255 result_type operator()(double const &) const { return sizeof(double); }
256 template<class T> result_type operator()(T const &) const { return sizeof(typename viennacl::result_of::cpu_value_type<T>::type); }
257 };
258
259 struct internal_size_fun
260 {
261 typedef vcl_size_t result_type;
262 template<class T> result_type operator()(T const &t) const { return viennacl::traits::internal_size(t); }
263 };
264
265 struct size_fun
266 {
267 typedef vcl_size_t result_type;
268 template<class T> result_type operator()(T const &t) const { return viennacl::traits::size(t); }
269 };
270
271 struct stride_fun
272 {
273 typedef vcl_size_t result_type;
274 template<class T> result_type operator()(T const &t) const { return viennacl::traits::stride(t); }
275 };
276
277 struct start1_fun
278 {
279 typedef vcl_size_t result_type;
280 template<class T> result_type operator()(T const &t) const { return viennacl::traits::start1(t); }
281 };
282
283 struct start2_fun
284 {
285 typedef vcl_size_t result_type;
286 template<class T> result_type operator()(T const &t) const { return viennacl::traits::start2(t); }
287 };
288
289 struct leading_stride
290 {
291 typedef vcl_size_t result_type;
292 template<class T> result_type operator()(T const &t) const { return viennacl::traits::row_major(t)?viennacl::traits::stride2(t):viennacl::traits::stride1(t); }
293 };
294
295 struct leading_start
296 {
297 typedef vcl_size_t result_type;
298 template<class T> result_type operator()(T const &t) const { return viennacl::traits::row_major(t)?viennacl::traits::start2(t):viennacl::traits::start1(t); }
299 };
300
301 struct stride1_fun
302 {
303 typedef vcl_size_t result_type;
304 template<class T> result_type operator()(T const &t) const { return viennacl::traits::stride1(t); }
305 };
306
307 struct stride2_fun
308 {
309 typedef vcl_size_t result_type;
310 template<class T> result_type operator()(T const &t) const { return viennacl::traits::stride2(t); }
311 };
312
313 struct handle_fun
314 {
315 typedef cl_mem result_type;
316 template<class T>
317 result_type operator()(T const &t) const { return viennacl::traits::opencl_handle(t); }
318 };
319
320 struct internal_size1_fun
321 {
322 typedef vcl_size_t result_type;
323 template<class T>
324 result_type operator()(T const &t) const { return viennacl::traits::internal_size1(t); }
325 };
326
327 struct row_major_fun
328 {
329 typedef bool result_type;
330 template<class T>
331 result_type operator()(T const &t) const { return viennacl::traits::row_major(t); }
332 };
333
334 struct internal_size2_fun
335 {
336 typedef vcl_size_t result_type;
337 template<class T>
338 result_type operator()(T const &t) const { return viennacl::traits::internal_size2(t); }
339 };
340
341 struct size1_fun
342 {
343 typedef vcl_size_t result_type;
344 template<class T>
345 result_type operator()(T const &t) const { return viennacl::traits::size1(t); }
346 };
347
348 struct size2_fun
349 {
350 typedef vcl_size_t result_type;
351 template<class T>
352 result_type operator()(T const &t) const { return viennacl::traits::size2(t); }
353 };
354
355 template<class T, class U>
356 struct is_same_type { enum { value = 0 }; };
357
358 template<class T>
359 struct is_same_type<T,T> { enum { value = 1 }; };
360
361 inline bool is_reduction(scheduler::statement_node const & node)
362 {
363 return node.op.type_family==scheduler::OPERATION_VECTOR_REDUCTION_TYPE_FAMILY
364 || node.op.type_family==scheduler::OPERATION_COLUMNS_REDUCTION_TYPE_FAMILY
365 || node.op.type_family==scheduler::OPERATION_ROWS_REDUCTION_TYPE_FAMILY
366 || node.op.type==scheduler::OPERATION_BINARY_INNER_PROD_TYPE
367 || node.op.type==scheduler::OPERATION_BINARY_MAT_VEC_PROD_TYPE;
368 }
369
370 inline bool is_index_reduction(scheduler::op_element const & op)
371 {
372 return op.type==scheduler::OPERATION_BINARY_ELEMENT_ARGFMAX_TYPE
373 || op.type==scheduler::OPERATION_BINARY_ELEMENT_ARGMAX_TYPE
374 || op.type==scheduler::OPERATION_BINARY_ELEMENT_ARGFMIN_TYPE
375 || op.type==scheduler::OPERATION_BINARY_ELEMENT_ARGMIN_TYPE;
376 }
377 template<class T>
378 struct type_to_string;
379 template<> struct type_to_string<unsigned char> { static const char * value() { return "uchar"; } };
380 template<> struct type_to_string<char> { static const char * value() { return "char"; } };
381 template<> struct type_to_string<unsigned short> { static const char * value() { return "ushort"; } };
382 template<> struct type_to_string<short> { static const char * value() { return "short"; } };
383 template<> struct type_to_string<unsigned int> { static const char * value() { return "uint"; } };
384 template<> struct type_to_string<int> { static const char * value() { return "int"; } };
385 template<> struct type_to_string<unsigned long> { static const char * value() { return "ulong"; } };
386 template<> struct type_to_string<long> { static const char * value() { return "long"; } };
387 template<> struct type_to_string<float> { static const char * value() { return "float"; } };
388 template<> struct type_to_string<double> { static const char * value() { return "double"; } };
389
390
391 template<class T>
392 struct first_letter_of_type;
393 template<> struct first_letter_of_type<char> { static char value() { return 'c'; } };
394 template<> struct first_letter_of_type<unsigned char> { static char value() { return 'd'; } };
395 template<> struct first_letter_of_type<short> { static char value() { return 's'; } };
396 template<> struct first_letter_of_type<unsigned short> { static char value() { return 't'; } };
397 template<> struct first_letter_of_type<int> { static char value() { return 'i'; } };
398 template<> struct first_letter_of_type<unsigned int> { static char value() { return 'j'; } };
399 template<> struct first_letter_of_type<long> { static char value() { return 'l'; } };
400 template<> struct first_letter_of_type<unsigned long> { static char value() { return 'm'; } };
401 template<> struct first_letter_of_type<float> { static char value() { return 'f'; } };
402 template<> struct first_letter_of_type<double> { static char value() { return 'd'; } };
403
404 class kernel_generation_stream : public std::ostream
405 {
406 class kgenstream : public std::stringbuf
407 {
408 public:
409 kgenstream(std::ostringstream& osstream,unsigned int const & tab_count) : oss_(osstream), tab_count_(tab_count){ }
410 int sync() {
411 for (unsigned int i=0; i<tab_count_;++i)
412 oss_ << " ";
413 oss_ << str();
414 str("");
415 return !oss_;
416 }
417 #if defined(_MSC_VER)
418 ~kgenstream() throw() { pubsync(); }
419 #else
420 ~kgenstream() { pubsync(); }
421 #endif
422 private:
423 std::ostream& oss_;
424 unsigned int const & tab_count_;
425 };
426
427 public:
428 kernel_generation_stream() : std::ostream(new kgenstream(oss,tab_count_)), tab_count_(0){ }
429 #if defined(_MSC_VER)
430 ~kernel_generation_stream() throw() { delete rdbuf(); }
431 #else
432 ~kernel_generation_stream(){ delete rdbuf(); }
433 #endif
434
435 std::string str(){ return oss.str(); }
436 void inc_tab(){ ++tab_count_; }
437 void dec_tab(){ --tab_count_; }
438 private:
439 unsigned int tab_count_;
440 std::ostringstream oss;
441 };
442
443 inline bool node_leaf(scheduler::op_element const & op)
444 {
445 using namespace scheduler;
446 return op.type==OPERATION_UNARY_NORM_1_TYPE
447 || op.type==OPERATION_UNARY_NORM_2_TYPE
448 || op.type==OPERATION_UNARY_NORM_INF_TYPE
449 || op.type==OPERATION_UNARY_TRANS_TYPE
450 || op.type==OPERATION_BINARY_MAT_VEC_PROD_TYPE
451 || op.type==OPERATION_BINARY_MAT_MAT_PROD_TYPE
452 || op.type==OPERATION_BINARY_INNER_PROD_TYPE
453 || op.type==OPERATION_BINARY_MATRIX_DIAG_TYPE
454 || op.type==OPERATION_BINARY_VECTOR_DIAG_TYPE
455 || op.type==OPERATION_BINARY_MATRIX_ROW_TYPE
456 || op.type==OPERATION_BINARY_MATRIX_COLUMN_TYPE
457 || op.type_family==OPERATION_VECTOR_REDUCTION_TYPE_FAMILY
458 || op.type_family==OPERATION_ROWS_REDUCTION_TYPE_FAMILY
459 || op.type_family==OPERATION_COLUMNS_REDUCTION_TYPE_FAMILY;
460 }
461
462 inline bool elementwise_operator(scheduler::op_element const & op)
463 {
464 using namespace scheduler;
465 return op.type== OPERATION_BINARY_ASSIGN_TYPE
466 || op.type== OPERATION_BINARY_INPLACE_ADD_TYPE
467 || op.type== OPERATION_BINARY_INPLACE_SUB_TYPE
468 || op.type== OPERATION_BINARY_ADD_TYPE
469 || op.type== OPERATION_BINARY_SUB_TYPE
470 || op.type== OPERATION_BINARY_ELEMENT_PROD_TYPE
471 || op.type== OPERATION_BINARY_ELEMENT_DIV_TYPE
472 || op.type== OPERATION_BINARY_MULT_TYPE
473 || op.type== OPERATION_BINARY_DIV_TYPE;
474 }
475
476 inline bool elementwise_function(scheduler::op_element const & op)
477 {
478 using namespace scheduler;
479 return
480
481 op.type == OPERATION_UNARY_CAST_CHAR_TYPE
482 || op.type == OPERATION_UNARY_CAST_UCHAR_TYPE
483 || op.type == OPERATION_UNARY_CAST_SHORT_TYPE
484 || op.type == OPERATION_UNARY_CAST_USHORT_TYPE
485 || op.type == OPERATION_UNARY_CAST_INT_TYPE
486 || op.type == OPERATION_UNARY_CAST_UINT_TYPE
487 || op.type == OPERATION_UNARY_CAST_LONG_TYPE
488 || op.type == OPERATION_UNARY_CAST_ULONG_TYPE
489 || op.type == OPERATION_UNARY_CAST_HALF_TYPE
490 || op.type == OPERATION_UNARY_CAST_FLOAT_TYPE
491 || op.type == OPERATION_UNARY_CAST_DOUBLE_TYPE
492
493 || op.type== OPERATION_UNARY_ABS_TYPE
494 || op.type== OPERATION_UNARY_ACOS_TYPE
495 || op.type== OPERATION_UNARY_ASIN_TYPE
496 || op.type== OPERATION_UNARY_ATAN_TYPE
497 || op.type== OPERATION_UNARY_CEIL_TYPE
498 || op.type== OPERATION_UNARY_COS_TYPE
499 || op.type== OPERATION_UNARY_COSH_TYPE
500 || op.type== OPERATION_UNARY_EXP_TYPE
501 || op.type== OPERATION_UNARY_FABS_TYPE
502 || op.type== OPERATION_UNARY_FLOOR_TYPE
503 || op.type== OPERATION_UNARY_LOG_TYPE
504 || op.type== OPERATION_UNARY_LOG10_TYPE
505 || op.type== OPERATION_UNARY_SIN_TYPE
506 || op.type== OPERATION_UNARY_SINH_TYPE
507 || op.type== OPERATION_UNARY_SQRT_TYPE
508 || op.type== OPERATION_UNARY_TAN_TYPE
509 || op.type== OPERATION_UNARY_TANH_TYPE
510
511 || op.type== OPERATION_BINARY_ELEMENT_POW_TYPE
512 || op.type== OPERATION_BINARY_ELEMENT_EQ_TYPE
513 || op.type== OPERATION_BINARY_ELEMENT_NEQ_TYPE
514 || op.type== OPERATION_BINARY_ELEMENT_GREATER_TYPE
515 || op.type== OPERATION_BINARY_ELEMENT_LESS_TYPE
516 || op.type== OPERATION_BINARY_ELEMENT_GEQ_TYPE
517 || op.type== OPERATION_BINARY_ELEMENT_LEQ_TYPE
518 || op.type== OPERATION_BINARY_ELEMENT_FMAX_TYPE
519 || op.type== OPERATION_BINARY_ELEMENT_FMIN_TYPE
520 || op.type== OPERATION_BINARY_ELEMENT_MAX_TYPE
521 || op.type== OPERATION_BINARY_ELEMENT_MIN_TYPE;
522
523 }
524
525 inline scheduler::lhs_rhs_element & lhs_rhs_element(scheduler::statement const & st, vcl_size_t idx, leaf_t leaf)
526 {
527 using namespace tree_parsing;
528 assert(leaf==LHS_NODE_TYPE || leaf==RHS_NODE_TYPE);
529 if (leaf==LHS_NODE_TYPE)
530 return const_cast<scheduler::lhs_rhs_element &>(st.array()[idx].lhs);
531 return const_cast<scheduler::lhs_rhs_element &>(st.array()[idx].rhs);
532 }
533
534 inline unsigned int size_of(scheduler::statement_node_numeric_type type)
535 {
536 using namespace scheduler;
537 switch (type)
538 {
539 case UCHAR_TYPE:
540 case CHAR_TYPE: return 1;
541
542 case USHORT_TYPE:
543 case SHORT_TYPE:
544 case HALF_TYPE: return 2;
545
546 case UINT_TYPE:
547 case INT_TYPE:
548 case FLOAT_TYPE: return 4;
549
550 case ULONG_TYPE:
551 case LONG_TYPE:
552 case DOUBLE_TYPE: return 8;
553
554 default: throw generator_not_supported_exception("Unsupported scalartype");
555 }
556 }
557
558 inline std::string append_width(std::string const & str, unsigned int width)
559 {
560 if (width==1)
561 return str;
562 return str + tools::to_string(width);
563 }
564
565 }
566 }
567 }
568 #endif
viennacl::device_specific::utils::first_letter_of_type< unsigned short >::value
static char value()
Definition: utils.hpp:396
viennacl::scheduler::OPERATION_UNARY_NORM_INF_TYPE
Definition: forwards.h:109
viennacl::device_specific::utils::row_major_fun::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:331
viennacl::scheduler::OPERATION_UNARY_ATAN_TYPE
Definition: forwards.h:91
viennacl::device_specific::utils::kernel_generation_stream::~kernel_generation_stream
~kernel_generation_stream()
Definition: utils.hpp:432
forwards.h
This file provides the forward declarations for the OpenCL layer of ViennaCL.
viennacl::device_specific::utils::internal_size_fun
Definition: utils.hpp:259
viennacl::scheduler::INT_TYPE
Definition: forwards.h:294
viennacl::scheduler::OPERATION_BINARY_VECTOR_DIAG_TYPE
Definition: forwards.h:141
viennacl::scheduler::HALF_TYPE
Definition: forwards.h:298
viennacl::device_specific::utils::first_letter_of_type
Definition: utils.hpp:392
viennacl::device_specific::utils::type_to_string< long >::value
static const char * value()
Definition: utils.hpp:386
viennacl::device_specific::utils::size1_fun
Definition: utils.hpp:341
viennacl::device_specific::utils::handle_fun::result_type
cl_mem result_type
Definition: utils.hpp:315
viennacl::scheduler::OPERATION_BINARY_MAT_VEC_PROD_TYPE
Definition: forwards.h:144
viennacl::scheduler::OPERATION_BINARY_ELEMENT_POW_TYPE
Definition: forwards.h:134
viennacl::traits::stride1
result_of::size_type< matrix_base< NumericT > >::type stride1(matrix_base< NumericT > const &s)
Definition: stride.hpp:55
viennacl::device_specific::utils::stride_fun::result_type
vcl_size_t result_type
Definition: utils.hpp:273
viennacl::device_specific::utils::first_letter_of_type< int >::value
static char value()
Definition: utils.hpp:397
viennacl::scheduler::OPERATION_VECTOR_REDUCTION_TYPE_FAMILY
Definition: forwards.h:62
viennacl::scheduler::OPERATION_BINARY_ELEMENT_MAX_TYPE
Definition: forwards.h:137
viennacl::device_specific::generator_not_supported_exception
Exception for the case the generator is unable to deal with the operation.
Definition: forwards.h:163
size.hpp
Generic size and resize functionality for different vector and matrix types.
viennacl::scheduler::OPERATION_UNARY_TRANS_TYPE
Definition: forwards.h:106
viennacl::scheduler::UCHAR_TYPE
Definition: forwards.h:291
viennacl::scheduler::OPERATION_UNARY_COS_TYPE
Definition: forwards.h:93
viennacl::device_specific::utils::internal_size1_fun::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:324
viennacl::device_specific::utils::size1_fun::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:345
viennacl::scheduler::OPERATION_UNARY_FABS_TYPE
Definition: forwards.h:96
viennacl::device_specific::utils::first_letter_of_type< char >::value
static char value()
Definition: utils.hpp:393
viennacl::scheduler::OPERATION_BINARY_ELEMENT_GEQ_TYPE
Definition: forwards.h:131
viennacl::device_specific::utils::scalartype_size_fun
Definition: utils.hpp:251
tools.hpp
Various little tools used here and there in ViennaCL.
viennacl::traits::internal_size1
vcl_size_t internal_size1(matrix_base< NumericT > const &mat)
Helper routine for obtaining the internal number of entries per row of a ViennaCL matrix...
Definition: size.hpp:386
viennacl::device_specific::utils::stride2_fun
Definition: utils.hpp:307
viennacl::device_specific::utils::start1_fun::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:280
viennacl::device_specific::utils::size2_fun::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:352
viennacl::traits::size1
vcl_size_t size1(MatrixType const &mat)
Generic routine for obtaining the number of rows of a matrix (ViennaCL, uBLAS, etc.)
Definition: size.hpp:163
viennacl::device_specific::utils::stride_fun
Definition: utils.hpp:271
viennacl::scheduler::OPERATION_BINARY_ELEMENT_DIV_TYPE
Definition: forwards.h:127
viennacl::scheduler::DOUBLE_TYPE
Definition: forwards.h:300
viennacl::device_specific::utils::internal_size2_fun
Definition: utils.hpp:334
viennacl::scheduler::OPERATION_UNARY_ACOS_TYPE
Definition: forwards.h:89
viennacl::traits::internal_size2
vcl_size_t internal_size2(matrix_base< NumericT > const &mat)
Helper routine for obtaining the internal number of entries per column of a ViennaCL matrix...
Definition: size.hpp:394
viennacl::scheduler::OPERATION_UNARY_EXP_TYPE
Definition: forwards.h:95
viennacl::device_specific::utils::row_major_fun::result_type
bool result_type
Definition: utils.hpp:329
viennacl::device_specific::utils::elementwise_operator
bool elementwise_operator(scheduler::op_element const &op)
Definition: utils.hpp:462
viennacl::device_specific::utils::type_to_string< char >::value
static const char * value()
Definition: utils.hpp:380
viennacl::scheduler::OPERATION_UNARY_CAST_FLOAT_TYPE
Definition: forwards.h:85
viennacl::device_specific::utils::stride1_fun::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:304
viennacl::device_specific::leaf_t
leaf_t
Definition: forwards.h:180
viennacl::scheduler::MATRIX_TYPE_FAMILY
Definition: forwards.h:260
viennacl::scheduler::OPERATION_UNARY_ASIN_TYPE
Definition: forwards.h:90
viennacl::device_specific::utils::type_to_string< double >::value
static const char * value()
Definition: utils.hpp:388
viennacl::scheduler::statement_node::op
op_element op
Definition: forwards.h:481
viennacl::scheduler::SCALAR_TYPE_FAMILY
Definition: forwards.h:254
viennacl::traits::stride
result_of::size_type< viennacl::vector_base< T > >::type stride(viennacl::vector_base< T > const &s)
Definition: stride.hpp:45
viennacl::traits::start1
result_of::size_type< T >::type start1(T const &obj)
Definition: start.hpp:65
viennacl::scheduler::OPERATION_BINARY_MATRIX_ROW_TYPE
Definition: forwards.h:142
viennacl::scheduler::OPERATION_BINARY_ASSIGN_TYPE
Definition: forwards.h:115
viennacl::scheduler::OPERATION_UNARY_CAST_HALF_TYPE
Definition: forwards.h:84
viennacl::scheduler::lhs_rhs_element
A class representing the 'data' for the LHS or RHS operand of the respective node.
Definition: forwards.h:337
viennacl::scheduler::statement::array
container_type const & array() const
Definition: forwards.h:528
viennacl::device_specific::utils::first_letter_of_type< long >::value
static char value()
Definition: utils.hpp:399
viennacl::scheduler::HOST_SCALAR_TYPE
Definition: forwards.h:268
viennacl::traits::internal_size
vcl_size_t internal_size(vector_base< NumericT > const &vec)
Helper routine for obtaining the buffer length of a ViennaCL vector.
Definition: size.hpp:375
viennacl::scheduler::statement_node_numeric_type
statement_node_numeric_type
Encodes the type of a node in the statement tree.
Definition: forwards.h:286
viennacl::device_specific::utils::is_same_type::value
Definition: utils.hpp:356
viennacl::device_specific::utils::node_leaf
bool node_leaf(scheduler::op_element const &op)
Definition: utils.hpp:443
matrix_def.hpp
Forward declaration of dense matrix classes.
viennacl::device_specific::utils::size_fun::result_type
vcl_size_t result_type
Definition: utils.hpp:267
viennacl::device_specific::utils::opencl_source_to_cuda_source
std::string opencl_source_to_cuda_source(std::string const &opencl_src)
Definition: utils.hpp:50
viennacl::scheduler::op_element::type_family
operation_node_type_family type_family
Definition: forwards.h:473
viennacl::scheduler::op_element
Struct for holding the type family as well as the type of an operation (could be addition, subtraction, norm, etc.)
Definition: forwards.h:471
viennacl::scheduler::OPERATION_UNARY_CAST_UCHAR_TYPE
Definition: forwards.h:77
viennacl::traits::size2
result_of::size_type< MatrixType >::type size2(MatrixType const &mat)
Generic routine for obtaining the number of columns of a matrix (ViennaCL, uBLAS, etc...
Definition: size.hpp:201
viennacl::scheduler::OPERATION_COLUMNS_REDUCTION_TYPE_FAMILY
Definition: forwards.h:64
viennacl::scheduler::OPERATION_BINARY_ELEMENT_PROD_TYPE
Definition: forwards.h:126
viennacl::device_specific::utils::scalartype_size_fun::operator()
result_type operator()(float const &) const
Definition: utils.hpp:254
viennacl::device_specific::utils::kernel_generation_stream::str
std::string str()
Definition: utils.hpp:435
viennacl::device_specific::utils::internal_size_fun::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:262
viennacl::device_specific::utils::stride1_fun::result_type
vcl_size_t result_type
Definition: utils.hpp:303
viennacl::scheduler::OPERATION_UNARY_NORM_2_TYPE
Definition: forwards.h:108
viennacl::scheduler::SHORT_TYPE
Definition: forwards.h:292
viennacl::device_specific::utils::size2_fun
Definition: utils.hpp:348
viennacl::scheduler::LONG_TYPE
Definition: forwards.h:296
viennacl::scheduler::OPERATION_BINARY_ELEMENT_FMIN_TYPE
Definition: forwards.h:136
viennacl::traits::size
vcl_size_t size(VectorType const &vec)
Generic routine for obtaining the size of a vector (ViennaCL, uBLAS, etc.)
Definition: size.hpp:239
viennacl::traits::start2
result_of::size_type< T >::type start2(T const &obj)
Definition: start.hpp:84
viennacl::device_specific::utils::kernel_generation_stream
Definition: utils.hpp:404
viennacl::scheduler::OPERATION_UNARY_LOG_TYPE
Definition: forwards.h:98
viennacl::device_specific::utils::elementwise_function
bool elementwise_function(scheduler::op_element const &op)
Definition: utils.hpp:476
viennacl::device_specific::utils::type_to_string< int >::value
static const char * value()
Definition: utils.hpp:384
viennacl::scheduler::OPERATION_BINARY_ELEMENT_GREATER_TYPE
Definition: forwards.h:130
viennacl::device_specific::utils::internal_size_fun::result_type
vcl_size_t result_type
Definition: utils.hpp:261
viennacl::scheduler::OPERATION_UNARY_CAST_LONG_TYPE
Definition: forwards.h:82
viennacl::device_specific::utils::start2_fun::result_type
vcl_size_t result_type
Definition: utils.hpp:285
viennacl::scheduler::OPERATION_BINARY_INNER_PROD_TYPE
Definition: forwards.h:146
viennacl::device_specific::utils::internal_size1_fun
Definition: utils.hpp:320
viennacl::device_specific::utils::type_to_string< unsigned long >::value
static const char * value()
Definition: utils.hpp:385
viennacl::scheduler::OPERATION_UNARY_SQRT_TYPE
Definition: forwards.h:102
viennacl::scheduler::CHAR_TYPE
Definition: forwards.h:290
viennacl::device_specific::utils::row_major_fun
Definition: utils.hpp:327
viennacl::tools::find_and_replace
int find_and_replace(std::string &source, std::string const &find, std::string const &replace)
Replace in a source string a pattern by another.
Definition: tools.hpp:160
viennacl::scheduler::OPERATION_BINARY_INPLACE_ADD_TYPE
Definition: forwards.h:116
viennacl::scheduler::OPERATION_UNARY_SINH_TYPE
Definition: forwards.h:101
viennacl::device_specific::RHS_NODE_TYPE
Definition: forwards.h:184
viennacl::device_specific::LHS_NODE_TYPE
Definition: forwards.h:182
viennacl::scheduler::OPERATION_BINARY_ELEMENT_NEQ_TYPE
Definition: forwards.h:129
viennacl::device_specific::utils::scalartype_size_fun::operator()
result_type operator()(T const &) const
Definition: utils.hpp:256
viennacl::scheduler::OPERATION_UNARY_SIN_TYPE
Definition: forwards.h:100
viennacl::device_specific::utils::type_to_string< short >::value
static const char * value()
Definition: utils.hpp:382
viennacl::device_specific::utils::type_to_string< unsigned short >::value
static const char * value()
Definition: utils.hpp:381
viennacl::device_specific::utils::scalartype_size_fun::operator()
result_type operator()(double const &) const
Definition: utils.hpp:255
viennacl::scheduler::OPERATION_UNARY_CAST_USHORT_TYPE
Definition: forwards.h:79
viennacl::device_specific::utils::start2_fun::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:286
viennacl::scheduler::OPERATION_UNARY_CAST_DOUBLE_TYPE
Definition: forwards.h:86
viennacl::device_specific::utils::leading_stride
Definition: utils.hpp:289
viennacl::device_specific::utils::kernel_generation_stream::dec_tab
void dec_tab()
Definition: utils.hpp:437
viennacl::scheduler::OPERATION_UNARY_ABS_TYPE
Definition: forwards.h:88
viennacl::device_specific::utils::is_reduction
bool is_reduction(scheduler::statement_node const &node)
Definition: utils.hpp:361
forwards.h
Forwards declaration.
row_major.hpp
Determines whether a given expression has a row-major matrix layout.
viennacl::scheduler::OPERATION_UNARY_CAST_UINT_TYPE
Definition: forwards.h:81
viennacl::vcl_size_t
std::size_t vcl_size_t
Definition: forwards.h:75
viennacl::device_specific::utils::leading_stride::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:292
viennacl::scheduler::OPERATION_BINARY_MATRIX_DIAG_TYPE
Definition: forwards.h:140
forwards.h
Provides the datastructures for dealing with a single statement such as 'x = y + z;'.
viennacl::scheduler::OPERATION_UNARY_LOG10_TYPE
Definition: forwards.h:99
viennacl::device_specific::utils::start1_fun::result_type
vcl_size_t result_type
Definition: utils.hpp:279
viennacl::scheduler::OPERATION_UNARY_FLOOR_TYPE
Definition: forwards.h:97
viennacl::scheduler::OPERATION_BINARY_SUB_TYPE
Definition: forwards.h:119
viennacl::device_specific::utils::type_to_string< unsigned int >::value
static const char * value()
Definition: utils.hpp:383
viennacl::scheduler::USHORT_TYPE
Definition: forwards.h:293
viennacl::result_of::cpu_value_type::type
T::ERROR_CANNOT_DEDUCE_CPU_SCALAR_TYPE_FOR_T type
Definition: result_of.hpp:271
viennacl::device_specific::utils::kernel_generation_stream::inc_tab
void inc_tab()
Definition: utils.hpp:436
viennacl::traits::stride2
result_of::size_type< matrix_base< NumericT > >::type stride2(matrix_base< NumericT > const &s)
Definition: stride.hpp:65
viennacl::scheduler::IMPLICIT_VECTOR_TYPE
Definition: forwards.h:272
viennacl::scheduler::OPERATION_UNARY_CAST_INT_TYPE
Definition: forwards.h:80
viennacl::device_specific::utils::kernel_generation_stream::kernel_generation_stream
kernel_generation_stream()
Definition: utils.hpp:428
viennacl::scheduler::OPERATION_BINARY_INPLACE_SUB_TYPE
Definition: forwards.h:117
viennacl::scheduler::OPERATION_BINARY_MATRIX_COLUMN_TYPE
Definition: forwards.h:143
viennacl::device_specific::utils::leading_start::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:298
viennacl::device_specific::utils::size1_fun::result_type
vcl_size_t result_type
Definition: utils.hpp:343
viennacl::scheduler::OPERATION_BINARY_ELEMENT_ARGMAX_TYPE
Definition: forwards.h:124
viennacl::device_specific::utils::start1_fun
Definition: utils.hpp:277
viennacl::scheduler::IMPLICIT_MATRIX_TYPE
Definition: forwards.h:275
viennacl::device_specific::utils::lhs_rhs_element
scheduler::lhs_rhs_element & lhs_rhs_element(scheduler::statement const &st, vcl_size_t idx, leaf_t leaf)
Definition: utils.hpp:525
viennacl::traits::row_major
bool row_major(T const &)
Definition: row_major.hpp:38
viennacl::device_specific::utils::type_to_string< float >::value
static const char * value()
Definition: utils.hpp:387
viennacl::scheduler::OPERATION_UNARY_TAN_TYPE
Definition: forwards.h:103
viennacl::device_specific::utils::internal_size2_fun::result_type
vcl_size_t result_type
Definition: utils.hpp:336
viennacl::device_specific::utils::leading_start
Definition: utils.hpp:295
viennacl::device_specific::utils::first_letter_of_type< short >::value
static char value()
Definition: utils.hpp:395
viennacl::device_specific::utils::handle_fun
Definition: utils.hpp:313
viennacl::device_specific::utils::scalartype_size_fun::result_type
vcl_size_t result_type
Definition: utils.hpp:253
viennacl::scheduler::OPERATION_UNARY_CEIL_TYPE
Definition: forwards.h:92
viennacl::scheduler::op_element::type
operation_node_type type
Definition: forwards.h:474
viennacl::scheduler::OPERATION_BINARY_DIV_TYPE
Definition: forwards.h:121
viennacl::device_specific::utils::stride1_fun
Definition: utils.hpp:301
viennacl::device_specific::utils::is_index_reduction
bool is_index_reduction(scheduler::op_element const &op)
Definition: utils.hpp:370
viennacl::device_specific::utils::first_letter_of_type< unsigned long >::value
static char value()
Definition: utils.hpp:400
viennacl::scheduler::OPERATION_BINARY_ELEMENT_FMAX_TYPE
Definition: forwards.h:135
viennacl::scheduler::UINT_TYPE
Definition: forwards.h:295
viennacl::scheduler::OPERATION_BINARY_ELEMENT_ARGFMAX_TYPE
Definition: forwards.h:122
viennacl::scheduler::OPERATION_UNARY_TANH_TYPE
Definition: forwards.h:104
viennacl::scheduler::FLOAT_TYPE
Definition: forwards.h:299
viennacl::scheduler::OPERATION_UNARY_CAST_SHORT_TYPE
Definition: forwards.h:78
viennacl::device_specific::utils::first_letter_of_type< double >::value
static char value()
Definition: utils.hpp:402
viennacl::scheduler::statement
The main class for representing a statement such as x = inner_prod(y,z); at runtime.
Definition: forwards.h:502
viennacl::scheduler::OPERATION_BINARY_ADD_TYPE
Definition: forwards.h:118
viennacl::device_specific::utils::is_same_type
Definition: utils.hpp:356
vector_def.hpp
Forward declarations of the implicit_vector_base, vector_base class.
viennacl::device_specific::utils::type_to_string
Definition: utils.hpp:378
viennacl::device_specific::utils::internal_size2_fun::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:338
viennacl::scheduler::OPERATION_BINARY_ELEMENT_ARGMIN_TYPE
Definition: forwards.h:125
viennacl::scheduler::OPERATION_BINARY_ELEMENT_ARGFMIN_TYPE
Definition: forwards.h:123
handle.hpp
Extracts the underlying OpenCL handle from a vector, a matrix, an expression etc. ...
viennacl::device_specific::utils::size_fun::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:268
viennacl::scheduler::OPERATION_BINARY_ELEMENT_MIN_TYPE
Definition: forwards.h:138
viennacl::scheduler::ULONG_TYPE
Definition: forwards.h:297
viennacl::tools::to_string
std::string to_string(T const t)
Definition: tools.hpp:304
viennacl::scheduler::OPERATION_ROWS_REDUCTION_TYPE_FAMILY
Definition: forwards.h:63
viennacl::scheduler::OPERATION_UNARY_CAST_ULONG_TYPE
Definition: forwards.h:83
viennacl::device_specific::utils::stride2_fun::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:310
viennacl::device_specific::utils::type_to_string< unsigned char >::value
static const char * value()
Definition: utils.hpp:379
viennacl::device_specific::utils::leading_start::result_type
vcl_size_t result_type
Definition: utils.hpp:297
viennacl::scheduler::OPERATION_UNARY_COSH_TYPE
Definition: forwards.h:94
viennacl::scheduler::VECTOR_TYPE_FAMILY
Definition: forwards.h:257
viennacl::scheduler::OPERATION_BINARY_ELEMENT_EQ_TYPE
Definition: forwards.h:128
viennacl::device_specific::utils::stride2_fun::result_type
vcl_size_t result_type
Definition: utils.hpp:309
viennacl::scheduler::OPERATION_UNARY_CAST_CHAR_TYPE
Definition: forwards.h:76
viennacl::scheduler::statement_node
Main datastructure for an node in the statement tree.
Definition: forwards.h:478
viennacl::device_specific::utils::first_letter_of_type< unsigned char >::value
static char value()
Definition: utils.hpp:394
viennacl::device_specific::utils::size_of
unsigned int size_of(scheduler::statement_node_numeric_type type)
Definition: utils.hpp:534
viennacl::scheduler::OPERATION_BINARY_MAT_MAT_PROD_TYPE
Definition: forwards.h:145
viennacl::device_specific::utils::internal_size1_fun::result_type
vcl_size_t result_type
Definition: utils.hpp:322
viennacl::device_specific::utils::handle_fun::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:317
viennacl::device_specific::utils::size_fun
Definition: utils.hpp:265
viennacl::device_specific::utils::first_letter_of_type< unsigned int >::value
static char value()
Definition: utils.hpp:398
viennacl::device_specific::utils::stride_fun::operator()
result_type operator()(T const &t) const
Definition: utils.hpp:274
viennacl::scheduler::OPERATION_BINARY_ELEMENT_LEQ_TYPE
Definition: forwards.h:133
viennacl::scheduler::OPERATION_UNARY_NORM_1_TYPE
Definition: forwards.h:107
viennacl::device_specific::utils::append_width
std::string append_width(std::string const &str, unsigned int width)
Definition: utils.hpp:558
viennacl::device_specific::utils::first_letter_of_type< float >::value
static char value()
Definition: utils.hpp:401
viennacl::device_specific::utils::size2_fun::result_type
vcl_size_t result_type
Definition: utils.hpp:350
viennacl::device_specific::utils::leading_stride::result_type
vcl_size_t result_type
Definition: utils.hpp:291
viennacl::scheduler::OPERATION_BINARY_ELEMENT_LESS_TYPE
Definition: forwards.h:132
viennacl::device_specific::utils::start2_fun
Definition: utils.hpp:283
viennacl::scheduler::OPERATION_BINARY_MULT_TYPE
Definition: forwards.h:120