All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
op_executor.hpp
Go to the documentation of this file.
#ifndef VIENNACL_LINALG_DETAIL_OP_EXECUTOR_HPP
#define VIENNACL_LINALG_DETAIL_OP_EXECUTOR_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"
namespace viennacl
{
namespace linalg
{
namespace detail
{
template<typename NumericT, typename B>
bool op_aliasing(vector_base<NumericT> const & /*lhs*/, B const & /*b*/)
{
return false;
}
template<typename NumericT>
bool op_aliasing(vector_base<NumericT> const & lhs, vector_base<NumericT> const & b)
{
return lhs.handle() == b.handle();
}
template<typename NumericT, typename LhsT, typename RhsT, typename OpT>
bool op_aliasing(vector_base<NumericT> const & lhs, vector_expression<const LhsT, const RhsT, OpT> const & rhs)
{
return op_aliasing(lhs, rhs.lhs()) || op_aliasing(lhs, rhs.rhs());
}
template<typename NumericT, typename B>
bool op_aliasing(matrix_base<NumericT> const & /*lhs*/, B const & /*b*/)
{
return false;
}
template<typename NumericT>
bool op_aliasing(matrix_base<NumericT> const & lhs, matrix_base<NumericT> const & b)
{
return lhs.handle() == b.handle();
}
template<typename NumericT, typename LhsT, typename RhsT, typename OpT>
bool op_aliasing(matrix_base<NumericT> const & lhs, matrix_expression<const LhsT, const RhsT, OpT> const & rhs)
{
return op_aliasing(lhs, rhs.lhs()) || op_aliasing(lhs, rhs.rhs());
}
template<typename A, typename OP, typename T>
struct op_executor {};
}
}
}
#endif // VIENNACL_LINALG_DETAIL_OP_EXECUTOR_HPP
viennacl::linalg::detail::op_executor
Worker class for decomposing expression templates.
Definition: op_executor.hpp:80
viennacl::matrix_base< NumericT >
viennacl::matrix_expression
Expression template class for representing a tree of expressions which ultimately result in a matrix...
Definition: forwards.h:341
forwards.h
This file provides the forward declarations for the main types used within ViennaCL.
viennacl::vector_expression::lhs
lhs_reference_type lhs() const
Get left hand side operand.
Definition: vector.hpp:74
viennacl::vector_expression
An expression template class that represents a binary operation that yields a vector.
Definition: forwards.h:239
viennacl::linalg::detail::op_aliasing
bool op_aliasing(vector_base< NumericT > const &, B const &)
Definition: op_executor.hpp:36
viennacl::vector_expression::rhs
rhs_reference_type rhs() const
Get right hand side operand.
Definition: vector.hpp:77
viennacl::vector_base< NumericT >
viennacl::matrix_base::handle
handle_type & handle()
Returns the OpenCL handle, non-const-version.
Definition: matrix_def.hpp:244
viennacl::matrix_expression::rhs
RHS & rhs() const
Get right hand side operand.
Definition: matrix.hpp:69
viennacl::matrix_expression::lhs
LHS & lhs() const
Get left hand side operand.
Definition: matrix.hpp:66
viennacl::vector_base::handle
const handle_type & handle() const
Returns the memory handle.
Definition: vector_def.hpp:128