1 #ifndef VIENNACL_SCHEDULER_PRESET_HPP_
2 #define VIENNACL_SCHEDULER_PRESET_HPP_
32 template<
typename NumericT,
typename ScalarT1,
typename ScalarT2>
34 NumericT const * z, ScalarT2
const * b,
bool flip_b,
bool reciprocal_b)
41 array[0].op.type = ASSIGN_OP;
44 array[0].rhs.node_index = 1;
46 array[0].rhs.node_index = flip_a?2:3;
50 array[1].lhs.node_index = flip_a?2:3;
54 array[1].rhs.node_index = flip_b?4:5;
58 array[2].lhs.node_index = 3;
71 array[4].lhs.node_index = 5;
87 template<
typename NumericT,
typename ScalarT1>
94 template<
typename NumericT>
97 return device_specific::statements_container(
avbv(
OPERATION_BINARY_ASSIGN_TYPE, x, x, a,
false,
false, y, b,
false,
false),
98 avbv(
OPERATION_BINARY_ASSIGN_TYPE, y, y, a,
false,
false, x, b,
true,
false),
102 template<
typename NumericT>
122 template<
typename NumericT>
134 template<
typename NumericT>
146 template<
typename NumericT>
152 array[0].lhs.node_index = 1;
165 template<
typename ScalarT,
typename NumericT>
176 array[0].rhs.node_index = use_sqrt?1:2;
179 array[1].lhs.node_index = 2;
187 array[2].lhs.node_index = 3;
202 array[2].op.type = ROP;
205 bool is_float_or_double = is_floating_point<NumericT>::value;
206 if (is_float_or_double)
215 array[3].lhs.node_index = 4;
228 template<
class ScalarT,
typename NumericT>
234 template<
typename NumericT>
240 template<
typename NumericT>
246 template<
typename NumericT>
249 bool is_float_or_double = is_floating_point<NumericT>::value;
254 template<
typename NumericT>
257 bool is_float_or_double = is_floating_point<NumericT>::value;
262 template<
typename NumericT>
268 template<
typename NumericT>
271 bool is_float_or_double = is_floating_point<NumericT>::value;
275 template<
typename NumericT>
278 bool is_float_or_double = is_floating_point<NumericT>::value;
283 template<
typename NumericT>
293 array[0].rhs.node_index = 1;
297 array[1].op.type = TYPE;
304 template<
typename NumericT>
310 template<
typename NumericT,
typename IDT>
323 array[0].rhs.node_index = 1;
343 template<
typename NumericT>
349 template<
typename NumericT>
356 template<
typename NumericT>
362 template<
typename NumericT>
368 template<
typename NumericT>
378 array[0].rhs.node_index = 1;
383 array[1].lhs.node_index = 2;
403 array[1].op.type = ROP;
409 template<
typename NumericT>
415 template<
typename NumericT>
427 array[0].rhs.node_index = 1;
430 array[1].lhs.node_index = 2;
434 array[1].rhs.node_index = 6;
437 array[2].lhs.node_index = 3;
446 array[3].lhs.node_index = 4;
463 array[3].rhs.node_index = 5;
statement matrix_row_column_diag(viennacl::vector_base< NumericT > const *x, viennacl::matrix_base< NumericT > const *A, IDT id, unsigned int op)
This class represents a single scalar value on the GPU and behaves mostly like a built-in scalar type...
statement matrix_diag_from_vector(viennacl::vector_base< NumericT > const *x, viennacl::matrix_base< NumericT > const *A, int id)
statement inner_prod(ScalarT const *s, vector_base< NumericT > const *x, vector_base< NumericT > const *y)
statement max(scalar< NumericT > const *s, vector_base< NumericT > const *x)
static viennacl::enable_if< viennacl::is_primitive_type< T >::value, vcl_size_t >::type add_element(vcl_size_t next_free, lhs_rhs_element &elem, T const &t)
scheduler::statement avbv(scheduler::operation_node_type ASSIGN_OP, NumericT const *x, NumericT const *y, ScalarT1 const *a, bool flip_a, bool reciprocal_a, NumericT const *z, ScalarT2 const *b, bool flip_b, bool reciprocal_b)
statement norm_2(scalar< NumericT > const *s, vector_base< NumericT > const *x)
statement sum(scalar< NumericT > const *s, vector_base< NumericT > const *x)
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
statement min(scalar< NumericT > const *s, vector_base< NumericT > const *x)
statement binary_element_op(NumericT const *x, NumericT const *y, NumericT const *z, scheduler::operation_node_type TYPE)
std::vector< value_type > container_type
Base class for representing matrices where the individual entries are not all stored explicitly...
statement row_reduction_mat_vec_prod(viennacl::matrix_base< NumericT > const *A, bool A_trans, viennacl::vector_base< NumericT > const *x, viennacl::vector_base< NumericT > const *y, scheduler::operation_node_type ROP)
statement mat_vec_prod(viennacl::matrix_base< NumericT > const *A, bool A_trans, viennacl::vector_base< NumericT > const *x, viennacl::vector_base< NumericT > const *y)
statement index_norm_inf(scalar< NumericT > const *s, vector_base< NumericT > const *x)
statement norm_1(scalar< NumericT > const *s, vector_base< NumericT > const *x)
statement norm_inf(scalar< NumericT > const *s, vector_base< NumericT > const *x)
Metafunction for querying type informations.
statement unary_element_op(NumericT const *x, NumericT const *y, scheduler::operation_node_type TYPE)
scheduler::statement av(scheduler::operation_node_type ASSIGN_OP, NumericT const *x, NumericT const *y, ScalarT1 const *a, bool flip_a, bool reciprocal_a)
Provides the datastructures for dealing with a single statement such as 'x = y + z;'.
operation_node_type
Enumeration for identifying the possible operations.
All the predicates used within ViennaCL. Checks for expressions to be vectors, etc.
statement mat_mat_prod(NumericT alpha, viennacl::matrix_base< NumericT > const *A, bool A_trans, viennacl::matrix_base< NumericT > const *B, bool B_trans, NumericT beta, viennacl::matrix_base< NumericT > const *C)
statement matrix_diag_to_vector(viennacl::vector_base< NumericT > const *x, viennacl::matrix_base< NumericT > const *A, int id)
device_specific::statements_container swap(NumericT const *x, NumericT const *y)
scheduler::statement diagonal_assign_cpu(matrix_base< NumericT > const *x, implicit_vector_base< NumericT > const *y)
statement matrix_row(viennacl::vector_base< NumericT > const *x, viennacl::matrix_base< NumericT > const *A, unsigned int id)
statement matrix_column(viennacl::vector_base< NumericT > const *x, viennacl::matrix_base< NumericT > const *A, unsigned int id)
The main class for representing a statement such as x = inner_prod(y,z); at runtime.
Common base class for representing vectors where the entries are not all stored explicitly.
scheduler::statement assign_cpu(vector_base< NumericT > const *x, implicit_vector_base< NumericT > const *y)
device_specific::statements_container plane_rotation(vector_base< NumericT > const *x, vector_base< NumericT > const *y, NumericT const *a, NumericT const *b)
scheduler::statement reduction_inner_prod(ScalarT const *s, vector_base< NumericT > const *x, vector_base< NumericT > const *y, scheduler::operation_node_type ROP, bool use_sqrt, bool x_abs)
A tag class representing element-wise casting operations on vectors and matrices. ...