47 #ifndef AFF_RAWARFUN_H_VERSION 49 #define AFF_RAWARFUN_H_VERSION \ 59 template<
typename T,
int I>
63 static inline void copy(
const T* source, T* target)
65 target[I-1]=source[I-1];
82 static inline T
sum(
const T* array)
87 static inline void set(T* array,
const T& value)
98 static inline bool anylarger(
const T* A,
const T* B)
100 return (((*A) > (*B))
138 static inline void copy(
const T* source, T* target)
139 { target[0]=source[0]; }
141 {
return (array[0]); }
142 static inline T
sum(
const T* array)
143 {
return (array[0]); }
144 static inline void set(T* array,
const T& value)
147 {
return (((*A) < (*B))); }
149 {
return (((*A) > (*B))); }
151 {
return(A[0]*B[0]); }
153 {
return(A[0]+B[0]); }
159 template<
typename T1,
typename T2,
int I>
163 static inline void copy(
const T1* source, T2* target)
165 target[I-1]=source[I-1];
169 static inline void set(T1* array,
const T2& value)
176 return (((*A) < (*B))
182 return (((*A) > (*B))
217 template<
typename T1,
typename T2>
220 static inline void copy(
const T1* source, T2* target)
221 { target[0]=source[0]; }
222 static inline void set(T1* array,
const T2& value)
225 {
return (((*A) < (*B))); }
227 {
return (((*A) > (*B))); }
229 {
return(A[0]*B[0]); }
231 {
return(A[0]+B[0]); }
238 #endif // AFF_RAWARFUN_H_VERSION (includeguard) Root namespace of library.
some typedefs we refer to
static void copy(const T *source, T *target)
copy all values from source to target
Recursive functions to inline raw array operations.
static T innerproduct(const T *A, const T *B)
static T product(const T *array)
calculate product of all elements
static bool anysmaller(const T1 *A, const T2 *B)
true if ony of A is smaller than corresponding B
static void copy(const T *source, T *target)
static bool anysmaller(const T *A, const T *B)
static T innerproduct(const T *A, const T *B)
calculate inner product
static bool anylarger(const T1 *A, const T2 *B)
static void set(T1 *array, const T2 &value)
set all elements to value
static T1 innerproduct(const T1 *A, const T2 *B)
static bool anylarger(const T1 *A, const T2 *B)
true if ony of A is larger than corresponding B
Recursive functions to inline raw array operations.
static T strideproduct(const T *A, const T *B)
static bool anylarger(const T *A, const T *B)
static void copy(const T1 *source, T2 *target)
copy all values from source to target
static void set(T *array, const T &value)
set all elements to value
static T1 strideproduct(const T1 *A, const T2 *B)
calculate stride product
static void copy(const T1 *source, T2 *target)
static T1 strideproduct(const T1 *A, const T2 *B)
static bool anylarger(const T *A, const T *B)
true if ony of A is larger than corresponding B
static bool anysmaller(const T *A, const T *B)
true if ony of A is smaller than corresponding B
static T sum(const T *array)
static T strideproduct(const T *A, const T *B)
calculate stride product
static bool anysmaller(const T1 *A, const T2 *B)
static T1 innerproduct(const T1 *A, const T2 *B)
calculate inner product
static T sum(const T *array)
calculate sum of all elements
static T product(const T *array)