Go to the documentation of this file.
22 #define VecFunc(fnName) \
23 template<typename T, typename Allocator> \
24 inline pFlow::Vector<T, Allocator> pFlow::fnName(const Vector<T,Allocator>& v) \
26 Vector<T, Allocator> res(v.capacity(), Logical()); \
29 res.push_back( fnName(e) ); \
31 return std::move(res); \
33 template<typename T, typename Allocator, typename indexFunc> \
34 inline pFlow::Vector<T, Allocator> pFlow::fnName(const Vector<T, Allocator>& v, indexFunc iFn) \
36 Vector<T, Allocator> res(v.capacity(), Logical()); \
37 for(label i=0; i<v.size(); i++) \
40 res.push_back(fnName(v[i])); \
42 res.push_back(v[i]); \
44 return std::move(res); \
47 #define VecFunc2(fnName) \
48 template<typename T, typename Allocator> \
49 inline pFlow::Vector<T, Allocator> pFlow::fnName(const Vector<T, Allocator>& v1, const Vector<T, Allocator>& v2) \
51 Vector<T, Allocator> res(v1.capacity(), Logical()); \
52 for(label i=0; i<v1.size(); i++) \
54 res.push_back( fnName(v1[i], v2[i])); \
56 return std::move(res); \
58 template<typename T, typename Allocator, typename indexFunc> \
59 inline pFlow::Vector<T, Allocator> pFlow::fnName(const Vector<T, Allocator>& v1, const Vector<T, Allocator>& v2, indexFunc iFn) \
61 Vector<T, Allocator> res(v1.capacity(), Logical()); \
62 for(label i=0; i<v1.size(); i++) \
65 res.push_back(fnName(v1[i], v2[i])); \
67 res.push_back(v1[i]); \
69 return std::move(res); \
108 template<
typename T,
typename Allocator>
114 res.push_back(
pow(elm,e));
116 return std::move(res);
119 template<
typename T,
typename Allocator,
typename indexFunc>
127 res.push_back(
pow(v[i],e));
134 return std::move(res);
137 template<
typename T,
typename Allocator>
140 T minVal(largestPositive<T>());
143 minVal =
min(elm, minVal);
148 template<
typename T,
typename Allocator,
typename indexFunc>
151 T minVal(largestPositive<T>());
156 minVal =
min(v[i], minVal);
163 template<
typename T,
typename Allocator>
166 T maxVal(largestNegative<T>());
169 maxVal =
max(elm, maxVal);
174 template<
typename T,
typename Allocator ,
typename indexFunc>
177 T maxVal(largestNegative<T>());
182 maxVal =
max(v[i], maxVal);
189 template<
typename T,
typename Allocator>
192 T s =
static_cast<T
>(0);
200 template<
typename T,
typename Allocator,
typename indexFunc>
203 T s =
static_cast<T
>(0);
INLINE_FUNCTION_HD real atan(real x)
INLINE_FUNCTION_HD real atan2(real y, real x)
INLINE_FUNCTION_HD real atanh(real x)
INLINE_FUNCTION_HD real cos(real x)
INLINE_FUNCTION_HD real sin(real x)
INLINE_FUNCTION_HD real cosh(real x)
INLINE_FUNCTION_HD real asin(real x)
INLINE_FUNCTION_HD real log10(real x)
INLINE_FUNCTION_HD real log(real x)
INLINE_FUNCTION_HD real tan(real x)
INLINE_FUNCTION_HD real sinh(real x)
Vector< T, Allocator > pow(const Vector< T, Allocator > &v, T e)
Vector< T, Allocator > pow(const Vector< T, Allocator > &v, T e, indexFunc iFn)
INLINE_FUNCTION_HD real abs(real x)
INLINE_FUNCTION_HD real acos(real x)
INLINE_FUNCTION_HD real mod(real x, real y)
INLINE_FUNCTION_HD real tanh(real x)
INLINE_FUNCTION_HD real exp(real x)
T sum(const Vector< T, Allocator > &v)
T max(const Vector< T, Allocator > &v)
INLINE_FUNCTION_HD real asinh(real x)
INLINE_FUNCTION_HD real acosh(real x)
INLINE_FUNCTION_HD real sqrt(real x)
INLINE_FUNCTION_HD real cbrt(real x)
T min(const Vector< T, Allocator > &v)