16 #ifndef EIGEN_MATH_FUNCTIONS_ALTIVEC_H
17 #define EIGEN_MATH_FUNCTIONS_ALTIVEC_H
23 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)
97 x =
pmax(
pmin(x, p2d_exp_hi), p2d_exp_lo);
99 fx =
pmadd(p2d_cephes_LOG2EF, x, p2d_half);
103 tmp =
pmul(fx, p2d_cephes_exp_C1);
111 px =
pmadd(px, x2, p2d_cephes_exp_p1);
112 px =
pmadd(px, x2, p2d_cephes_exp_p2);
116 qx =
pmadd(qx, x2, p2d_cephes_exp_q1);
117 qx =
pmadd(qx, x2, p2d_cephes_exp_q2);
118 qx =
pmadd(qx, x2, p2d_cephes_exp_q3);
121 x =
pmadd(p2d_2,x,p2d_1);
124 emm0 = vec_ctsl(fx, 0);
126 static const Packet2l p2l_1023 = { 1023, 1023 };
127 static const Packet2ul p2ul_52 = { 52, 52 };
129 emm0 = emm0 + p2l_1023;
130 emm0 = emm0 << reinterpret_cast<Packet2l>(p2ul_52);
142 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)
149 x =
pmax(
pmin(x, p4f_exp_hi), p4f_exp_lo);
152 fx =
pmadd(x, p4f_cephes_LOG2EF, p4f_half);
156 tmp =
pmul(fx, p4f_cephes_exp_C1);
164 y =
pmadd(
y, x, p4f_cephes_exp_p1);
165 y =
pmadd(
y, x, p4f_cephes_exp_p2);
166 y =
pmadd(
y, x, p4f_cephes_exp_p3);
167 y =
pmadd(
y, x, p4f_cephes_exp_p4);
168 y =
pmadd(
y, x, p4f_cephes_exp_p5);
173 emm0 = (
Packet4i){ (int)fx[0], (
int)fx[1], (int)fx[2], (
int)fx[3] };
174 emm0 = emm0 + p4i_0x7f;
175 emm0 = emm0 << reinterpret_cast<Packet4i>(p4i_23);
196 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)
213 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)
#define EIGEN_UNUSED
Definition: Macros.h:1067
#define EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Definition: Macros.h:985
v2f64 Packet2d
Definition: PacketMath.h:820
v2i64 Packet2l
Definition: PacketMath.h:821
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:215
__vector int Packet4i
Definition: PacketMath.h:31
static _EIGEN_DECLARE_CONST_Packet4i(0x7f, 0x7f)
const Scalar & y
Definition: MathFunctions.h:821
EIGEN_DEVICE_FUNC Packet pdiv(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:244
EIGEN_DEVICE_FUNC Packet pmax(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:524
EIGEN_STRONG_INLINE Packet2d pset1< Packet2d >(const double &from)
Definition: PacketMath.h:872
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
Definition: PacketMath.h:827
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f ptanh< Packet4f >(const Packet4f &x)
Definition: MathFunctions.h:82
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:237
EIGEN_DEVICE_FUNC Packet pmin(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:512
static _EIGEN_DECLARE_CONST_Packet4f_FROM_INT(inv_mant_mask, ~0x7f800000)
EIGEN_STRONG_INLINE Packet4f pset1< Packet4f >(const float &from)
Definition: PacketMath.h:547
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f prsqrt< Packet4f >(const Packet4f &x)
Definition: MathFunctions.h:45
T generic_fast_tanh_float(const T &a_x)
Definition: MathFunctionsImpl.h:29
EIGEN_DEVICE_FUNC Packet psub(const Packet &a, const Packet &b)
Definition: GenericPacketMath.h:222
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f psqrt< Packet4f >(const Packet4f &x)
Definition: MathFunctions.h:105
__vector float Packet4f
Definition: PacketMath.h:30
static _EIGEN_DECLARE_CONST_Packet4f(1, 1.0f)
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f pexp< Packet4f >(const Packet4f &_x)
Definition: MathFunctions.h:26
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2d pexp< Packet2d >(const Packet2d &_x)
Definition: MathFunctions.h:326
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2d psqrt< Packet2d >(const Packet2d &x)
Definition: MathFunctions.h:110
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2d prsqrt< Packet2d >(const Packet2d &x)
Definition: MathFunctions.h:160
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pfloor(const Packet &a)
Definition: GenericPacketMath.h:830
v2u64 Packet2ul
Definition: PacketMath.h:822
static _EIGEN_DECLARE_CONST_Packet2d(1, 1.0)
Namespace containing all symbols from the Eigen library.
Definition: LDLT.h:16
Definition: document.h:416