ViennaCL - The Vienna Computing Library: viennacl::vector_expression< LHS, RHS, OP > Class Template Reference

ViennaCL - The Vienna Computing Library 1.7.1 Free open-source GPU-accelerated linear algebra and solver library. |

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
viennacl::vector_expression< LHS, RHS, OP > Class Template Reference

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

`#include <forwards.h>`

## Public Types
enum | { alignment = 1 }
typedef vcl_size_t | size_type
| Extracts the vector type from the two operands. More...

## Public Member Functions
| vector_expression (LHS &l, RHS &r)
lhs_reference_type | lhs () const
| Get left hand side operand. More...
rhs_reference_type | rhs () const
| Get right hand side operand. More...
size_type | size () const
| Returns the size of the result vector. More...

## 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

Definition at line 239 of file forwards.h.

## Member Typedef Documentation

template<typename LHS, typename RHS, typename OP>

typedef vcl_size_t viennacl::vector_expression< LHS, RHS, OP >::size_type

Extracts the vector type from the two operands.

Definition at line 68 of file vector.hpp.

## Member Enumeration Documentation

template<typename LHS, typename RHS, typename OP>

anonymous enum

Enumerator
alignment |

Definition at line 64 of file vector.hpp.

## Constructor & Destructor Documentation

template<typename LHS, typename RHS, typename OP>

viennacl::vector_expression< LHS, RHS, OP >::vector_expression | ( | LHS & | l,
|  | RHS & | r
| ) |  |
| inline

Definition at line 70 of file vector.hpp.

## Member Function Documentation

template<typename LHS, typename RHS, typename OP>

lhs_reference_type viennacl::vector_expression< LHS, RHS, OP >::lhs | ( |  | ) | const
| inline

Get left hand side operand.

Definition at line 74 of file vector.hpp.

template<typename LHS, typename RHS, typename OP>

rhs_reference_type viennacl::vector_expression< LHS, RHS, OP >::rhs | ( |  | ) | const
| inline

Get right hand side operand.

Definition at line 77 of file vector.hpp.

template<typename LHS, typename RHS, typename OP>

size_type viennacl::vector_expression< LHS, RHS, OP >::size | ( |  | ) | const
| inline

Returns the size of the result vector.

Definition at line 80 of file vector.hpp.

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

- viennacl/forwards.h
- viennacl/vector.hpp