35#ifndef _BLAZE_MATH_FUNCTORS_MAX_H_
36#define _BLAZE_MATH_FUNCTORS_MAX_H_
90 template<
typename T1,
typename T2 >
93 return max( std::forward<T1>( a ), std::forward<T2>( b ) );
102 template<
typename T1,
typename T2 >
103 static constexpr bool simdEnabled() {
return HasSIMDMax_v<T1,T2>; }
121 template<
typename T1,
typename T2 >
143template<
typename T1,
typename T2 >
144struct YieldsUniform<Max,T1,T2>
145 :
public BoolConstant< IsUniform_v<T1> && IsUniform_v<T2> >
161template<
typename MT1,
typename MT2 >
162struct YieldsSymmetric<Max,MT1,MT2>
163 :
public BoolConstant< IsSymmetric_v<MT1> && IsSymmetric_v<MT2> >
179template<
typename MT1,
typename MT2 >
180struct YieldsLower<Max,MT1,MT2>
181 :
public BoolConstant< IsLower_v<MT1> && IsLower_v<MT2> >
197template<
typename MT1,
typename MT2 >
198struct YieldsUniLower<Max,MT1,MT2>
199 :
public BoolConstant< ( IsUniLower_v<MT1> && ( IsUniLower_v<MT2> || IsStrictlyLower_v<MT2> ) ) ||
200 ( IsUniLower_v<MT2> && ( IsUniLower_v<MT1> || IsStrictlyLower_v<MT1> ) ) >
216template<
typename MT1,
typename MT2 >
217struct YieldsStrictlyLower<Max,MT1,MT2>
218 :
public BoolConstant< IsStrictlyLower_v<MT1> && IsStrictlyLower_v<MT2> >
234template<
typename MT1,
typename MT2 >
235struct YieldsUpper<Max,MT1,MT2>
236 :
public BoolConstant< IsUpper_v<MT1> && IsUpper_v<MT2> >
252template<
typename MT1,
typename MT2 >
253struct YieldsUniUpper<Max,MT1,MT2>
254 :
public BoolConstant< ( IsUniUpper_v<MT1> && ( IsUniUpper_v<MT2> || IsStrictlyUpper_v<MT2> ) ) ||
255 ( IsUniUpper_v<MT2> && ( IsUniUpper_v<MT1> || IsStrictlyUpper_v<MT1> ) ) >
271template<
typename MT1,
typename MT2 >
272struct YieldsStrictlyUpper<Max,MT1,MT2>
273 :
public BoolConstant< IsStrictlyUpper_v<MT1> && IsStrictlyUpper_v<MT2> >
Header file for the HasSIMDMax type trait.
Macro for CUDA compatibility.
Header file for the IntegralConstant class template.
Header file for the IsLower type trait.
Header file for the IsStrictlyLower type trait.
Header file for the IsStrictlyUpper type trait.
Header file for the IsSymmetric type trait.
Header file for the IsUniLower type trait.
Header file for the IsUniUpper type trait.
Header file for the IsUpper type trait.
Header file for the YieldsLower type trait.
Header file for the YieldsStrictlyLower type trait.
Header file for the YieldsStrictlyUpper type trait.
Header file for the YieldsSymmetric type trait.
Header file for the YieldsUniLower type trait.
Header file for the YieldsUniUpper type trait.
Header file for the YieldsUpper type trait.
Constraint on the data type.
constexpr decltype(auto) max(T1 &&a, T2 &&b, T3 &&c, Ts &&... args)
Maximum function for at least four values/objects.
Definition: Max.h:126
#define BLAZE_CONSTRAINT_MUST_BE_SIMD_PACK(T)
Constraint on the data type.
Definition: SIMDPack.h:60
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
#define BLAZE_DEVICE_CALLABLE
Conditional macro that sets host and device attributes when compiled with CUDA.
Definition: HostDevice.h:94
IntegralConstant< bool, B > BoolConstant
Generic wrapper for a compile time constant boolean value.
Definition: IntegralConstant.h:110
Header file for the SIMD max functionality.
Generic wrapper for the max() function.
Definition: Max.h:82
BLAZE_ALWAYS_INLINE decltype(auto) load(const T1 &a, const T2 &b) const
Returns the result of the max() function for the given SIMD vector.
Definition: Max.h:122
static constexpr bool simdEnabled()
Returns whether SIMD is enabled for the specified data types T1 and T2.
Definition: Max.h:103
static constexpr bool paddingEnabled()
Returns whether the operation supports padding, i.e. whether it can deal with zeros.
Definition: Max.h:111
System settings for the inline keywords.
Header file for the generic max algorithm.