All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
execute_matrix_prod.hpp
Go to the documentation of this file.
#ifndef VIENNACL_SCHEDULER_EXECUTE_MATRIX_PROD_HPP
#define VIENNACL_SCHEDULER_EXECUTE_MATRIX_PROD_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/forwards.h"
#include "viennacl/scheduler/forwards.h"
#include "viennacl/scheduler/execute_util.hpp"
#include "viennacl/scheduler/execute_generic_dispatcher.hpp"
#include "viennacl/linalg/vector_operations.hpp"
#include "viennacl/linalg/matrix_operations.hpp"
#include "viennacl/linalg/sparse_matrix_operations.hpp"
#include "viennacl/compressed_matrix.hpp"
#include "viennacl/coordinate_matrix.hpp"
#include "viennacl/ell_matrix.hpp"
#include "viennacl/hyb_matrix.hpp"
namespace viennacl
{
namespace scheduler
{
namespace detail
{
inline bool matrix_prod_temporary_required(statement const & s, lhs_rhs_element const & elem)
{
if (elem.type_family != COMPOSITE_OPERATION_FAMILY)
return false;
// check composite node for being a transposed matrix proxy:
statement_node const & leaf = s.array()[elem.node_index];
if ( leaf.op.type == OPERATION_UNARY_TRANS_TYPE && leaf.lhs.type_family == MATRIX_TYPE_FAMILY)
return false;
return true;
}
inline void matrix_matrix_prod(statement const & s,
lhs_rhs_element result,
lhs_rhs_element const & A,
lhs_rhs_element const & B,
double alpha,
double beta)
{
if (A.type_family == MATRIX_TYPE_FAMILY && B.type_family == MATRIX_TYPE_FAMILY) // C = A * B
{
assert( A.numeric_type == B.numeric_type && bool("Numeric type not the same!"));
assert( result.numeric_type == B.numeric_type && bool("Numeric type not the same!"));
if (A.subtype == DENSE_MATRIX_TYPE && B.subtype == DENSE_MATRIX_TYPE && result.subtype == DENSE_MATRIX_TYPE)
{
switch (result.numeric_type)
{
case FLOAT_TYPE:
viennacl::linalg::prod_impl(*A.matrix_float, *B.matrix_float, *result.matrix_float, static_cast<float>(alpha), static_cast<float>(beta)); break;
case DOUBLE_TYPE:
viennacl::linalg::prod_impl(*A.matrix_double, *B.matrix_double, *result.matrix_double, alpha, beta); break;
default:
throw statement_not_supported_exception("Invalid numeric type in matrix-matrix multiplication");
}
}
}
else if (A.type_family == MATRIX_TYPE_FAMILY && B.type_family == COMPOSITE_OPERATION_FAMILY) // C = A * B^T
{
statement_node const & leaf = s.array()[B.node_index];
assert(leaf.lhs.type_family == MATRIX_TYPE_FAMILY && leaf.op.type == OPERATION_UNARY_TRANS_TYPE && bool("Logic error: Argument not a matrix transpose!"));
assert(leaf.lhs.numeric_type == result.numeric_type && bool("Numeric type not the same!"));
assert(result.numeric_type == A.numeric_type && bool("Numeric type not the same!"));
if (A.subtype == DENSE_MATRIX_TYPE && leaf.lhs.subtype == DENSE_MATRIX_TYPE && result.subtype == DENSE_MATRIX_TYPE)
{
switch (result.numeric_type)
{
case FLOAT_TYPE:
viennacl::linalg::prod_impl(*A.matrix_float,
viennacl::matrix_expression< const matrix_base<float>,
const matrix_base<float>,
op_trans> (*(leaf.lhs.matrix_float), *(leaf.lhs.matrix_float)),
*result.matrix_float, static_cast<float>(alpha), static_cast<float>(beta)); break;
case DOUBLE_TYPE:
viennacl::linalg::prod_impl(*A.matrix_double,
viennacl::matrix_expression< const matrix_base<double>,
const matrix_base<double>,
op_trans>(*(leaf.lhs.matrix_double), *(leaf.lhs.matrix_double)),
*result.matrix_double, alpha, beta); break;
default:
throw statement_not_supported_exception("Invalid numeric type in matrix-matrix multiplication");
}
}
}
else if (A.type_family == COMPOSITE_OPERATION_FAMILY && B.type_family == MATRIX_TYPE_FAMILY) // C = A^T * B
{
statement_node const & leaf = s.array()[A.node_index];
assert(leaf.lhs.type_family == MATRIX_TYPE_FAMILY && leaf.op.type == OPERATION_UNARY_TRANS_TYPE && bool("Logic error: Argument not a matrix transpose!"));
assert(leaf.lhs.numeric_type == result.numeric_type && bool("Numeric type not the same!"));
assert(result.numeric_type == B.numeric_type && bool("Numeric type not the same!"));
if (leaf.lhs.subtype == DENSE_MATRIX_TYPE && B.subtype == DENSE_MATRIX_TYPE && result.subtype == DENSE_MATRIX_TYPE)
{
switch (result.numeric_type)
{
case FLOAT_TYPE:
viennacl::linalg::prod_impl(viennacl::matrix_expression< const matrix_base<float>,
const matrix_base<float>,
op_trans>(*leaf.lhs.matrix_float, *leaf.lhs.matrix_float),
*B.matrix_float,
*result.matrix_float, static_cast<float>(alpha), static_cast<float>(beta)); break;
case DOUBLE_TYPE:
viennacl::linalg::prod_impl(viennacl::matrix_expression< const matrix_base<double>,
const matrix_base<double>,
op_trans>(*leaf.lhs.matrix_double, *leaf.lhs.matrix_double),
*B.matrix_double,
*result.matrix_double, alpha, beta); break;
default:
throw statement_not_supported_exception("Invalid numeric type in matrix-matrix multiplication");
}
}
}
else if (A.type_family == COMPOSITE_OPERATION_FAMILY && B.type_family == COMPOSITE_OPERATION_FAMILY) // C = A^T * B^T
{
statement_node const & leafA = s.array()[A.node_index];
statement_node const & leafB = s.array()[B.node_index];
assert(leafA.lhs.type_family == MATRIX_TYPE_FAMILY && leafA.op.type == OPERATION_UNARY_TRANS_TYPE && bool("Logic error: Argument not a matrix transpose!"));
assert(leafB.lhs.type_family == MATRIX_TYPE_FAMILY && leafB.op.type == OPERATION_UNARY_TRANS_TYPE && bool("Logic error: Argument not a matrix transpose!"));
assert(leafA.lhs.numeric_type == result.numeric_type && bool("Numeric type not the same!"));
assert(leafB.lhs.numeric_type == result.numeric_type && bool("Numeric type not the same!"));
if (leafA.lhs.subtype == DENSE_MATRIX_TYPE && leafB.lhs.subtype == DENSE_MATRIX_TYPE && result.subtype == DENSE_MATRIX_TYPE)
{
switch (result.numeric_type)
{
case FLOAT_TYPE:
viennacl::linalg::prod_impl(viennacl::matrix_expression< const matrix_base<float>,
const matrix_base<float>,
op_trans>(*leafA.lhs.matrix_float, *leafA.lhs.matrix_float),
viennacl::matrix_expression< const matrix_base<float>,
const matrix_base<float>,
op_trans>(*leafB.lhs.matrix_float, *leafB.lhs.matrix_float),
*result.matrix_float, static_cast<float>(alpha), static_cast<float>(beta)); break;
case DOUBLE_TYPE:
viennacl::linalg::prod_impl(viennacl::matrix_expression< const matrix_base<double>,
const matrix_base<double>,
op_trans>(*leafA.lhs.matrix_double, *leafA.lhs.matrix_double),
viennacl::matrix_expression< const matrix_base<double>,
const matrix_base<double>,
op_trans>(*leafB.lhs.matrix_double, *leafB.lhs.matrix_double),
*result.matrix_double, alpha, beta); break;
default:
throw statement_not_supported_exception("Invalid numeric type in matrix-matrix multiplication");
}
}
}
else
throw statement_not_supported_exception("Matrix-matrix multiplication encountered operands being neither dense matrices nor transposed dense matrices");
}
inline void matrix_vector_prod(statement const & s,
lhs_rhs_element result,
lhs_rhs_element const & A,
lhs_rhs_element const & x)
{
assert( result.numeric_type == x.numeric_type && bool("Numeric type not the same!"));
assert( result.type_family == x.type_family && bool("Subtype not the same!"));
assert( result.subtype == DENSE_VECTOR_TYPE && bool("Result node for matrix-vector product not a vector type!"));
// deal with transposed product first:
// switch: trans for A
if (A.type_family == COMPOSITE_OPERATION_FAMILY) // prod(trans(A), x)
{
statement_node const & leaf = s.array()[A.node_index];
assert(leaf.lhs.type_family == MATRIX_TYPE_FAMILY && leaf.op.type == OPERATION_UNARY_TRANS_TYPE && bool("Logic error: Argument not a matrix transpose!"));
assert(leaf.lhs.numeric_type == x.numeric_type && bool("Numeric type not the same!"));
if (leaf.lhs.subtype == DENSE_MATRIX_TYPE)
{
switch (leaf.lhs.numeric_type)
{
case FLOAT_TYPE:
viennacl::linalg::prod_impl(viennacl::matrix_expression< const matrix_base<float>,
const matrix_base<float>,
op_trans>(*leaf.lhs.matrix_float, *leaf.lhs.matrix_float),
*x.vector_float,
*result.vector_float); break;
case DOUBLE_TYPE:
viennacl::linalg::prod_impl(viennacl::matrix_expression< const matrix_base<double>,
const matrix_base<double>,
op_trans>(*leaf.lhs.matrix_double, *leaf.lhs.matrix_double),
*x.vector_double,
*result.vector_double); break;
default:
throw statement_not_supported_exception("Invalid numeric type in matrix-{matrix,vector} multiplication");
}
}
else
throw statement_not_supported_exception("Invalid matrix type for transposed matrix-vector product");
}
else if (A.subtype == DENSE_MATRIX_TYPE)
{
switch (A.numeric_type)
{
case FLOAT_TYPE:
viennacl::linalg::prod_impl(*A.matrix_float, *x.vector_float, *result.vector_float);
break;
case DOUBLE_TYPE:
viennacl::linalg::prod_impl(*A.matrix_double, *x.vector_double, *result.vector_double);
break;
default:
throw statement_not_supported_exception("Invalid numeric type in matrix-{matrix,vector} multiplication");
}
}
else if (A.subtype == COMPRESSED_MATRIX_TYPE)
{
switch (A.numeric_type)
{
case FLOAT_TYPE:
viennacl::linalg::prod_impl(*A.compressed_matrix_float, *x.vector_float, float(1), *result.vector_float, float(0));
break;
case DOUBLE_TYPE:
viennacl::linalg::prod_impl(*A.compressed_matrix_double, *x.vector_double, double(1), *result.vector_double, double(0));
break;
default:
throw statement_not_supported_exception("Invalid numeric type in matrix-{matrix,vector} multiplication");
}
}
else if (A.subtype == COORDINATE_MATRIX_TYPE)
{
switch (A.numeric_type)
{
case FLOAT_TYPE:
viennacl::linalg::prod_impl(*A.coordinate_matrix_float, *x.vector_float, float(1), *result.vector_float, float(0));
break;
case DOUBLE_TYPE:
viennacl::linalg::prod_impl(*A.coordinate_matrix_double, *x.vector_double, double(1), *result.vector_double, double(0));
break;
default:
throw statement_not_supported_exception("Invalid numeric type in matrix-{matrix,vector} multiplication");
}
}
else if (A.subtype == ELL_MATRIX_TYPE)
{
switch (A.numeric_type)
{
case FLOAT_TYPE:
viennacl::linalg::prod_impl(*A.ell_matrix_float, *x.vector_float, float(1), *result.vector_float, float(0));
break;
case DOUBLE_TYPE:
viennacl::linalg::prod_impl(*A.ell_matrix_double, *x.vector_double, double(1), *result.vector_double, double(0));
break;
default:
throw statement_not_supported_exception("Invalid numeric type in matrix-{matrix,vector} multiplication");
}
}
else if (A.subtype == HYB_MATRIX_TYPE)
{
switch (A.numeric_type)
{
case FLOAT_TYPE:
viennacl::linalg::prod_impl(*A.hyb_matrix_float, *x.vector_float, float(1), *result.vector_float, float(0));
break;
case DOUBLE_TYPE:
viennacl::linalg::prod_impl(*A.hyb_matrix_double, *x.vector_double, double(1), *result.vector_double, double(0));
break;
default:
throw statement_not_supported_exception("Invalid numeric type in matrix-{matrix,vector} multiplication");
}
}
else
{
std::cout << "A.subtype: " << A.subtype << std::endl;
throw statement_not_supported_exception("Invalid matrix type for matrix-vector product");
}
}
} // namespace detail
inline void execute_matrix_prod(statement const & s, statement_node const & root_node)
{
statement_node const & leaf = s.array()[root_node.rhs.node_index];
viennacl::context ctx = detail::extract_context(root_node);
// Part 1: Check whether temporaries are required //
statement_node new_root_lhs;
statement_node new_root_rhs;
bool lhs_needs_temporary = detail::matrix_prod_temporary_required(s, leaf.lhs);
bool rhs_needs_temporary = detail::matrix_prod_temporary_required(s, leaf.rhs);
// check for temporary on lhs:
if (lhs_needs_temporary)
{
std::cout << "Temporary for LHS!" << std::endl;
detail::new_element(new_root_lhs.lhs, root_node.lhs, ctx);
new_root_lhs.op.type_family = OPERATION_BINARY_TYPE_FAMILY;
new_root_lhs.op.type = OPERATION_BINARY_ASSIGN_TYPE;
new_root_lhs.rhs.type_family = COMPOSITE_OPERATION_FAMILY;
new_root_lhs.rhs.subtype = INVALID_SUBTYPE;
new_root_lhs.rhs.numeric_type = INVALID_NUMERIC_TYPE;
new_root_lhs.rhs.node_index = leaf.lhs.node_index;
// work on subexpression:
// TODO: Catch exception, free temporary, then rethrow
detail::execute_composite(s, new_root_lhs);
}
// check for temporary on rhs:
if (rhs_needs_temporary)
{
detail::new_element(new_root_rhs.lhs, root_node.lhs, ctx);
new_root_rhs.op.type_family = OPERATION_BINARY_TYPE_FAMILY;
new_root_rhs.op.type = OPERATION_BINARY_ASSIGN_TYPE;
new_root_rhs.rhs.type_family = COMPOSITE_OPERATION_FAMILY;
new_root_rhs.rhs.subtype = INVALID_SUBTYPE;
new_root_rhs.rhs.numeric_type = INVALID_NUMERIC_TYPE;
new_root_rhs.rhs.node_index = leaf.rhs.node_index;
// work on subexpression:
// TODO: Catch exception, free temporary, then rethrow
detail::execute_composite(s, new_root_rhs);
}
// Part 2: Run the actual computations //
lhs_rhs_element x = lhs_needs_temporary ? new_root_lhs.lhs : leaf.lhs;
lhs_rhs_element y = rhs_needs_temporary ? new_root_rhs.lhs : leaf.rhs;
if (root_node.lhs.type_family == VECTOR_TYPE_FAMILY)
{
if (root_node.op.type != OPERATION_BINARY_ASSIGN_TYPE)
{
//split y += A*x
statement_node new_root_z;
detail::new_element(new_root_z.lhs, root_node.lhs, ctx);
// compute z = A * x
detail::matrix_vector_prod(s, new_root_z.lhs, x, y);
// assignment y = z
double alpha = 0;
if (root_node.op.type == OPERATION_BINARY_INPLACE_ADD_TYPE)
alpha = 1.0;
else if (root_node.op.type == OPERATION_BINARY_INPLACE_SUB_TYPE)
alpha = -1.0;
else
throw statement_not_supported_exception("Invalid assignment type for matrix-vector product");
lhs_rhs_element y2 = root_node.lhs;
detail::axbx(y2,
y2, 1.0, 1, false, false,
new_root_z.lhs, alpha, 1, false, false);
detail::delete_element(new_root_z.lhs);
}
else
detail::matrix_vector_prod(s, root_node.lhs, x, y);
}
else
{
double alpha = (root_node.op.type == OPERATION_BINARY_INPLACE_SUB_TYPE) ? -1.0 : 1.0;
double beta = (root_node.op.type != OPERATION_BINARY_ASSIGN_TYPE) ? 1.0 : 0.0;
detail::matrix_matrix_prod(s, root_node.lhs, x, y, alpha, beta);
}
// Part 3: Clean up //
if (lhs_needs_temporary)
detail::delete_element(new_root_lhs.lhs);
if (rhs_needs_temporary)
detail::delete_element(new_root_rhs.lhs);
}
} // namespace scheduler
} // namespace viennacl
#endif
viennacl::scheduler::HYB_MATRIX_TYPE
Definition: forwards.h:280
matrix_operations.hpp
Implementations of dense matrix related operations including matrix-vector products.
viennacl::scheduler::execute_matrix_prod
void execute_matrix_prod(statement const &s, statement_node const &root_node)
Definition: execute_matrix_prod.hpp:300
viennacl::scheduler::OPERATION_UNARY_TRANS_TYPE
Definition: forwards.h:106
vector_operations.hpp
Implementations of vector operations.
viennacl::scheduler::detail::extract_context
viennacl::context extract_context(statement_node const &root_node)
Helper routine for extracting the context in which a statement is executed.
Definition: execute_util.hpp:105
viennacl::scheduler::DENSE_VECTOR_TYPE
Definition: forwards.h:271
viennacl::scheduler::DOUBLE_TYPE
Definition: forwards.h:300
viennacl::scheduler::COORDINATE_MATRIX_TYPE
Definition: forwards.h:278
viennacl::scheduler::INVALID_SUBTYPE
Definition: forwards.h:266
viennacl::matrix_base< float >
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::MATRIX_TYPE_FAMILY
Definition: forwards.h:260
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
forwards.h
This file provides the forward declarations for the main types used within ViennaCL.
viennacl::scheduler::detail::matrix_vector_prod
void matrix_vector_prod(statement const &s, lhs_rhs_element result, lhs_rhs_element const &A, lhs_rhs_element const &x)
Definition: execute_matrix_prod.hpp:180
viennacl::scheduler::lhs_rhs_element::type_family
statement_node_type_family type_family
Definition: forwards.h:339
viennacl::scheduler::OPERATION_BINARY_ASSIGN_TYPE
Definition: forwards.h:115
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
execute_generic_dispatcher.hpp
Provides unified wrappers for the common routines {as(), asbs(), asbs_s()}, {av(), avbv(), avbv_v()}, and {am(), ambm(), ambm_m()} such that scheduler logic is not cluttered with numeric type decutions.
viennacl::scheduler::op_element::type_family
operation_node_type_family type_family
Definition: forwards.h:473
coordinate_matrix.hpp
Implementation of the coordinate_matrix class.
viennacl::scheduler::lhs_rhs_element::matrix_double
viennacl::matrix_base< double > * matrix_double
Definition: forwards.h:410
viennacl::scheduler::detail::delete_element
void delete_element(lhs_rhs_element &elem)
Definition: execute_util.hpp:266
viennacl::scheduler::lhs_rhs_element::hyb_matrix_double
viennacl::hyb_matrix< double > * hyb_matrix_double
Definition: forwards.h:465
viennacl::context
Represents a generic 'context' similar to an OpenCL context, but is backend-agnostic and thus also su...
Definition: context.hpp:39
viennacl::scheduler::COMPOSITE_OPERATION_FAMILY
Definition: forwards.h:251
hyb_matrix.hpp
Implementation of the hyb_matrix class.
viennacl::scheduler::DENSE_MATRIX_TYPE
Definition: forwards.h:274
viennacl::scheduler::lhs_rhs_element::compressed_matrix_float
viennacl::compressed_matrix< float > * compressed_matrix_float
Definition: forwards.h:431
viennacl::scheduler::detail::axbx
void axbx(lhs_rhs_element &x1, lhs_rhs_element const &x2, ScalarType1 const &alpha, vcl_size_t len_alpha, bool reciprocal_alpha, bool flip_sign_alpha, lhs_rhs_element const &x3, ScalarType2 const &beta, vcl_size_t len_beta, bool reciprocal_beta, bool flip_sign_beta)
Wrapper for viennacl::linalg::avbv(), taking care of the argument unwrapping.
Definition: execute_generic_dispatcher.hpp:67
viennacl::scheduler::INVALID_NUMERIC_TYPE
Definition: forwards.h:288
viennacl::scheduler::OPERATION_BINARY_INPLACE_ADD_TYPE
Definition: forwards.h:116
viennacl::scheduler::lhs_rhs_element::numeric_type
statement_node_numeric_type numeric_type
Definition: forwards.h:341
compressed_matrix.hpp
Implementation of the compressed_matrix class.
viennacl::scheduler::lhs_rhs_element::vector_float
viennacl::vector_base< float > * vector_float
Definition: forwards.h:385
sparse_matrix_operations.hpp
Implementations of operations using sparse matrices.
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::statement_node::lhs
lhs_rhs_element lhs
Definition: forwards.h:480
viennacl::scheduler::lhs_rhs_element::vector_double
viennacl::vector_base< double > * vector_double
Definition: forwards.h:386
ell_matrix.hpp
Implementation of the ell_matrix class.
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::lhs_rhs_element::hyb_matrix_float
viennacl::hyb_matrix< float > * hyb_matrix_float
Definition: forwards.h:464
forwards.h
Provides the datastructures for dealing with a single statement such as 'x = y + z;'.
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_BINARY_INPLACE_SUB_TYPE
Definition: forwards.h:117
viennacl::scheduler::detail::new_element
void new_element(lhs_rhs_element &new_elem, lhs_rhs_element const &old_element, viennacl::context const &ctx)
Definition: execute_util.hpp:204
viennacl::scheduler::lhs_rhs_element::ell_matrix_float
viennacl::ell_matrix< float > * ell_matrix_float
Definition: forwards.h:453
viennacl::scheduler::ELL_MATRIX_TYPE
Definition: forwards.h:279
viennacl::scheduler::op_element::type
operation_node_type type
Definition: forwards.h:474
viennacl::op_trans
A tag class representing transposed matrices.
Definition: forwards.h:220
viennacl::scheduler::FLOAT_TYPE
Definition: forwards.h:299
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::detail::matrix_matrix_prod
void matrix_matrix_prod(statement const &s, lhs_rhs_element result, lhs_rhs_element const &A, lhs_rhs_element const &B, double alpha, double beta)
Definition: execute_matrix_prod.hpp:57
viennacl::scheduler::lhs_rhs_element::node_index
vcl_size_t node_index
Definition: forwards.h:346
viennacl::linalg::prod_impl
void prod_impl(const matrix_base< NumericT > &mat, const vector_base< NumericT > &vec, vector_base< NumericT > &result)
Carries out matrix-vector multiplication.
Definition: matrix_operations.hpp:438
viennacl::scheduler::detail::matrix_prod_temporary_required
bool matrix_prod_temporary_required(statement const &s, lhs_rhs_element const &elem)
Definition: execute_matrix_prod.hpp:44
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
execute_util.hpp
Provides various utilities for implementing the execution of statements.
viennacl::scheduler::statement_node
Main datastructure for an node in the statement tree.
Definition: forwards.h:478
viennacl::scheduler::statement_not_supported_exception
Exception for the case the scheduler is unable to deal with the operation.
Definition: forwards.h:38
viennacl::scheduler::COMPRESSED_MATRIX_TYPE
Definition: forwards.h:277