35 #ifndef _BLAZE_MATH_FUNCTIONS_H_
36 #define _BLAZE_MATH_FUNCTIONS_H_
65 template<
typename T >
66 inline int sign( T a );
68 template<
typename T >
69 inline size_t digits( T a );
71 template<
typename T1,
typename T2 >
73 min(
const T1& a,
const T2& b );
75 template<
typename T1,
typename T2,
typename T3 >
76 BLAZE_ALWAYS_INLINE const typename MathTrait< typename MathTrait<T1,T2>::HighType, T3 >::HighType
77 min(
const T1& a,
const T2& b,
const T3& c );
79 template<
typename T1,
typename T2 >
81 max(
const T1& a,
const T2& b );
83 template<
typename T1,
typename T2,
typename T3 >
84 BLAZE_ALWAYS_INLINE const typename MathTrait< typename MathTrait<T1,T2>::HighType, T3 >::HighType
85 max(
const T1& a,
const T2& b,
const T3& c );
87 template<
typename T >
90 template<
typename T >
93 template<
typename T1,
typename T2 >
109 template<
typename T >
115 return ( T(0) < a ) - ( a < T(0) );
140 template<
typename T >
169 template<
typename T1,
typename T2 >
179 return ( a < b )?( a ):( b );
197 template<
typename T1,
typename T2,
typename T3 >
198 BLAZE_ALWAYS_INLINE const typename MathTrait< typename MathTrait<T1,T2>::HighType, T3 >::HighType
199 min(
const T1& a,
const T2& b,
const T3& c )
208 return ( a < b )?( ( a < c )?( a ):( c ) ):( ( b < c )?( b ):( c ) );
225 template<
typename T1,
typename T2 >
235 return ( a < b )?( b ):( a );
253 template<
typename T1,
typename T2,
typename T3 >
254 BLAZE_ALWAYS_INLINE const typename MathTrait< typename MathTrait<T1,T2>::HighType, T3 >::HighType
255 max(
const T1& a,
const T2& b,
const T3& c )
264 return ( a < b )?( ( b < c )?( c ):( b ) ):( ( a < c )?( c ):( a ) );
281 template<
typename T >
305 return std::floor( a + 0.5F );
326 return std::floor( a + 0.5 );
347 return std::floor( a + 0.5L );
367 template<
typename T >
372 if( value > T(0) && factor > T(0) )
373 return value + ( factor - ( value % factor ) ) % factor;
390 template<
typename T >
416 return ( b - a ) > 1E-8F;
439 return ( b - a ) > 1E-8;
462 return ( b - a ) > 1E-10;
480 template<
typename T1,
typename T2 >
484 return lessThan_backend<High>( a, b );
const MT::ElementType max(const DenseMatrix< MT, SO > &dm)
Returns the largest element of the dense matrix.
Definition: DenseMatrix.h:1729
Header file for basic type definitions.
Base template for the MathTrait class.
Definition: MathTrait.h:136
Compile time check for signed data types.This type trait tests whether or not the given template para...
Definition: IsSigned.h:96
int sign(T a)
Sign function.
Definition: Functions.h:110
#define BLAZE_CONSTRAINT_MUST_BE_INTEGRAL_TYPE(T)
Constraint on the data type.In case the given data type T is not an integral data type...
Definition: Integral.h:78
BLAZE_ALWAYS_INLINE T nextMultiple(T value, T factor)
Rounds up an integral value to the next multiple of a given factor.
Definition: Functions.h:368
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
Header file for the IsFloatingPoint type trait.
const MT::ElementType min(const DenseMatrix< MT, SO > &dm)
Returns the smallest element of the dense matrix.
Definition: DenseMatrix.h:1682
Compile time check for floating point data types.This type trait tests whether or not the given templ...
Definition: IsFloatingPoint.h:94
Constraint on the data type.
Constraint on the data type.
Header file for the IsSigned type trait.
Header file for the mathematical trait.
#define BLAZE_CONSTRAINT_MUST_BE_BUILTIN_TYPE(T)
Constraint on the data type.In case the given data type T is not a built-in data type, a compilation error is created.
Definition: Builtin.h:78
BLAZE_ALWAYS_INLINE T round(T a)
Rounds the given input value.
Definition: Functions.h:282
size_t digits(T a)
Returns the number of valid digits of an integral value.
Definition: Functions.h:141
BLAZE_ALWAYS_INLINE bool lessThan(T1 a, T2 b)
Generic less-than comparison.
Definition: Functions.h:481
System settings for the inline keywords.
Constraint on the data type.