cisst-saw
Loading...
Searching...
No Matches
VioViVi< _ioElementOperationType, _vectorElementOperationType > Class Template Reference

Implement operation of the form \(v_{io} = op_{io}(v_{io}, op_{vv}(v_{i1}, v_{i2}))\) for fixed size vectors. More...

#include <vctFixedSizeVectorRecursiveEngines.h>

Public Types

typedef vctFixedSizeVectorRecursiveEngines< _size-1 >::template VioViVi< _ioElementOperationType, _vectorElementOperationType > RecursiveStep

Static Public Member Functions

template<class _ioVectorType, class _inputVectorType1, class _inputVectorType2>
static void Unfold (_ioVectorType &ioVector, const _inputVectorType1 &vector1, const _inputVectorType2 &vector2)

Detailed Description

template<class _ioElementOperationType, class _vectorElementOperationType>
class VioViVi< _ioElementOperationType, _vectorElementOperationType >

Implement operation of the form \(v_{io} = op_{io}(v_{io}, op_{vv}(v_{i1}, v_{i2}))\) for fixed size vectors.

This class uses template specialization to perform store-back vector-vector-vector operations

\[v_{io} = \mathrm{op_{io}}(V_{io}, \mathrm{op_{vv}}(v_{i1}, v_{i2})) \]

where \(v_{io}\) is an input-output (store-back) vector; \(v_{i1}\) and \(v_{i2}\) are input vectors. A typical example is: \(v_{io} += v_{i1} \cdot v_{i2}\). The vectors have a fixed size, determined at compilation time; \(op_{vv}\) is an element wise operation between the elements of \(v_{i1}\) and the elements of \(v_{i2}\); \(op_{io}\) is an operation between the output of \(op_{vv}\) and the elements of \(v_{io}\).

Parameters
_ioOperationTypeThe type of the store-back operation.
_vectorElementOperationTypeThe type of the operation between scalar and input vector.
See also
vctFixedSizeVectorRecursiveEngines

Member Typedef Documentation

◆ RecursiveStep

template<class _ioElementOperationType, class _vectorElementOperationType>
typedef vctFixedSizeVectorRecursiveEngines<_size-1>::template VioViVi<_ioElementOperationType, _vectorElementOperationType> VioViVi< _ioElementOperationType, _vectorElementOperationType >::RecursiveStep

Member Function Documentation

◆ Unfold()

template<class _ioElementOperationType, class _vectorElementOperationType>
template<class _ioVectorType, class _inputVectorType1, class _inputVectorType2>
void VioViVi< _ioElementOperationType, _vectorElementOperationType >::Unfold ( _ioVectorType & ioVector,
const _inputVectorType1 & vector1,
const _inputVectorType2 & vector2 )
inlinestatic

Unfold the recursion. Performs the operation _elementOperationType elementwise on the last elements of the input vector and the input scalar and call Unfold for the _size - 1 elements left (i.e. unfold the recursive calls). The incremental operation is applied to the result of the recursive Unfold call and the result of _elementOperationType(inputVector[_size], inputScalar[_size]).

Parameters
inputVectorThe input vector (first operand for _elementOperationType).
inputScalarThe input scalar (second operand for _elementOperationType).

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