1 #ifndef VIENNACL_LINALG_REDUCE_HPP_
2 #define VIENNACL_LINALG_REDUCE_HPP_
41 template<
typename NumericT>
45 sum(viennacl::vector_base<NumericT>
const & x)
48 const viennacl::vector_base<NumericT>,
56 template<
typename LHS,
typename RHS,
typename OP>
60 sum(viennacl::vector_expression<const LHS, const RHS, OP>
const & x)
63 const viennacl::vector_expression<const LHS, const RHS, OP>,
73 template<
typename NumericT>
77 row_sum(viennacl::matrix_base<NumericT>
const & A)
80 const viennacl::matrix_base<NumericT>,
88 template<
typename LHS,
typename RHS,
typename OP>
92 row_sum(viennacl::matrix_expression<const LHS, const RHS, OP>
const & A)
95 const viennacl::matrix_expression<const LHS, const RHS, OP>,
105 template<
typename NumericT>
107 const viennacl::matrix_base<NumericT>,
112 const viennacl::matrix_base<NumericT>,
120 template<
typename LHS,
typename RHS,
typename OP>
122 const viennacl::matrix_expression<const LHS, const RHS, OP>,
124 column_sum(viennacl::matrix_expression<const LHS, const RHS, OP>
const & A)
127 const viennacl::matrix_expression<const LHS, const RHS, OP>,
A tag class representing the summation of all columns of a matrix.
Dispatch facility for distinguishing between ublas, STL and ViennaCL types.
viennacl::scalar_expression< const viennacl::vector_base< NumericT >, const viennacl::vector_base< NumericT >, viennacl::op_sum > sum(viennacl::vector_base< NumericT > const &x)
User interface function for computing the sum of all elements of a vector.
A tag class representing the summation of a vector.
A tag class representing the summation of all rows of a matrix.
viennacl::vector_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_row_sum > row_sum(viennacl::matrix_base< NumericT > const &A)
User interface function for computing the sum of all elements of each row of a matrix.
Expression template class for representing a tree of expressions which ultimately result in a matrix...
This file provides the forward declarations for the main types used within ViennaCL.
A proxy for scalar expressions (e.g. from inner vector products)
An expression template class that represents a binary operation that yields a vector.
Main namespace in ViennaCL. Holds all the basic types such as vector, matrix, etc. and defines operations upon them.
viennacl::vector_expression< const viennacl::matrix_base< NumericT >, const viennacl::matrix_base< NumericT >, viennacl::op_col_sum > column_sum(viennacl::matrix_base< NumericT > const &A)
User interface function for computing the sum of all elements of each column of a matrix...
A collection of compile time type deductions.
Simple enable-if variant that uses the SFINAE pattern.