Eigen::internal::unary_pow::reciprocate< Packet, ScalarExponent, ReciprocateIfExponentIsNegative > Struct Template Reference

#include <GenericPacketMathFunctions.h>

Static Public Member Functions

static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet run (const Packet &x, const ScalarExponent &exponent)
 

Member Function Documentation

◆ run()

template<typename Packet , typename ScalarExponent , bool ReciprocateIfExponentIsNegative = !NumTraits<typename unpacket_traits<Packet>::type>::IsInteger && NumTraits<ScalarExponent>::IsSigned>
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet Eigen::internal::unary_pow::reciprocate< Packet, ScalarExponent, ReciprocateIfExponentIsNegative >::run ( const Packet x,
const ScalarExponent &  exponent 
)
inlinestatic
2177  {
2178  using Scalar = typename unpacket_traits<Packet>::type;
2179  const Packet cst_pos_one = pset1<Packet>(Scalar(1));
2180  return exponent < 0 ? pdiv(cst_pos_one, x) : x;
2181  }
SCALAR Scalar
Definition: bench_gemm.cpp:45
EIGEN_DEVICE_FUNC Packet pdiv(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:368
list x
Definition: plotDoE.py:28
T type
Definition: GenericPacketMath.h:135

References Eigen::internal::pdiv(), and plotDoE::x.

Referenced by Eigen::internal::unary_pow::int_pow().


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