Eigen::internal::pminmax_impl< PropagateNaN > Struct Reference

#include <GenericPacketMath.h>

Static Public Member Functions

template<typename Packet , typename Op >
static EIGEN_DEVICE_FUNC Packet run (const Packet &a, const Packet &b, Op op)
 

Detailed Description

Returns
the min or max of a and b (coeff-wise) If either a or b are NaN, NaN is returned.

Member Function Documentation

◆ run()

template<typename Packet , typename Op >
static EIGEN_DEVICE_FUNC Packet Eigen::internal::pminmax_impl< PropagateNaN >::run ( const Packet a,
const Packet b,
Op  op 
)
inlinestatic
624  {
625  Packet not_nan_mask_a = pcmp_eq(a, a);
626  Packet not_nan_mask_b = pcmp_eq(b, b);
627  return pselect(not_nan_mask_a, pselect(not_nan_mask_b, op(a, b), b), a);
628  }
Scalar * b
Definition: benchVecAdd.cpp:17
const Scalar * a
Definition: level2_cplx_impl.h:32
char char * op
Definition: level2_impl.h:374
EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf &a, const Packet2cf &b)
Definition: AltiVec/Complex.h:353
EIGEN_STRONG_INLINE Packet4f pselect(const Packet4f &mask, const Packet4f &a, const Packet4f &b)
Definition: AltiVec/PacketMath.h:1474

References a, b, op, Eigen::internal::pcmp_eq(), and Eigen::internal::pselect().


The documentation for this struct was generated from the following file: