ViennaCL - The Vienna Computing Library
1.5.2
|
An expression template class that represents a binary operation that yields a vector. More...
#include <vector.hpp>
Public Types | |
enum | { alignment = 1 } |
typedef vcl_size_t | size_type |
Extracts the vector type from the two operands. | |
Public Member Functions | |
vector_expression (LHS &l, RHS &r) | |
lhs_reference_type | lhs () const |
Get left hand side operand. | |
rhs_reference_type | rhs () const |
Get right hand side operand. | |
size_type | size () const |
Returns the size of the result vector. |
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)
LHS | left hand side operand |
RHS | right hand side operand |
OP | the operator |
typedef vcl_size_t size_type |
Extracts the vector type from the two operands.
vector_expression | ( | LHS & | l, |
RHS & | r | ||
) | [inline] |
lhs_reference_type lhs | ( | ) | const [inline] |
Get left hand side operand.
rhs_reference_type rhs | ( | ) | const [inline] |
Get right hand side operand.