typename viennacl::enable_if< viennacl::is_any_sparse_matrix<SparseMatrixType>::value,
                               viennacl::vector<SCALARTYPE> >::type
 operator-(viennacl::vector_base<SCALARTYPE> & result,
           const viennacl::vector_expression< const SparseMatrixType, const viennacl::vector_base<SCALARTYPE>, viennacl::op_prod> & proxy)
 {
   assert(proxy.lhs().size1() == result.size() && bool("Dimensions for addition of sparse matrix-vector product to vector don't match!"));
   vector<SCALARTYPE> temp(proxy.lhs().size1());
   viennacl::linalg::prod_impl(proxy.lhs(), proxy.rhs(), temp);
   result += temp;
   return result;
 }
Exemple #2
0
viennacl::memory_types active_handle_id(viennacl::vector_expression<LHS, const vector_base<NumericT>, op_prod> const & obj)
{
  return active_handle_id(obj.rhs());
}
Exemple #3
0
viennacl::memory_types active_handle_id(viennacl::vector_expression<LHS, RHS, OP> const & obj)
{
  return active_handle_id(obj.lhs());
}