VISR  0.12.0
Versatile Interactive Scene Renderer
vector_functions_reference.hpp
Go to the documentation of this file.
1 /* Copyright Institute of Sound and Vibration Research - All rights reserved */
2 
3 #ifndef VISR_LIBEFL_VECTOR_FUNCTIONS_REFERENCE_HPP_INCLUDED
4 #define VISR_LIBEFL_VECTOR_FUNCTIONS_REFERENCE_HPP_INCLUDED
5 
6 #include "error_codes.hpp"
7 
8 #include <cstddef>
9 
10 namespace visr
11 {
12 namespace efl
13 {
14 namespace reference
15 {
16 
17 template <typename T>
18 ErrorCode vectorZeroReference( T * const dest, std::size_t numElements, std::size_t alignment = 0 );
19 
20 template <typename T>
21 ErrorCode vectorFillReference( const T value, T * const dest, std::size_t numElements, std::size_t alignment = 0 );
22 
23 template <typename T>
24 ErrorCode vectorCopyReference( T const * const source, T * const dest, std::size_t numElements, std::size_t alignment = 0 );
25 
40 template <typename T>
41 ErrorCode vectorRamp( T * const dest, std::size_t numElements, T startVal, T endVal,
42  bool startInclusive, bool endInclusive, std::size_t alignment = 0 );
43 
44 template<typename T>
45 ErrorCode vectorAdd( T const * const op1,
46  T const * const op2,
47  T * const result,
48  std::size_t numElements,
49  std::size_t alignment = 0 );
50 
51 template<typename T>
52 ErrorCode vectorAddInplace( T const * const op1,
53  T * const op2Result,
54  std::size_t numElements,
55  std::size_t alignment = 0 );
56 
57 template<typename T>
58 ErrorCode vectorAddConstant( T constantValue,
59  T const * const op,
60  T * const result,
61  std::size_t numElements,
62  std::size_t alignment = 0 );
63 
64 template<typename T>
65 ErrorCode vectorAddConstantInplace( T constantValue,
66  T * const opResult,
67  std::size_t numElements,
68  std::size_t alignment = 0 );
69 
70 template<typename T>
71 ErrorCode vectorSubtract( T const * const subtrahend,
72  T const * const minuend,
73  T * const result,
74  std::size_t numElements,
75  std::size_t alignment = 0 );
76 
77 template<typename T>
78 ErrorCode vectorSubtractInplace( T const * const minuend,
79  T * const subtrahendResult,
80  std::size_t numElements,
81  std::size_t alignment = 0 );
82 
83 template<typename T>
84 ErrorCode vectorSubtractConstant( T constantMinuend,
85  T const * const subtrahend,
86  T * const result,
87  std::size_t numElements,
88  std::size_t alignment = 0 );
89 
90 template<typename T>
91 ErrorCode vectorSubConstantInplace( T constantMinuend,
92  T * const subtrahendResult,
93  std::size_t numElements,
94  std::size_t alignment = 0 );
95 
96 
106 template<typename T>
107 ErrorCode vectorMultiply( T const * const factor1,
108  T const * const factor2,
109  T * const result,
110  std::size_t numElements,
111  std::size_t alignment = 0 );
112 
121 template<typename T>
122 ErrorCode vectorMultiplyInplace( T const * const factor1,
123  T * const factor2Result,
124  std::size_t numElements,
125  std::size_t alignment = 0 );
126 
136 template<typename T>
137 ErrorCode vectorMultiplyConstant( T constantValue,
138  T const * const factor,
139  T * const result,
140  std::size_t numElements,
141  std::size_t alignment = 0 );
142 
151 template<typename T>
153  T * const factorResult,
154  std::size_t numElements,
155  std::size_t alignment = 0 );
156 
157 template<typename T>
158 ErrorCode vectorMultiplyAdd( T const * const factor1,
159  T const * const factor2,
160  T const * const addend,
161  T * const result,
162  std::size_t numElements,
163  std::size_t alignment = 0 );
164 
165 template<typename T>
166 ErrorCode vectorMultiplyAddInplace( T const * const factor1,
167  T const * const factor2,
168  T * const accumulator,
169  std::size_t numElements,
170  std::size_t alignment = 0 );
171 
172 template<typename T>
173 ErrorCode vectorMultiplyConstantAdd( T constFactor,
174  T const * const factor,
175  T const * const addend,
176  T * const result,
177  std::size_t numElements,
178  std::size_t alignment = 0 );
179 
180 template<typename T>
182  T const * const factor,
183  T * const accumulator,
184  std::size_t numElements,
185  std::size_t alignment = 0 );
186 
187 
188 } // namespace reference
189 } // namespace efl
190 } // namespace visr
191 
192 #endif // #ifndef VISR_LIBEFL_VECTOR_FUNCTIONS_REFERENCE_HPP_INCLUDED
template ErrorCode vectorMultiplyConstantAdd(float, float const *const, float const *const, float *const, std::size_t, std::size_t)
template ErrorCode vectorMultiplyAddInplace(float const *const, float const *const, float *const, std::size_t, std::size_t)
template ErrorCode vectorSubtract(float const *const, float const *const, float *const, std::size_t, std::size_t)
ErrorCode vectorAddConstantInplace(T constantValue, T *const opResult, std::size_t numElements, std::size_t alignment=0)
Definition: vector_functions_reference_impl.hpp:113
template ErrorCode vectorSubtractInplace(float const *const, float *const, std::size_t, std::size_t)
ErrorCode vectorAdd(T const *const op1, T const *const op2, T *const result, std::size_t numElements, std::size_t alignment=0)
Definition: vector_functions_reference_impl.hpp:67
template ErrorCode vectorMultiplyConstant(float, float const *const, float *const, std::size_t, std::size_t)
template ErrorCode vectorSubtractConstant(float, float const *const, float *const, std::size_t, std::size_t)
ErrorCode vectorAddConstant(T constantValue, T const *const op, T *const result, std::size_t numElements, std::size_t alignment=0)
Definition: vector_functions_reference_impl.hpp:98
template ErrorCode vectorMultiplyConstantAddInplace(float, float const *const, float *const, std::size_t, std::size_t)
Definition: options.cpp:10
ErrorCode vectorFillReference(const T value, T *const dest, std::size_t numElements, std::size_t alignment=0)
ErrorCode vectorAddInplace(T const *const op1, T *const op2Result, std::size_t numElements, std::size_t alignment=0)
Definition: vector_functions_reference_impl.hpp:83
ErrorCode vectorCopyReference(T const *const source, T *const dest, std::size_t numElements, std::size_t alignment=0)
template ErrorCode vectorRamp(float *const, std::size_t, float, float, bool, bool, std::size_t)
template ErrorCode vectorMultiplyAdd(float const *const, float const *const, float const *const, float *const, std::size_t, std::size_t)
template ErrorCode vectorSubConstantInplace(float, float *const, std::size_t, std::size_t)
template ErrorCode vectorMultiplyConstantInplace(float, float *const, std::size_t, std::size_t)
ErrorCode
Definition: error_codes.hpp:13
ErrorCode vectorZeroReference(T *const dest, std::size_t numElements, std::size_t alignment=0)
template ErrorCode vectorMultiplyInplace(float const *const, float *const, std::size_t, std::size_t)
template ErrorCode vectorMultiply(float const *const, float const *const, float *const, std::size_t, std::size_t)