cisst-saw
Loading...
Searching...
No Matches
VioSiVi< _ioElementOperationType, _scalarVectorElementOperationType > Class Template Reference

Implement operation of the form \(v_{io} = op_{io}(v_{io}, op_{sv}(s, v_i))\) for fixed size vectors. More...

#include <vctFixedSizeVectorRecursiveEngines.h>

Public Types

typedef vctFixedSizeVectorRecursiveEngines< _size-1 >::template VioSiVi< _ioElementOperationType, _scalarVectorElementOperationType > RecursiveStep

Static Public Member Functions

template<class _ioVectorType, class _inputScalarType, class _inputVectorType>
static void Unfold (_ioVectorType &ioVector, const _inputScalarType &inputScalar, const _inputVectorType &inputVector)

Detailed Description

template<class _ioElementOperationType, class _scalarVectorElementOperationType>
class VioSiVi< _ioElementOperationType, _scalarVectorElementOperationType >

Implement operation of the form \(v_{io} = op_{io}(v_{io}, op_{sv}(s, v_i))\) for fixed size vectors.

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

\[v_{io} = \mathrm{op_{io}}(V_{io}, \mathrm{op_{sv}}(s, v_i)) \]

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

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

Member Typedef Documentation

◆ RecursiveStep

template<class _ioElementOperationType, class _scalarVectorElementOperationType>
typedef vctFixedSizeVectorRecursiveEngines<_size-1>::template VioSiVi<_ioElementOperationType, _scalarVectorElementOperationType> VioSiVi< _ioElementOperationType, _scalarVectorElementOperationType >::RecursiveStep

Member Function Documentation

◆ Unfold()

template<class _ioElementOperationType, class _scalarVectorElementOperationType>
template<class _ioVectorType, class _inputScalarType, class _inputVectorType>
void VioSiVi< _ioElementOperationType, _scalarVectorElementOperationType >::Unfold ( _ioVectorType & ioVector,
const _inputScalarType & inputScalar,
const _inputVectorType & inputVector )
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: