Public Types | Public Member Functions

vector_expression< LHS, RHS, OP > Class Template Reference

An expression template class that represents a binary operation that yields a vector. More...

#include <vector.hpp>

Public Types

typedef
viennacl::tools::VECTOR_EXTRACTOR
< LHS, RHS >::ResultType 
VectorType
 Extracts the vector type from the two operands.

Public Member Functions

 vector_expression (LHS &lhs, RHS &rhs)
LHS & lhs () const
 Get left hand side operand.
RHS & rhs () const
 Get right hand side operand.
std::size_t size () const
 Returns the size of the result vector.

Detailed Description

template<typename LHS, typename RHS, typename OP>
class viennacl::vector_expression< LHS, RHS, OP >

An expression template class that represents a binary operation that yields a vector.

In contrast to full expression templates as introduced by Veldhuizen, ViennaCL does not allow nested expressions. The reason is that this requires automated GPU viennacl::ocl::kernel generation, which then has to be compiles just-in-time. For performance-critical applications, one better writes the appropriate viennacl::ocl::kernels by hand.

Assumption: dim(LHS) >= dim(RHS), where dim(scalar) = 0, dim(vector) = 1 and dim(matrix = 2)

Template Parameters:
LHS left hand side operand
RHS right hand side operand
OP the operator

Member Typedef Documentation

typedef viennacl::tools::VECTOR_EXTRACTOR<LHS, RHS>::ResultType VectorType

Extracts the vector type from the two operands.


Constructor & Destructor Documentation

vector_expression ( LHS &  lhs,
RHS &  rhs 
) [inline]

Member Function Documentation

LHS& lhs (  )  const [inline]

Get left hand side operand.

RHS& rhs (  )  const [inline]

Get right hand side operand.

std::size_t size (  )  const [inline]

Returns the size of the result vector.


The documentation for this class was generated from the following file: