All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
forwards.h
Go to the documentation of this file.
#ifndef VIENNACL_SCHEDULER_STATEMENT_HPP
#define VIENNACL_SCHEDULER_STATEMENT_HPP
/* =========================================================================
Copyright (c) 2010-2016, Institute for Microelectronics,
Institute for Analysis and Scientific Computing,
TU Wien.
Portions of this software are copyright by UChicago Argonne, LLC.
-----------------
ViennaCL - The Vienna Computing Library
-----------------
Project Head: Karl Rupp rupp@iue.tuwien.ac.at
(A list of authors and contributors can be found in the manual)
License: MIT (X11), see file LICENSE in the base directory
============================================================================= */
#include "viennacl/meta/enable_if.hpp"
#include "viennacl/meta/predicate.hpp"
#include "viennacl/forwards.h"
#include <vector>
namespace viennacl
{
namespace scheduler
{
class statement_not_supported_exception : public std::exception
{
public:
statement_not_supported_exception() : message_() {}
statement_not_supported_exception(std::string message) : message_("ViennaCL: Internal error: The scheduler encountered a problem with the operation provided: " + message) {}
virtual const char* what() const throw() { return message_.c_str(); }
virtual ~statement_not_supported_exception() throw() {}
private:
std::string message_;
};
enum operation_node_type_family
{
OPERATION_INVALID_TYPE_FAMILY = 0,
// unary or binary expression
OPERATION_UNARY_TYPE_FAMILY,
OPERATION_BINARY_TYPE_FAMILY,
//reductions
OPERATION_VECTOR_REDUCTION_TYPE_FAMILY,
OPERATION_ROWS_REDUCTION_TYPE_FAMILY,
OPERATION_COLUMNS_REDUCTION_TYPE_FAMILY
};
enum operation_node_type
{
OPERATION_INVALID_TYPE = 0,
// unary operator
OPERATION_UNARY_MINUS_TYPE,
// unary expression
OPERATION_UNARY_CAST_CHAR_TYPE,
OPERATION_UNARY_CAST_UCHAR_TYPE,
OPERATION_UNARY_CAST_SHORT_TYPE,
OPERATION_UNARY_CAST_USHORT_TYPE,
OPERATION_UNARY_CAST_INT_TYPE,
OPERATION_UNARY_CAST_UINT_TYPE,
OPERATION_UNARY_CAST_LONG_TYPE,
OPERATION_UNARY_CAST_ULONG_TYPE,
OPERATION_UNARY_CAST_HALF_TYPE,
OPERATION_UNARY_CAST_FLOAT_TYPE,
OPERATION_UNARY_CAST_DOUBLE_TYPE,
OPERATION_UNARY_ABS_TYPE,
OPERATION_UNARY_ACOS_TYPE,
OPERATION_UNARY_ASIN_TYPE,
OPERATION_UNARY_ATAN_TYPE,
OPERATION_UNARY_CEIL_TYPE,
OPERATION_UNARY_COS_TYPE,
OPERATION_UNARY_COSH_TYPE,
OPERATION_UNARY_EXP_TYPE,
OPERATION_UNARY_FABS_TYPE,
OPERATION_UNARY_FLOOR_TYPE,
OPERATION_UNARY_LOG_TYPE,
OPERATION_UNARY_LOG10_TYPE,
OPERATION_UNARY_SIN_TYPE,
OPERATION_UNARY_SINH_TYPE,
OPERATION_UNARY_SQRT_TYPE,
OPERATION_UNARY_TAN_TYPE,
OPERATION_UNARY_TANH_TYPE,
OPERATION_UNARY_TRANS_TYPE,
OPERATION_UNARY_NORM_1_TYPE,
OPERATION_UNARY_NORM_2_TYPE,
OPERATION_UNARY_NORM_INF_TYPE,
OPERATION_UNARY_MAX_TYPE,
OPERATION_UNARY_MIN_TYPE,
// binary expression
OPERATION_BINARY_ACCESS_TYPE,
OPERATION_BINARY_ASSIGN_TYPE,
OPERATION_BINARY_INPLACE_ADD_TYPE,
OPERATION_BINARY_INPLACE_SUB_TYPE,
OPERATION_BINARY_ADD_TYPE,
OPERATION_BINARY_SUB_TYPE,
OPERATION_BINARY_MULT_TYPE, // scalar times vector/matrix
OPERATION_BINARY_DIV_TYPE, // vector/matrix divided by scalar
OPERATION_BINARY_ELEMENT_ARGFMAX_TYPE,
OPERATION_BINARY_ELEMENT_ARGFMIN_TYPE,
OPERATION_BINARY_ELEMENT_ARGMAX_TYPE,
OPERATION_BINARY_ELEMENT_ARGMIN_TYPE,
OPERATION_BINARY_ELEMENT_PROD_TYPE,
OPERATION_BINARY_ELEMENT_DIV_TYPE,
OPERATION_BINARY_ELEMENT_EQ_TYPE,
OPERATION_BINARY_ELEMENT_NEQ_TYPE,
OPERATION_BINARY_ELEMENT_GREATER_TYPE,
OPERATION_BINARY_ELEMENT_GEQ_TYPE,
OPERATION_BINARY_ELEMENT_LESS_TYPE,
OPERATION_BINARY_ELEMENT_LEQ_TYPE,
OPERATION_BINARY_ELEMENT_POW_TYPE,
OPERATION_BINARY_ELEMENT_FMAX_TYPE,
OPERATION_BINARY_ELEMENT_FMIN_TYPE,
OPERATION_BINARY_ELEMENT_MAX_TYPE,
OPERATION_BINARY_ELEMENT_MIN_TYPE,
OPERATION_BINARY_MATRIX_DIAG_TYPE,
OPERATION_BINARY_VECTOR_DIAG_TYPE,
OPERATION_BINARY_MATRIX_ROW_TYPE,
OPERATION_BINARY_MATRIX_COLUMN_TYPE,
OPERATION_BINARY_MAT_VEC_PROD_TYPE,
OPERATION_BINARY_MAT_MAT_PROD_TYPE,
OPERATION_BINARY_INNER_PROD_TYPE
};
namespace result_of
{
template<typename T>
struct op_type_info
{
typedef typename T::ERROR_UNKNOWN_OP_TYPE error_type;
};
// elementwise casts
template<> struct op_type_info<op_element_cast<char> > { enum { id = OPERATION_UNARY_CAST_CHAR_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_cast<unsigned char> > { enum { id = OPERATION_UNARY_CAST_UCHAR_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_cast<short> > { enum { id = OPERATION_UNARY_CAST_SHORT_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_cast<unsigned short> > { enum { id = OPERATION_UNARY_CAST_USHORT_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_cast<int> > { enum { id = OPERATION_UNARY_CAST_INT_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_cast<unsigned int> > { enum { id = OPERATION_UNARY_CAST_UINT_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_cast<long> > { enum { id = OPERATION_UNARY_CAST_LONG_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_cast<unsigned long> > { enum { id = OPERATION_UNARY_CAST_ULONG_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_cast<float> > { enum { id = OPERATION_UNARY_CAST_FLOAT_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_cast<double> > { enum { id = OPERATION_UNARY_CAST_DOUBLE_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
// elementwise functions
template<> struct op_type_info<op_element_unary<op_abs> > { enum { id = OPERATION_UNARY_ABS_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_acos> > { enum { id = OPERATION_UNARY_ACOS_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_asin> > { enum { id = OPERATION_UNARY_ASIN_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_atan> > { enum { id = OPERATION_UNARY_ATAN_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_ceil> > { enum { id = OPERATION_UNARY_CEIL_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_cos> > { enum { id = OPERATION_UNARY_COS_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_cosh> > { enum { id = OPERATION_UNARY_COSH_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_exp> > { enum { id = OPERATION_UNARY_EXP_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_fabs> > { enum { id = OPERATION_UNARY_FABS_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_floor> > { enum { id = OPERATION_UNARY_FLOOR_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_log> > { enum { id = OPERATION_UNARY_LOG_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_log10> > { enum { id = OPERATION_UNARY_LOG10_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_sin> > { enum { id = OPERATION_UNARY_SIN_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_sinh> > { enum { id = OPERATION_UNARY_SINH_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_sqrt> > { enum { id = OPERATION_UNARY_SQRT_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_tan> > { enum { id = OPERATION_UNARY_TAN_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_unary<op_tanh> > { enum { id = OPERATION_UNARY_TANH_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_binary<op_argmax> > { enum { id = OPERATION_BINARY_ELEMENT_ARGMAX_TYPE , family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_binary<op_argmin> > { enum { id = OPERATION_BINARY_ELEMENT_ARGMIN_TYPE , family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_binary<op_pow> > { enum { id = OPERATION_BINARY_ELEMENT_POW_TYPE , family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_binary<op_eq> > { enum { id = OPERATION_BINARY_ELEMENT_EQ_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_binary<op_neq> > { enum { id = OPERATION_BINARY_ELEMENT_NEQ_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_binary<op_greater> > { enum { id = OPERATION_BINARY_ELEMENT_GREATER_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_binary<op_less> > { enum { id = OPERATION_BINARY_ELEMENT_LESS_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_binary<op_geq> > { enum { id = OPERATION_BINARY_ELEMENT_GEQ_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_binary<op_leq> > { enum { id = OPERATION_BINARY_ELEMENT_LEQ_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_binary<op_fmax> > { enum { id = OPERATION_BINARY_ELEMENT_FMAX_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_binary<op_fmin> > { enum { id = OPERATION_BINARY_ELEMENT_FMIN_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
//structurewise function
template<> struct op_type_info<op_norm_1 > { enum { id = OPERATION_UNARY_NORM_1_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_norm_2 > { enum { id = OPERATION_UNARY_NORM_2_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_norm_inf > { enum { id = OPERATION_UNARY_NORM_INF_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_max > { enum { id = OPERATION_UNARY_MAX_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_min > { enum { id = OPERATION_UNARY_MIN_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_trans > { enum { id = OPERATION_UNARY_TRANS_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_row > { enum { id = OPERATION_BINARY_MATRIX_ROW_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_column > { enum { id = OPERATION_BINARY_MATRIX_COLUMN_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_matrix_diag> { enum { id = OPERATION_BINARY_MATRIX_DIAG_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_vector_diag> { enum { id = OPERATION_BINARY_VECTOR_DIAG_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_prod> { enum { id = OPERATION_BINARY_MAT_VEC_PROD_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_mat_mat_prod> { enum { id = OPERATION_BINARY_MAT_MAT_PROD_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_inner_prod> { enum { id = OPERATION_BINARY_INNER_PROD_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
//elementwise operator
template<> struct op_type_info<op_assign> { enum { id = OPERATION_BINARY_ASSIGN_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_inplace_add> { enum { id = OPERATION_BINARY_INPLACE_ADD_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_inplace_sub> { enum { id = OPERATION_BINARY_INPLACE_SUB_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_add> { enum { id = OPERATION_BINARY_ADD_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_sub> { enum { id = OPERATION_BINARY_SUB_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_binary<op_prod> > { enum { id = OPERATION_BINARY_ELEMENT_PROD_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_element_binary<op_div> > { enum { id = OPERATION_BINARY_ELEMENT_DIV_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_mult> { enum { id = OPERATION_BINARY_MULT_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_div> { enum { id = OPERATION_BINARY_DIV_TYPE, family = OPERATION_BINARY_TYPE_FAMILY}; };
template<> struct op_type_info<op_flip_sign> { enum { id = OPERATION_UNARY_MINUS_TYPE, family = OPERATION_UNARY_TYPE_FAMILY}; };
} // namespace result_of
enum statement_node_type_family
{
INVALID_TYPE_FAMILY = 0,
// LHS or RHS are again an expression:
COMPOSITE_OPERATION_FAMILY,
// device scalars:
SCALAR_TYPE_FAMILY,
// vector:
VECTOR_TYPE_FAMILY,
// matrices:
MATRIX_TYPE_FAMILY
};
enum statement_node_subtype
{
INVALID_SUBTYPE = 0, //when type is COMPOSITE_OPERATION_FAMILY
HOST_SCALAR_TYPE,
DEVICE_SCALAR_TYPE,
DENSE_VECTOR_TYPE,
IMPLICIT_VECTOR_TYPE,
DENSE_MATRIX_TYPE,
IMPLICIT_MATRIX_TYPE,
COMPRESSED_MATRIX_TYPE,
COORDINATE_MATRIX_TYPE,
ELL_MATRIX_TYPE,
HYB_MATRIX_TYPE
// other matrix types to be added here
};
enum statement_node_numeric_type
{
INVALID_NUMERIC_TYPE = 0, //when type is COMPOSITE_OPERATION_FAMILY
CHAR_TYPE,
UCHAR_TYPE,
SHORT_TYPE,
USHORT_TYPE,
INT_TYPE,
UINT_TYPE,
LONG_TYPE,
ULONG_TYPE,
HALF_TYPE,
FLOAT_TYPE,
DOUBLE_TYPE
};
namespace result_of
{
template<typename T>
struct numeric_type_id {};
template<> struct numeric_type_id<char> { enum { value = CHAR_TYPE }; };
template<> struct numeric_type_id<unsigned char> { enum { value = UCHAR_TYPE }; };
template<> struct numeric_type_id<short> { enum { value = SHORT_TYPE }; };
template<> struct numeric_type_id<unsigned short> { enum { value = USHORT_TYPE }; };
template<> struct numeric_type_id<int> { enum { value = INT_TYPE }; };
template<> struct numeric_type_id<unsigned int> { enum { value = UINT_TYPE }; };
template<> struct numeric_type_id<long> { enum { value = LONG_TYPE }; };
template<> struct numeric_type_id<unsigned long> { enum { value = ULONG_TYPE }; };
template<> struct numeric_type_id<float> { enum { value = FLOAT_TYPE }; };
template<> struct numeric_type_id<double> { enum { value = DOUBLE_TYPE }; };
}
struct lhs_rhs_element
{
statement_node_type_family type_family;
statement_node_subtype subtype;
statement_node_numeric_type numeric_type;
union
{
vcl_size_t node_index;
// host scalars:
char host_char;
unsigned char host_uchar;
short host_short;
unsigned short host_ushort;
int host_int;
unsigned int host_uint;
long host_long;
unsigned long host_ulong;
float host_float;
double host_double;
// Note: ViennaCL types have potentially expensive copy-CTORs, hence using pointers:
// scalars:
viennacl::scalar<char> *scalar_char;
viennacl::scalar<unsigned char> *scalar_uchar;
viennacl::scalar<short> *scalar_short;
viennacl::scalar<unsigned short> *scalar_ushort;
viennacl::scalar<int> *scalar_int;
viennacl::scalar<unsigned int> *scalar_uint;
viennacl::scalar<long> *scalar_long;
viennacl::scalar<unsigned long> *scalar_ulong;
viennacl::scalar<float> *scalar_float;
viennacl::scalar<double> *scalar_double;
// vectors:
viennacl::vector_base<char> *vector_char;
viennacl::vector_base<unsigned char> *vector_uchar;
viennacl::vector_base<short> *vector_short;
viennacl::vector_base<unsigned short> *vector_ushort;
viennacl::vector_base<int> *vector_int;
viennacl::vector_base<unsigned int> *vector_uint;
viennacl::vector_base<long> *vector_long;
viennacl::vector_base<unsigned long> *vector_ulong;
viennacl::vector_base<float> *vector_float;
viennacl::vector_base<double> *vector_double;
// implicit vectors:
viennacl::implicit_vector_base<char> *implicit_vector_char;
viennacl::implicit_vector_base<unsigned char> *implicit_vector_uchar;
viennacl::implicit_vector_base<short> *implicit_vector_short;
viennacl::implicit_vector_base<unsigned short> *implicit_vector_ushort;
viennacl::implicit_vector_base<int> *implicit_vector_int;
viennacl::implicit_vector_base<unsigned int> *implicit_vector_uint;
viennacl::implicit_vector_base<long> *implicit_vector_long;
viennacl::implicit_vector_base<unsigned long> *implicit_vector_ulong;
viennacl::implicit_vector_base<float> *implicit_vector_float;
viennacl::implicit_vector_base<double> *implicit_vector_double;
// dense matrices:
viennacl::matrix_base<char> *matrix_char;
viennacl::matrix_base<unsigned char> *matrix_uchar;
viennacl::matrix_base<short> *matrix_short;
viennacl::matrix_base<unsigned short> *matrix_ushort;
viennacl::matrix_base<int> *matrix_int;
viennacl::matrix_base<unsigned int> *matrix_uint;
viennacl::matrix_base<long> *matrix_long;
viennacl::matrix_base<unsigned long> *matrix_ulong;
viennacl::matrix_base<float> *matrix_float;
viennacl::matrix_base<double> *matrix_double;
viennacl::implicit_matrix_base<char> *implicit_matrix_char;
viennacl::implicit_matrix_base<unsigned char> *implicit_matrix_uchar;
viennacl::implicit_matrix_base<short> *implicit_matrix_short;
viennacl::implicit_matrix_base<unsigned short> *implicit_matrix_ushort;
viennacl::implicit_matrix_base<int> *implicit_matrix_int;
viennacl::implicit_matrix_base<unsigned int> *implicit_matrix_uint;
viennacl::implicit_matrix_base<long> *implicit_matrix_long;
viennacl::implicit_matrix_base<unsigned long> *implicit_matrix_ulong;
viennacl::implicit_matrix_base<float> *implicit_matrix_float;
viennacl::implicit_matrix_base<double> *implicit_matrix_double;
//viennacl::compressed_matrix<float> *compressed_matrix_char;
//viennacl::compressed_matrix<double> *compressed_matrix_uchar;
//viennacl::compressed_matrix<float> *compressed_matrix_short;
//viennacl::compressed_matrix<double> *compressed_matrix_ushort;
//viennacl::compressed_matrix<float> *compressed_matrix_int;
//viennacl::compressed_matrix<double> *compressed_matrix_uint;
//viennacl::compressed_matrix<float> *compressed_matrix_long;
//viennacl::compressed_matrix<double> *compressed_matrix_ulong;
viennacl::compressed_matrix<float> *compressed_matrix_float;
viennacl::compressed_matrix<double> *compressed_matrix_double;
//viennacl::coordinate_matrix<float> *coordinate_matrix_char;
//viennacl::coordinate_matrix<double> *coordinate_matrix_uchar;
//viennacl::coordinate_matrix<float> *coordinate_matrix_short;
//viennacl::coordinate_matrix<double> *coordinate_matrix_ushort;
//viennacl::coordinate_matrix<float> *coordinate_matrix_int;
//viennacl::coordinate_matrix<double> *coordinate_matrix_uint;
//viennacl::coordinate_matrix<float> *coordinate_matrix_long;
//viennacl::coordinate_matrix<double> *coordinate_matrix_ulong;
viennacl::coordinate_matrix<float> *coordinate_matrix_float;
viennacl::coordinate_matrix<double> *coordinate_matrix_double;
//viennacl::ell_matrix<float> *ell_matrix_char;
//viennacl::ell_matrix<double> *ell_matrix_uchar;
//viennacl::ell_matrix<float> *ell_matrix_short;
//viennacl::ell_matrix<double> *ell_matrix_ushort;
//viennacl::ell_matrix<float> *ell_matrix_int;
//viennacl::ell_matrix<double> *ell_matrix_uint;
//viennacl::ell_matrix<float> *ell_matrix_long;
//viennacl::ell_matrix<double> *ell_matrix_ulong;
viennacl::ell_matrix<float> *ell_matrix_float;
viennacl::ell_matrix<double> *ell_matrix_double;
//viennacl::hyb_matrix<float> *hyb_matrix_char;
//viennacl::hyb_matrix<double> *hyb_matrix_uchar;
//viennacl::hyb_matrix<float> *hyb_matrix_short;
//viennacl::hyb_matrix<double> *hyb_matrix_ushort;
//viennacl::hyb_matrix<float> *hyb_matrix_int;
//viennacl::hyb_matrix<double> *hyb_matrix_uint;
//viennacl::hyb_matrix<float> *hyb_matrix_long;
//viennacl::hyb_matrix<double> *hyb_matrix_ulong;
viennacl::hyb_matrix<float> *hyb_matrix_float;
viennacl::hyb_matrix<double> *hyb_matrix_double;
};
};
struct op_element
{
operation_node_type_family type_family;
operation_node_type type;
};
struct statement_node
{
lhs_rhs_element lhs;
op_element op;
lhs_rhs_element rhs;
};
namespace result_of
{
template<class T> struct num_nodes { enum { value = 0 }; };
template<class LHS, class OP, class RHS> struct num_nodes< vector_expression<LHS, RHS, OP> > { enum { value = 1 + num_nodes<LHS>::value + num_nodes<RHS>::value + num_nodes<OP>::value }; };
template<class LHS, class OP, class RHS> struct num_nodes< const vector_expression<LHS, RHS, OP> > { enum { value = 1 + num_nodes<LHS>::value + num_nodes<RHS>::value + num_nodes<OP>::value }; };
template<class LHS, class OP, class RHS> struct num_nodes< matrix_expression<LHS, RHS, OP> > { enum { value = 1 + num_nodes<LHS>::value + num_nodes<RHS>::value + num_nodes<OP>::value }; };
template<class LHS, class OP, class RHS> struct num_nodes< const matrix_expression<LHS, RHS, OP> > { enum { value = 1 + num_nodes<LHS>::value + num_nodes<RHS>::value + num_nodes<OP>::value }; };
template<class LHS, class OP, class RHS> struct num_nodes< scalar_expression<LHS, RHS, OP> > { enum { value = 1 + num_nodes<LHS>::value + num_nodes<RHS>::value + num_nodes<OP>::value }; };
template<class LHS, class OP, class RHS> struct num_nodes< const scalar_expression<LHS, RHS, OP> > { enum { value = 1 + num_nodes<LHS>::value + num_nodes<RHS>::value + num_nodes<OP>::value }; };
}
class statement
{
public:
typedef statement_node value_type;
typedef viennacl::vcl_size_t size_type;
typedef std::vector<value_type> container_type;
statement(container_type const & custom_array) : array_(custom_array) {}
template<typename LHS, typename OP, typename RHS>
statement(LHS & lhs, OP const &, RHS const & rhs) : array_(1 + result_of::num_nodes<RHS>::value)
{
// set OP:
array_[0].op.type_family = operation_node_type_family(result_of::op_type_info<OP>::family);
array_[0].op.type = operation_node_type(result_of::op_type_info<OP>::id);
// set LHS:
add_lhs(0, 1, lhs);
// set RHS:
add_rhs(0, 1, rhs);
}
container_type const & array() const { return array_; }
size_type root() const { return 0; }
static void assign_element(lhs_rhs_element & elem, char const & t) { elem.host_char = t; }
static void assign_element(lhs_rhs_element & elem, unsigned char const & t) { elem.host_uchar = t; }
static void assign_element(lhs_rhs_element & elem, short const & t) { elem.host_short = t; }
static void assign_element(lhs_rhs_element & elem, unsigned short const & t) { elem.host_ushort = t; }
static void assign_element(lhs_rhs_element & elem, int const & t) { elem.host_int = t; }
static void assign_element(lhs_rhs_element & elem, unsigned int const & t) { elem.host_uint = t; }
static void assign_element(lhs_rhs_element & elem, long const & t) { elem.host_long = t; }
static void assign_element(lhs_rhs_element & elem, unsigned long const & t) { elem.host_ulong = t; }
static void assign_element(lhs_rhs_element & elem, float const & t) { elem.host_float = t; }
static void assign_element(lhs_rhs_element & elem, double const & t) { elem.host_double = t; }
static void assign_element(lhs_rhs_element & elem, viennacl::scalar<char> const & t) { elem.scalar_char = const_cast<viennacl::scalar<char> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::scalar<unsigned char> const & t) { elem.scalar_uchar = const_cast<viennacl::scalar<unsigned char> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::scalar<short> const & t) { elem.scalar_short = const_cast<viennacl::scalar<short> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::scalar<unsigned short> const & t) { elem.scalar_ushort = const_cast<viennacl::scalar<unsigned short> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::scalar<int> const & t) { elem.scalar_int = const_cast<viennacl::scalar<int> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::scalar<unsigned int> const & t) { elem.scalar_uint = const_cast<viennacl::scalar<unsigned int> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::scalar<long> const & t) { elem.scalar_long = const_cast<viennacl::scalar<long> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::scalar<unsigned long> const & t) { elem.scalar_ulong = const_cast<viennacl::scalar<unsigned long> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::scalar<float> const & t) { elem.scalar_float = const_cast<viennacl::scalar<float> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::scalar<double> const & t) { elem.scalar_double = const_cast<viennacl::scalar<double> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::vector_base<char> const & t) { elem.vector_char = const_cast<viennacl::vector_base<char> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::vector_base<unsigned char> const & t) { elem.vector_uchar = const_cast<viennacl::vector_base<unsigned char> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::vector_base<short> const & t) { elem.vector_short = const_cast<viennacl::vector_base<short> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::vector_base<unsigned short> const & t) { elem.vector_ushort = const_cast<viennacl::vector_base<unsigned short> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::vector_base<int> const & t) { elem.vector_int = const_cast<viennacl::vector_base<int> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::vector_base<unsigned int> const & t) { elem.vector_uint = const_cast<viennacl::vector_base<unsigned int> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::vector_base<long> const & t) { elem.vector_long = const_cast<viennacl::vector_base<long> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::vector_base<unsigned long> const & t) { elem.vector_ulong = const_cast<viennacl::vector_base<unsigned long> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::vector_base<float> const & t) { elem.vector_float = const_cast<viennacl::vector_base<float> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::vector_base<double> const & t) { elem.vector_double = const_cast<viennacl::vector_base<double> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_vector_base<char> const & t) { elem.implicit_vector_char = const_cast<viennacl::implicit_vector_base<char> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_vector_base<unsigned char> const & t) { elem.implicit_vector_uchar = const_cast<viennacl::implicit_vector_base<unsigned char> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_vector_base<short> const & t) { elem.implicit_vector_short = const_cast<viennacl::implicit_vector_base<short> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_vector_base<unsigned short> const & t) { elem.implicit_vector_ushort = const_cast<viennacl::implicit_vector_base<unsigned short> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_vector_base<int> const & t) { elem.implicit_vector_int = const_cast<viennacl::implicit_vector_base<int> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_vector_base<unsigned int> const & t) { elem.implicit_vector_uint = const_cast<viennacl::implicit_vector_base<unsigned int> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_vector_base<long> const & t) { elem.implicit_vector_long = const_cast<viennacl::implicit_vector_base<long> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_vector_base<unsigned long> const & t) { elem.implicit_vector_ulong = const_cast<viennacl::implicit_vector_base<unsigned long> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_vector_base<float> const & t) { elem.implicit_vector_float = const_cast<viennacl::implicit_vector_base<float> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_vector_base<double> const & t) { elem.implicit_vector_double = const_cast<viennacl::implicit_vector_base<double> *>(&t); }
// TODO: add integer matrix overloads here
static void assign_element(lhs_rhs_element & elem, viennacl::matrix_base<char> const & t) { elem.matrix_char = const_cast<viennacl::matrix_base<char> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::matrix_base<unsigned char> const & t) { elem.matrix_uchar = const_cast<viennacl::matrix_base<unsigned char> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::matrix_base<short> const & t) { elem.matrix_short = const_cast<viennacl::matrix_base<short> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::matrix_base<unsigned short> const & t) { elem.matrix_ushort = const_cast<viennacl::matrix_base<unsigned short> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::matrix_base<int> const & t) { elem.matrix_int = const_cast<viennacl::matrix_base<int> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::matrix_base<unsigned int> const & t) { elem.matrix_uint = const_cast<viennacl::matrix_base<unsigned int> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::matrix_base<long> const & t) { elem.matrix_long = const_cast<viennacl::matrix_base<long> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::matrix_base<unsigned long> const & t) { elem.matrix_ulong = const_cast<viennacl::matrix_base<unsigned long> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::matrix_base<float> const & t) { elem.matrix_float = const_cast<viennacl::matrix_base<float> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::matrix_base<double> const & t) { elem.matrix_double = const_cast<viennacl::matrix_base<double> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_matrix_base<char> const & t) { elem.implicit_matrix_char = const_cast<viennacl::implicit_matrix_base<char> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_matrix_base<unsigned char> const & t) { elem.implicit_matrix_uchar = const_cast<viennacl::implicit_matrix_base<unsigned char> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_matrix_base<short> const & t) { elem.implicit_matrix_short = const_cast<viennacl::implicit_matrix_base<short> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_matrix_base<unsigned short> const & t) { elem.implicit_matrix_ushort = const_cast<viennacl::implicit_matrix_base<unsigned short> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_matrix_base<int> const & t) { elem.implicit_matrix_int = const_cast<viennacl::implicit_matrix_base<int> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_matrix_base<unsigned int> const & t) { elem.implicit_matrix_uint = const_cast<viennacl::implicit_matrix_base<unsigned int> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_matrix_base<long> const & t) { elem.implicit_matrix_long = const_cast<viennacl::implicit_matrix_base<long> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_matrix_base<unsigned long> const & t) { elem.implicit_matrix_ulong = const_cast<viennacl::implicit_matrix_base<unsigned long> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_matrix_base<float> const & t) { elem.implicit_matrix_float = const_cast<viennacl::implicit_matrix_base<float> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::implicit_matrix_base<double> const & t) { elem.implicit_matrix_double = const_cast<viennacl::implicit_matrix_base<double> *>(&t); }
static void assign_element(lhs_rhs_element & elem, viennacl::compressed_matrix<float> const & m) { elem.compressed_matrix_float = const_cast<viennacl::compressed_matrix<float> *>(&m); }
static void assign_element(lhs_rhs_element & elem, viennacl::compressed_matrix<double> const & m) { elem.compressed_matrix_double = const_cast<viennacl::compressed_matrix<double> *>(&m); }
static void assign_element(lhs_rhs_element & elem, viennacl::coordinate_matrix<float> const & m) { elem.coordinate_matrix_float = const_cast<viennacl::coordinate_matrix<float> *>(&m); }
static void assign_element(lhs_rhs_element & elem, viennacl::coordinate_matrix<double> const & m) { elem.coordinate_matrix_double = const_cast<viennacl::coordinate_matrix<double> *>(&m); }
static void assign_element(lhs_rhs_element & elem, viennacl::ell_matrix<float> const & m) { elem.ell_matrix_float = const_cast<viennacl::ell_matrix<float> *>(&m); }
static void assign_element(lhs_rhs_element & elem, viennacl::ell_matrix<double> const & m) { elem.ell_matrix_double = const_cast<viennacl::ell_matrix<double> *>(&m); }
static void assign_element(lhs_rhs_element & elem, viennacl::hyb_matrix<float> const & m) { elem.hyb_matrix_float = const_cast<viennacl::hyb_matrix<float> *>(&m); }
static void assign_element(lhs_rhs_element & elem, viennacl::hyb_matrix<double> const & m) { elem.hyb_matrix_double = const_cast<viennacl::hyb_matrix<double> *>(&m); }
template<class T>
static typename 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)
{
elem.type_family = SCALAR_TYPE_FAMILY;
elem.subtype = HOST_SCALAR_TYPE;
elem.numeric_type = statement_node_numeric_type(result_of::numeric_type_id<T>::value);
assign_element(elem, t);
return next_free;
}
template<typename T>
static vcl_size_t add_element(vcl_size_t next_free,
lhs_rhs_element & elem,
viennacl::scalar<T> const & t)
{
elem.type_family = SCALAR_TYPE_FAMILY;
elem.subtype = DEVICE_SCALAR_TYPE;
elem.numeric_type = statement_node_numeric_type(result_of::numeric_type_id<T>::value);
assign_element(elem, t);
return next_free;
}
template<typename T>
static vcl_size_t add_element(vcl_size_t next_free,
lhs_rhs_element & elem,
viennacl::vector_base<T> const & t)
{
elem.type_family = VECTOR_TYPE_FAMILY;
elem.subtype = DENSE_VECTOR_TYPE;
elem.numeric_type = statement_node_numeric_type(result_of::numeric_type_id<T>::value);
assign_element(elem, t);
return next_free;
}
template<typename T>
static vcl_size_t add_element(vcl_size_t next_free,
lhs_rhs_element & elem,
viennacl::implicit_vector_base<T> const & t)
{
elem.type_family = VECTOR_TYPE_FAMILY;
elem.subtype = IMPLICIT_VECTOR_TYPE;
elem.numeric_type = statement_node_numeric_type(result_of::numeric_type_id<T>::value);
assign_element(elem, t);
return next_free;
}
template<typename T>
static vcl_size_t add_element(vcl_size_t next_free,
lhs_rhs_element & elem,
viennacl::matrix_base<T> const & t)
{
elem.type_family = MATRIX_TYPE_FAMILY;
elem.subtype = DENSE_MATRIX_TYPE;
elem.numeric_type = statement_node_numeric_type(result_of::numeric_type_id<T>::value);
assign_element(elem, t);
return next_free;
}
template<typename T>
static vcl_size_t add_element(vcl_size_t next_free,
lhs_rhs_element & elem,
viennacl::implicit_matrix_base<T> const & t)
{
elem.type_family = MATRIX_TYPE_FAMILY;
elem.subtype = IMPLICIT_MATRIX_TYPE;
elem.numeric_type = statement_node_numeric_type(result_of::numeric_type_id<T>::value);
assign_element(elem, t);
return next_free;
}
template<typename T>
static vcl_size_t add_element(vcl_size_t next_free,
lhs_rhs_element & elem,
viennacl::compressed_matrix<T> const & t)
{
elem.type_family = MATRIX_TYPE_FAMILY;
elem.subtype = COMPRESSED_MATRIX_TYPE;
elem.numeric_type = statement_node_numeric_type(result_of::numeric_type_id<T>::value);
assign_element(elem, t);
return next_free;
}
template<typename T>
static vcl_size_t add_element(vcl_size_t next_free,
lhs_rhs_element & elem,
viennacl::coordinate_matrix<T> const & t)
{
elem.type_family = MATRIX_TYPE_FAMILY;
elem.subtype = COORDINATE_MATRIX_TYPE;
elem.numeric_type = statement_node_numeric_type(result_of::numeric_type_id<T>::value);
assign_element(elem, t);
return next_free;
}
template<typename T>
static vcl_size_t add_element(vcl_size_t next_free,
lhs_rhs_element & elem,
viennacl::ell_matrix<T> const & t)
{
elem.type_family = MATRIX_TYPE_FAMILY;
elem.subtype = ELL_MATRIX_TYPE;
elem.numeric_type = statement_node_numeric_type(result_of::numeric_type_id<T>::value);
assign_element(elem, t);
return next_free;
}
template<typename T>
static vcl_size_t add_element(vcl_size_t next_free,
lhs_rhs_element & elem,
viennacl::hyb_matrix<T> const & t)
{
elem.type_family = MATRIX_TYPE_FAMILY;
elem.subtype = HYB_MATRIX_TYPE;
elem.numeric_type = statement_node_numeric_type(result_of::numeric_type_id<T>::value);
assign_element(elem, t);
return next_free;
}
private:
template<typename LHS, typename RHS, typename OP>
vcl_size_t add_element(vcl_size_t next_free,
lhs_rhs_element & elem,
viennacl::scalar_expression<LHS, RHS, OP> const & t)
{
elem.type_family = COMPOSITE_OPERATION_FAMILY;
elem.subtype = INVALID_SUBTYPE;
elem.numeric_type = INVALID_NUMERIC_TYPE;
elem.node_index = next_free;
return add_node(next_free, next_free + 1, t);
}
template<typename LHS, typename RHS, typename OP>
vcl_size_t add_element(vcl_size_t next_free,
lhs_rhs_element & elem,
viennacl::vector_expression<LHS, RHS, OP> const & t)
{
elem.type_family = COMPOSITE_OPERATION_FAMILY;
elem.subtype = INVALID_SUBTYPE;
elem.numeric_type = INVALID_NUMERIC_TYPE;
elem.node_index = next_free;
return add_node(next_free, next_free + 1, t);
}
template<typename LHS, typename RHS, typename OP>
vcl_size_t add_element(vcl_size_t next_free,
lhs_rhs_element & elem,
viennacl::matrix_expression<LHS, RHS, OP> const & t)
{
elem.type_family = COMPOSITE_OPERATION_FAMILY;
elem.subtype = INVALID_SUBTYPE;
elem.numeric_type = INVALID_NUMERIC_TYPE;
elem.node_index = next_free;
return add_node(next_free, next_free + 1, t);
}
template<typename T>
vcl_size_t add_lhs(vcl_size_t current_index, vcl_size_t next_free, T const & t)
{
return add_element(next_free, array_[current_index].lhs, t);
}
template<typename T>
vcl_size_t add_rhs(vcl_size_t current_index, vcl_size_t next_free, T const & t)
{
return add_element(next_free, array_[current_index].rhs, t);
}
template<template<typename, typename, typename> class ExpressionT, typename LHS, typename RHS, typename OP>
vcl_size_t add_node(vcl_size_t current_index, vcl_size_t next_free, ExpressionT<LHS, RHS, OP> const & proxy)
{
// set OP:
array_[current_index].op.type_family = operation_node_type_family(result_of::op_type_info<OP>::family);
array_[current_index].op.type = operation_node_type(result_of::op_type_info<OP>::id);
// set LHS and RHS:
if (array_[current_index].op.type_family == OPERATION_UNARY_TYPE_FAMILY)
{
// unary expression: set rhs to invalid:
array_[current_index].rhs.type_family = INVALID_TYPE_FAMILY;
array_[current_index].rhs.subtype = INVALID_SUBTYPE;
array_[current_index].rhs.numeric_type = INVALID_NUMERIC_TYPE;
return add_lhs(current_index, next_free, proxy.lhs());
}
return add_rhs(current_index, add_lhs(current_index, next_free, proxy.lhs()), proxy.rhs());
}
container_type array_;
};
namespace detail
{
inline void execute_composite(statement const & /* s */, statement_node const & /* root_node */);
}
} // namespace scheduler
} // namespace viennacl
#endif
viennacl::scheduler::OPERATION_UNARY_NORM_INF_TYPE
Definition: forwards.h:109
viennacl::hyb_matrix< float >
viennacl::enable_if
Simple enable-if variant that uses the SFINAE pattern.
Definition: enable_if.hpp:30
viennacl::scheduler::OPERATION_UNARY_ATAN_TYPE
Definition: forwards.h:91
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, unsigned short const &t)
Definition: forwards.h:538
viennacl::scheduler::HYB_MATRIX_TYPE
Definition: forwards.h:280
viennacl::scheduler::lhs_rhs_element::implicit_vector_float
viennacl::implicit_vector_base< float > * implicit_vector_float
Definition: forwards.h:397
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::scheduler::lhs_rhs_element::host_ulong
unsigned long host_ulong
Definition: forwards.h:358
viennacl::scheduler::OPERATION_BINARY_MAT_VEC_PROD_TYPE
Definition: forwards.h:144
viennacl::scalar< char >
viennacl::scheduler::lhs_rhs_element::scalar_float
viennacl::scalar< float > * scalar_float
Definition: forwards.h:373
viennacl::scheduler::OPERATION_BINARY_ELEMENT_POW_TYPE
Definition: forwards.h:134
viennacl::scheduler::lhs_rhs_element::vector_ushort
viennacl::vector_base< unsigned short > * vector_ushort
Definition: forwards.h:380
viennacl::scheduler::lhs_rhs_element::implicit_vector_int
viennacl::implicit_vector_base< int > * implicit_vector_int
Definition: forwards.h:393
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_vector_base< char > const &t)
Definition: forwards.h:569
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::scalar< float > const &t)
Definition: forwards.h:554
viennacl::scheduler::OPERATION_VECTOR_REDUCTION_TYPE_FAMILY
Definition: forwards.h:62
viennacl::scheduler::lhs_rhs_element::vector_uint
viennacl::vector_base< unsigned int > * vector_uint
Definition: forwards.h:382
viennacl::scheduler::lhs_rhs_element::implicit_vector_uchar
viennacl::implicit_vector_base< unsigned char > * implicit_vector_uchar
Definition: forwards.h:390
viennacl::scheduler::OPERATION_BINARY_ELEMENT_MAX_TYPE
Definition: forwards.h:137
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_vector_base< unsigned char > const &t)
Definition: forwards.h:570
viennacl::scheduler::lhs_rhs_element::matrix_short
viennacl::matrix_base< short > * matrix_short
Definition: forwards.h:403
viennacl::scheduler::OPERATION_UNARY_TRANS_TYPE
Definition: forwards.h:106
viennacl::scheduler::UCHAR_TYPE
Definition: forwards.h:291
viennacl::scheduler::lhs_rhs_element::vector_short
viennacl::vector_base< short > * vector_short
Definition: forwards.h:379
viennacl::scheduler::OPERATION_UNARY_COS_TYPE
Definition: forwards.h:93
viennacl::scheduler::OPERATION_UNARY_FABS_TYPE
Definition: forwards.h:96
viennacl::scheduler::lhs_rhs_element::scalar_short
viennacl::scalar< short > * scalar_short
Definition: forwards.h:367
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::matrix_base< short > const &t)
Definition: forwards.h:584
viennacl::scheduler::OPERATION_BINARY_ELEMENT_GEQ_TYPE
Definition: forwards.h:131
viennacl::scheduler::statement::value_type
statement_node value_type
Definition: forwards.h:505
viennacl::scheduler::statement::statement
statement(LHS &lhs, OP const &, RHS const &rhs)
Generate the runtime statement from an expression template.
Definition: forwards.h:515
viennacl::scheduler::lhs_rhs_element::matrix_char
viennacl::matrix_base< char > * matrix_char
Definition: forwards.h:401
viennacl::scheduler::DEVICE_SCALAR_TYPE
Definition: forwards.h:269
viennacl::scheduler::DENSE_VECTOR_TYPE
Definition: forwards.h:271
viennacl::scheduler::INVALID_TYPE_FAMILY
Definition: forwards.h:248
viennacl::scheduler::lhs_rhs_element::implicit_matrix_ulong
viennacl::implicit_matrix_base< unsigned long > * implicit_matrix_ulong
Definition: forwards.h:419
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, char const &t)
Definition: forwards.h:535
viennacl::scheduler::OPERATION_BINARY_ELEMENT_DIV_TYPE
Definition: forwards.h:127
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, double const &t)
Definition: forwards.h:544
viennacl::scheduler::DOUBLE_TYPE
Definition: forwards.h:300
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::hyb_matrix< float > const &m)
Definition: forwards.h:613
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::matrix_base< unsigned char > const &t)
Definition: forwards.h:583
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_matrix_base< unsigned long > const &t)
Definition: forwards.h:600
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_matrix_base< short > const &t)
Definition: forwards.h:595
viennacl::scheduler::COORDINATE_MATRIX_TYPE
Definition: forwards.h:278
viennacl::scheduler::INVALID_SUBTYPE
Definition: forwards.h:266
viennacl::scheduler::OPERATION_UNARY_ACOS_TYPE
Definition: forwards.h:89
viennacl::scheduler::OPERATION_INVALID_TYPE
Definition: forwards.h:70
viennacl::scheduler::OPERATION_UNARY_EXP_TYPE
Definition: forwards.h:95
viennacl::matrix_base< char >
viennacl::scheduler::lhs_rhs_element::vector_int
viennacl::vector_base< int > * vector_int
Definition: forwards.h:381
viennacl::scheduler::lhs_rhs_element::subtype
statement_node_subtype subtype
Definition: forwards.h:340
viennacl::matrix_expression
Expression template class for representing a tree of expressions which ultimately result in a matrix...
Definition: forwards.h:341
viennacl::scheduler::OPERATION_UNARY_CAST_FLOAT_TYPE
Definition: forwards.h:85
viennacl::scheduler::MATRIX_TYPE_FAMILY
Definition: forwards.h:260
viennacl::scheduler::OPERATION_UNARY_ASIN_TYPE
Definition: forwards.h:90
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, unsigned char const &t)
Definition: forwards.h:536
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::vector_base< short > const &t)
Definition: forwards.h:560
viennacl::scheduler::statement::size_type
viennacl::vcl_size_t size_type
Definition: forwards.h:506
viennacl::scheduler::result_of::op_type_info::error_type
T::ERROR_UNKNOWN_OP_TYPE error_type
Definition: forwards.h:158
viennacl::scheduler::lhs_rhs_element::coordinate_matrix_double
viennacl::coordinate_matrix< double > * coordinate_matrix_double
Definition: forwards.h:443
viennacl::scheduler::statement_node::op
op_element op
Definition: forwards.h:481
viennacl::scheduler::SCALAR_TYPE_FAMILY
Definition: forwards.h:254
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::matrix_base< long > const &t)
Definition: forwards.h:588
forwards.h
This file provides the forward declarations for the main types used within ViennaCL.
viennacl::scheduler::lhs_rhs_element::implicit_vector_long
viennacl::implicit_vector_base< long > * implicit_vector_long
Definition: forwards.h:395
viennacl::scheduler::lhs_rhs_element::type_family
statement_node_type_family type_family
Definition: forwards.h:339
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::scalar< unsigned int > const &t)
Definition: forwards.h:551
viennacl::scheduler::lhs_rhs_element::implicit_matrix_double
viennacl::implicit_matrix_base< double > * implicit_matrix_double
Definition: forwards.h:421
viennacl::scheduler::OPERATION_BINARY_MATRIX_ROW_TYPE
Definition: forwards.h:142
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::matrix_base< unsigned short > const &t)
Definition: forwards.h:585
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::vector_base< unsigned short > const &t)
Definition: forwards.h:561
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::vector_base< double > const &t)
Definition: forwards.h:567
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_matrix_base< long > const &t)
Definition: forwards.h:599
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::lhs_rhs_element::matrix_uchar
viennacl::matrix_base< unsigned char > * matrix_uchar
Definition: forwards.h:402
viennacl::scheduler::statement::array
container_type const & array() const
Definition: forwards.h:528
viennacl::scheduler::lhs_rhs_element::scalar_uint
viennacl::scalar< unsigned int > * scalar_uint
Definition: forwards.h:370
viennacl::scheduler::result_of::num_nodes
Definition: forwards.h:488
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_matrix_base< char > const &t)
Definition: forwards.h:593
viennacl::scheduler::lhs_rhs_element::scalar_long
viennacl::scalar< long > * scalar_long
Definition: forwards.h:371
viennacl::scheduler::OPERATION_INVALID_TYPE_FAMILY
Definition: forwards.h:55
viennacl::scheduler::lhs_rhs_element::host_long
long host_long
Definition: forwards.h:357
viennacl::scheduler::HOST_SCALAR_TYPE
Definition: forwards.h:268
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::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, float const &t)
Definition: forwards.h:543
viennacl::scalar_expression
A proxy for scalar expressions (e.g. from inner vector products)
Definition: forwards.h:230
viennacl::vector_expression
An expression template class that represents a binary operation that yields a vector.
Definition: forwards.h:239
viennacl::scheduler::statement::add_element
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)
Definition: forwards.h:620
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::ell_matrix< float > const &m)
Definition: forwards.h:610
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::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::vector_base< char > const &t)
Definition: forwards.h:558
viennacl::scheduler::OPERATION_UNARY_CAST_UCHAR_TYPE
Definition: forwards.h:77
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_vector_base< unsigned int > const &t)
Definition: forwards.h:574
viennacl::scheduler::OPERATION_COLUMNS_REDUCTION_TYPE_FAMILY
Definition: forwards.h:64
viennacl::scheduler::statement::add_element
static vcl_size_t add_element(vcl_size_t next_free, lhs_rhs_element &elem, viennacl::matrix_base< T > const &t)
Definition: forwards.h:669
viennacl::scheduler::OPERATION_BINARY_ELEMENT_PROD_TYPE
Definition: forwards.h:126
viennacl::scheduler::lhs_rhs_element::host_short
short host_short
Definition: forwards.h:353
viennacl::scheduler::lhs_rhs_element::matrix_double
viennacl::matrix_base< double > * matrix_double
Definition: forwards.h:410
viennacl::scheduler::lhs_rhs_element::hyb_matrix_double
viennacl::hyb_matrix< double > * hyb_matrix_double
Definition: forwards.h:465
viennacl::scheduler::lhs_rhs_element::implicit_matrix_uint
viennacl::implicit_matrix_base< unsigned int > * implicit_matrix_uint
Definition: forwards.h:417
viennacl::scheduler::COMPOSITE_OPERATION_FAMILY
Definition: forwards.h:251
viennacl::scheduler::lhs_rhs_element::scalar_ulong
viennacl::scalar< unsigned long > * scalar_ulong
Definition: forwards.h:372
viennacl::scheduler::OPERATION_UNARY_NORM_2_TYPE
Definition: forwards.h:108
viennacl::scheduler::lhs_rhs_element::implicit_vector_uint
viennacl::implicit_vector_base< unsigned int > * implicit_vector_uint
Definition: forwards.h:394
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_matrix_base< int > const &t)
Definition: forwards.h:597
viennacl::scheduler::SHORT_TYPE
Definition: forwards.h:292
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::compressed_matrix< float > const &m)
Definition: forwards.h:604
viennacl::scheduler::statement_node_subtype
statement_node_subtype
Encodes the type of a node in the statement tree.
Definition: forwards.h:264
viennacl::scheduler::statement::container_type
std::vector< value_type > container_type
Definition: forwards.h:507
viennacl::scheduler::lhs_rhs_element::matrix_long
viennacl::matrix_base< long > * matrix_long
Definition: forwards.h:407
viennacl::scheduler::LONG_TYPE
Definition: forwards.h:296
viennacl::scheduler::DENSE_MATRIX_TYPE
Definition: forwards.h:274
viennacl::scheduler::OPERATION_BINARY_ELEMENT_FMIN_TYPE
Definition: forwards.h:136
viennacl::scheduler::lhs_rhs_element::host_double
double host_double
Definition: forwards.h:360
viennacl::implicit_matrix_base< char >
viennacl::scheduler::lhs_rhs_element::matrix_ushort
viennacl::matrix_base< unsigned short > * matrix_ushort
Definition: forwards.h:404
viennacl::scheduler::lhs_rhs_element::host_char
char host_char
Definition: forwards.h:351
viennacl::scheduler::statement::add_element
static vcl_size_t add_element(vcl_size_t next_free, lhs_rhs_element &elem, viennacl::ell_matrix< T > const &t)
Definition: forwards.h:717
viennacl::scheduler::lhs_rhs_element::implicit_matrix_ushort
viennacl::implicit_matrix_base< unsigned short > * implicit_matrix_ushort
Definition: forwards.h:415
viennacl::scheduler::OPERATION_UNARY_LOG_TYPE
Definition: forwards.h:98
viennacl::scheduler::lhs_rhs_element::compressed_matrix_float
viennacl::compressed_matrix< float > * compressed_matrix_float
Definition: forwards.h:431
viennacl::scheduler::OPERATION_BINARY_ELEMENT_GREATER_TYPE
Definition: forwards.h:130
viennacl::scheduler::OPERATION_UNARY_CAST_LONG_TYPE
Definition: forwards.h:82
viennacl::scheduler::OPERATION_BINARY_INNER_PROD_TYPE
Definition: forwards.h:146
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::scalar< int > const &t)
Definition: forwards.h:550
viennacl::scheduler::OPERATION_UNARY_MAX_TYPE
Definition: forwards.h:110
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_matrix_base< float > const &t)
Definition: forwards.h:601
viennacl::ell_matrix< float >
viennacl::scheduler::OPERATION_UNARY_SQRT_TYPE
Definition: forwards.h:102
viennacl::scheduler::CHAR_TYPE
Definition: forwards.h:290
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::scalar< double > const &t)
Definition: forwards.h:555
viennacl::scheduler::statement_not_supported_exception::~statement_not_supported_exception
virtual ~statement_not_supported_exception()
Definition: forwards.h:46
viennacl::scheduler::INVALID_NUMERIC_TYPE
Definition: forwards.h:288
viennacl::scheduler::OPERATION_BINARY_INPLACE_ADD_TYPE
Definition: forwards.h:116
viennacl::scheduler::OPERATION_UNARY_SINH_TYPE
Definition: forwards.h:101
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_vector_base< unsigned long > const &t)
Definition: forwards.h:576
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_matrix_base< unsigned short > const &t)
Definition: forwards.h:596
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::coordinate_matrix< float > const &m)
Definition: forwards.h:607
viennacl::scheduler::lhs_rhs_element::implicit_matrix_uchar
viennacl::implicit_matrix_base< unsigned char > * implicit_matrix_uchar
Definition: forwards.h:413
viennacl::scheduler::statement::add_element
static vcl_size_t add_element(vcl_size_t next_free, lhs_rhs_element &elem, viennacl::implicit_vector_base< T > const &t)
Definition: forwards.h:657
viennacl::scheduler::lhs_rhs_element::numeric_type
statement_node_numeric_type numeric_type
Definition: forwards.h:341
viennacl::scheduler::OPERATION_BINARY_ELEMENT_NEQ_TYPE
Definition: forwards.h:129
viennacl::scheduler::lhs_rhs_element::vector_ulong
viennacl::vector_base< unsigned long > * vector_ulong
Definition: forwards.h:384
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::matrix_base< float > const &t)
Definition: forwards.h:590
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_vector_base< double > const &t)
Definition: forwards.h:578
viennacl::scheduler::result_of::num_nodes::value
Definition: forwards.h:488
viennacl::scheduler::lhs_rhs_element::vector_float
viennacl::vector_base< float > * vector_float
Definition: forwards.h:385
viennacl::scheduler::OPERATION_UNARY_SIN_TYPE
Definition: forwards.h:100
viennacl::scheduler::statement::add_element
static vcl_size_t add_element(vcl_size_t next_free, lhs_rhs_element &elem, viennacl::hyb_matrix< T > const &t)
Definition: forwards.h:729
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::vector_base< unsigned int > const &t)
Definition: forwards.h:563
viennacl::scheduler::result_of::op_type_info
Metafunction for querying type informations.
Definition: forwards.h:156
viennacl::scheduler::statement_node::rhs
lhs_rhs_element rhs
Definition: forwards.h:482
viennacl::scheduler::lhs_rhs_element::matrix_float
viennacl::matrix_base< float > * matrix_float
Definition: forwards.h:409
viennacl::scheduler::OPERATION_UNARY_CAST_USHORT_TYPE
Definition: forwards.h:79
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_vector_base< float > const &t)
Definition: forwards.h:577
viennacl::scheduler::lhs_rhs_element::implicit_vector_char
viennacl::implicit_vector_base< char > * implicit_vector_char
Definition: forwards.h:389
viennacl::vector_base< char >
viennacl::scheduler::OPERATION_UNARY_CAST_DOUBLE_TYPE
Definition: forwards.h:86
viennacl::scheduler::OPERATION_UNARY_ABS_TYPE
Definition: forwards.h:88
viennacl::scheduler::lhs_rhs_element::implicit_vector_ulong
viennacl::implicit_vector_base< unsigned long > * implicit_vector_ulong
Definition: forwards.h:396
viennacl::scheduler::statement_node::lhs
lhs_rhs_element lhs
Definition: forwards.h:480
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::ell_matrix< double > const &m)
Definition: forwards.h:611
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::scheduler::lhs_rhs_element::vector_double
viennacl::vector_base< double > * vector_double
Definition: forwards.h:386
viennacl::scheduler::OPERATION_BINARY_TYPE_FAMILY
Definition: forwards.h:59
viennacl::scheduler::lhs_rhs_element::compressed_matrix_double
viennacl::compressed_matrix< double > * compressed_matrix_double
Definition: forwards.h:432
viennacl::scheduler::lhs_rhs_element::ell_matrix_double
viennacl::ell_matrix< double > * ell_matrix_double
Definition: forwards.h:454
viennacl::scheduler::OPERATION_BINARY_MATRIX_DIAG_TYPE
Definition: forwards.h:140
viennacl::scheduler::lhs_rhs_element::matrix_ulong
viennacl::matrix_base< unsigned long > * matrix_ulong
Definition: forwards.h:408
viennacl::scheduler::lhs_rhs_element::hyb_matrix_float
viennacl::hyb_matrix< float > * hyb_matrix_float
Definition: forwards.h:464
viennacl::scheduler::lhs_rhs_element::scalar_double
viennacl::scalar< double > * scalar_double
Definition: forwards.h:374
viennacl::scheduler::OPERATION_UNARY_LOG10_TYPE
Definition: forwards.h:99
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_matrix_base< unsigned int > const &t)
Definition: forwards.h:598
viennacl::scheduler::lhs_rhs_element::scalar_ushort
viennacl::scalar< unsigned short > * scalar_ushort
Definition: forwards.h:368
viennacl::scheduler::detail::execute_composite
void execute_composite(statement const &s, statement_node const &root_node)
Deals with x = RHS where RHS is an expression and x is either a scalar, a vector, or a matrix...
Definition: execute.hpp:42
viennacl::scheduler::OPERATION_UNARY_FLOOR_TYPE
Definition: forwards.h:97
viennacl::scheduler::OPERATION_BINARY_SUB_TYPE
Definition: forwards.h:119
viennacl::scheduler::USHORT_TYPE
Definition: forwards.h:293
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::scalar< unsigned char > const &t)
Definition: forwards.h:547
viennacl::scheduler::operation_node_type
operation_node_type
Enumeration for identifying the possible operations.
Definition: forwards.h:68
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::matrix_base< double > const &t)
Definition: forwards.h:591
viennacl::scheduler::lhs_rhs_element::vector_char
viennacl::vector_base< char > * vector_char
Definition: forwards.h:377
viennacl::scheduler::IMPLICIT_VECTOR_TYPE
Definition: forwards.h:272
viennacl::scheduler::lhs_rhs_element::implicit_vector_short
viennacl::implicit_vector_base< short > * implicit_vector_short
Definition: forwards.h:391
viennacl::scheduler::statement::statement
statement(container_type const &custom_array)
Definition: forwards.h:509
predicate.hpp
All the predicates used within ViennaCL. Checks for expressions to be vectors, etc.
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::scalar< unsigned long > const &t)
Definition: forwards.h:553
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::scalar< long > const &t)
Definition: forwards.h:552
viennacl::scheduler::OPERATION_UNARY_CAST_INT_TYPE
Definition: forwards.h:80
viennacl::scheduler::result_of::numeric_type_id
Helper metafunction for obtaining the runtime type ID for a numerical type.
Definition: forwards.h:310
viennacl::scheduler::lhs_rhs_element::scalar_uchar
viennacl::scalar< unsigned char > * scalar_uchar
Definition: forwards.h:366
viennacl::scheduler::OPERATION_UNARY_MIN_TYPE
Definition: forwards.h:111
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_vector_base< short > const &t)
Definition: forwards.h:571
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, int const &t)
Definition: forwards.h:539
viennacl::scheduler::statement::add_element
static vcl_size_t add_element(vcl_size_t next_free, lhs_rhs_element &elem, viennacl::vector_base< T > const &t)
Definition: forwards.h:645
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::coordinate_matrix< double > const &m)
Definition: forwards.h:608
viennacl::scheduler::OPERATION_BINARY_INPLACE_SUB_TYPE
Definition: forwards.h:117
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, long const &t)
Definition: forwards.h:541
viennacl::scheduler::lhs_rhs_element::host_float
float host_float
Definition: forwards.h:359
viennacl::scheduler::OPERATION_BINARY_MATRIX_COLUMN_TYPE
Definition: forwards.h:143
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::vector_base< int > const &t)
Definition: forwards.h:562
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_vector_base< unsigned short > const &t)
Definition: forwards.h:572
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::scalar< unsigned short > const &t)
Definition: forwards.h:549
viennacl::scheduler::lhs_rhs_element::vector_uchar
viennacl::vector_base< unsigned char > * vector_uchar
Definition: forwards.h:378
viennacl::scheduler::OPERATION_BINARY_ACCESS_TYPE
Definition: forwards.h:114
viennacl::scheduler::OPERATION_BINARY_ELEMENT_ARGMAX_TYPE
Definition: forwards.h:124
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::scheduler::IMPLICIT_MATRIX_TYPE
Definition: forwards.h:275
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::matrix_base< unsigned long > const &t)
Definition: forwards.h:589
viennacl::scheduler::OPERATION_UNARY_TAN_TYPE
Definition: forwards.h:103
viennacl::scheduler::lhs_rhs_element::implicit_matrix_float
viennacl::implicit_matrix_base< float > * implicit_matrix_float
Definition: forwards.h:420
viennacl::scheduler::lhs_rhs_element::ell_matrix_float
viennacl::ell_matrix< float > * ell_matrix_float
Definition: forwards.h:453
viennacl::scheduler::statement::add_element
static vcl_size_t add_element(vcl_size_t next_free, lhs_rhs_element &elem, viennacl::compressed_matrix< T > const &t)
Definition: forwards.h:693
viennacl::scheduler::ELL_MATRIX_TYPE
Definition: forwards.h:279
viennacl::scheduler::OPERATION_UNARY_MINUS_TYPE
Definition: forwards.h:73
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, unsigned long const &t)
Definition: forwards.h:542
viennacl::scheduler::lhs_rhs_element::scalar_int
viennacl::scalar< int > * scalar_int
Definition: forwards.h:369
viennacl::scheduler::lhs_rhs_element::host_ushort
unsigned short host_ushort
Definition: forwards.h:354
viennacl::scheduler::lhs_rhs_element::implicit_vector_double
viennacl::implicit_vector_base< double > * implicit_vector_double
Definition: forwards.h:398
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::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::vector_base< unsigned long > const &t)
Definition: forwards.h:565
viennacl::scheduler::OPERATION_BINARY_ELEMENT_FMAX_TYPE
Definition: forwards.h:135
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::compressed_matrix< double > const &m)
Definition: forwards.h:605
viennacl::scheduler::statement_not_supported_exception::statement_not_supported_exception
statement_not_supported_exception(std::string message)
Definition: forwards.h:42
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, unsigned int const &t)
Definition: forwards.h:540
viennacl::scheduler::UINT_TYPE
Definition: forwards.h:295
viennacl::scheduler::OPERATION_BINARY_ELEMENT_ARGFMAX_TYPE
Definition: forwards.h:122
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_matrix_base< unsigned char > const &t)
Definition: forwards.h:594
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::scheduler::lhs_rhs_element::host_uint
unsigned int host_uint
Definition: forwards.h:356
viennacl::compressed_matrix< float >
viennacl::scheduler::lhs_rhs_element::implicit_vector_ushort
viennacl::implicit_vector_base< unsigned short > * implicit_vector_ushort
Definition: forwards.h:392
viennacl::scheduler::statement::root
size_type root() const
Definition: forwards.h:530
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::lhs_rhs_element::scalar_char
viennacl::scalar< char > * scalar_char
Definition: forwards.h:365
viennacl::scheduler::OPERATION_BINARY_ADD_TYPE
Definition: forwards.h:118
viennacl::scheduler::lhs_rhs_element::implicit_matrix_short
viennacl::implicit_matrix_base< short > * implicit_matrix_short
Definition: forwards.h:414
viennacl::scheduler::lhs_rhs_element::node_index
vcl_size_t node_index
Definition: forwards.h:346
viennacl::scheduler::statement::add_element
static vcl_size_t add_element(vcl_size_t next_free, lhs_rhs_element &elem, viennacl::implicit_matrix_base< T > const &t)
Definition: forwards.h:681
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::matrix_base< unsigned int > const &t)
Definition: forwards.h:587
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::matrix_base< int > const &t)
Definition: forwards.h:586
viennacl::scheduler::statement::add_element
static vcl_size_t add_element(vcl_size_t next_free, lhs_rhs_element &elem, viennacl::scalar< T > const &t)
Definition: forwards.h:632
viennacl::implicit_vector_base< char >
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_vector_base< long > const &t)
Definition: forwards.h:575
viennacl::scheduler::OPERATION_BINARY_ELEMENT_ARGMIN_TYPE
Definition: forwards.h:125
viennacl::scheduler::OPERATION_BINARY_ELEMENT_ARGFMIN_TYPE
Definition: forwards.h:123
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::vector_base< float > const &t)
Definition: forwards.h:566
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::matrix_base< char > const &t)
Definition: forwards.h:582
viennacl::scheduler::OPERATION_BINARY_ELEMENT_MIN_TYPE
Definition: forwards.h:138
viennacl::scheduler::ULONG_TYPE
Definition: forwards.h:297
viennacl::scheduler::OPERATION_ROWS_REDUCTION_TYPE_FAMILY
Definition: forwards.h:63
viennacl::scheduler::OPERATION_UNARY_CAST_ULONG_TYPE
Definition: forwards.h:83
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_matrix_base< double > const &t)
Definition: forwards.h:602
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::implicit_vector_base< int > const &t)
Definition: forwards.h:573
viennacl::scheduler::lhs_rhs_element::matrix_int
viennacl::matrix_base< int > * matrix_int
Definition: forwards.h:405
viennacl::scheduler::lhs_rhs_element::implicit_matrix_long
viennacl::implicit_matrix_base< long > * implicit_matrix_long
Definition: forwards.h:418
viennacl::scheduler::statement::add_element
static vcl_size_t add_element(vcl_size_t next_free, lhs_rhs_element &elem, viennacl::coordinate_matrix< T > const &t)
Definition: forwards.h:705
viennacl::scheduler::OPERATION_UNARY_COSH_TYPE
Definition: forwards.h:94
viennacl::scheduler::lhs_rhs_element::host_int
int host_int
Definition: forwards.h:355
viennacl::scheduler::lhs_rhs_element::vector_long
viennacl::vector_base< long > * vector_long
Definition: forwards.h:383
op_assign
Definition: self_assign.cpp:132
viennacl::scheduler::lhs_rhs_element::coordinate_matrix_float
viennacl::coordinate_matrix< float > * coordinate_matrix_float
Definition: forwards.h:442
viennacl::scheduler::VECTOR_TYPE_FAMILY
Definition: forwards.h:257
viennacl::scheduler::statement_not_supported_exception::what
virtual const char * what() const
Definition: forwards.h:44
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::hyb_matrix< double > const &m)
Definition: forwards.h:614
viennacl::scheduler::statement_not_supported_exception::statement_not_supported_exception
statement_not_supported_exception()
Definition: forwards.h:41
viennacl::scheduler::OPERATION_BINARY_ELEMENT_EQ_TYPE
Definition: forwards.h:128
viennacl::scheduler::lhs_rhs_element::implicit_matrix_char
viennacl::implicit_matrix_base< char > * implicit_matrix_char
Definition: forwards.h:412
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::scalar< char > const &t)
Definition: forwards.h:546
viennacl::scheduler::OPERATION_UNARY_CAST_CHAR_TYPE
Definition: forwards.h:76
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::scalar< short > const &t)
Definition: forwards.h:548
viennacl::scheduler::statement_node
Main datastructure for an node in the statement tree.
Definition: forwards.h:478
viennacl::scheduler::OPERATION_BINARY_MAT_MAT_PROD_TYPE
Definition: forwards.h:145
viennacl::scheduler::statement_not_supported_exception
Exception for the case the scheduler is unable to deal with the operation.
Definition: forwards.h:38
enable_if.hpp
Simple enable-if variant that uses the SFINAE pattern.
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, short const &t)
Definition: forwards.h:537
viennacl::scheduler::statement_node_type_family
statement_node_type_family
Groups the type of a node in the statement tree. Used for faster dispatching.
Definition: forwards.h:246
viennacl::scheduler::COMPRESSED_MATRIX_TYPE
Definition: forwards.h:277
viennacl::scheduler::lhs_rhs_element::matrix_uint
viennacl::matrix_base< unsigned int > * matrix_uint
Definition: forwards.h:406
viennacl::coordinate_matrix< float >
viennacl::scheduler::operation_node_type_family
operation_node_type_family
Optimization enum for grouping operations into unary or binary operations. Just for optimization of l...
Definition: forwards.h:53
viennacl::scheduler::lhs_rhs_element::host_uchar
unsigned char host_uchar
Definition: forwards.h:352
viennacl::scheduler::lhs_rhs_element::implicit_matrix_int
viennacl::implicit_matrix_base< int > * implicit_matrix_int
Definition: forwards.h:416
viennacl::scheduler::OPERATION_BINARY_ELEMENT_LEQ_TYPE
Definition: forwards.h:133
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::vector_base< long > const &t)
Definition: forwards.h:564
viennacl::scheduler::statement::assign_element
static void assign_element(lhs_rhs_element &elem, viennacl::vector_base< unsigned char > const &t)
Definition: forwards.h:559
viennacl::scheduler::OPERATION_UNARY_TYPE_FAMILY
Definition: forwards.h:58
viennacl::scheduler::OPERATION_UNARY_NORM_1_TYPE
Definition: forwards.h:107
viennacl::op_element_cast
A tag class representing element-wise casting operations on vectors and matrices. ...
Definition: forwards.h:126
viennacl::scheduler::OPERATION_BINARY_ELEMENT_LESS_TYPE
Definition: forwards.h:132
viennacl::scheduler::OPERATION_BINARY_MULT_TYPE
Definition: forwards.h:120