#include <vctFixedSizeVectorRecursiveEngines.h>
for fixed size vectors.
This class uses template specialization to perform binary vector operations of the form
where
is the output vector, and
are input scalar and vector, all vectors are of an equal fixed size, determined at compilation time, op stands for the a binary operation performed elementwise between
and
, and whose result is stored elementwise into
.
The operation type operationType must have a static method with the signature
static operationType Operation(const I1E & arg1, const I2E & arg2)
where OE, I1E, I2E are the types of vector elements in
respectively. These types do not need to be defined explicitly for vctFixedSizeVectorRecursiveEngines class, as they are inferred from the signature of the corresponding operator[] for each of the vector types. However, they may need to be defined for the class operationType.
For examples of binary operations, see vctBinaryOperations.h .
Usage example for vctFixedSizeVectorRecursiveEngines::VoSiVi:
enum {SIZE = 3};
int input1[SIZE];
float a;
double output[SIZE];
vctFixedSizeVectorRecursiveEngines<SIZE>::VoSiVi<vctBinaryOperations<int,float,double>::Addition>Unfold(output, scalar, input1);
stores the sum of elements of s and input1 into output.
| _elementOperationType | The type of the binary operation. |
Definition at line 363 of file vctFixedSizeVectorRecursiveEngines.h.
| static void vctFixedSizeVectorRecursiveEngines< _size >::VoSiVi< _elementOperationType >::Unfold | ( | _outputVectorType & | output, | |
| const _inputScalarType & | inputScalar, | |||
| const _inputVectorType | inputVector | |||
| ) | [inline, static] |
Unfold the recursion. Performs the operation _elementOperationType elementwise on the last elements of the input vector and scalar and call Unfold for the _size - 1 elements left (i.e. unfold the recursive calls).
| output | The output vector. | |
| inputScalar | The input scalar (first operand). | |
| inputVector | The input vector (second operand). |
Definition at line 379 of file vctFixedSizeVectorRecursiveEngines.h.