From 232f9040821db526d28b9d93aaeb45c907dbf06b Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Thu, 19 Mar 2020 17:24:06 +0000 Subject: Add shift_left and shift_right coefficient-wise unary Array functions --- Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h') diff --git a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h index 2b69512e3..4d9b3b44c 100644 --- a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +++ b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h @@ -25,7 +25,7 @@ pfrexp_float(const Packet& a, Packet& exponent) { const Packet cst_126f = pset1(126.0f); const Packet cst_half = pset1(0.5f); const Packet cst_inv_mant_mask = pset1frombits(~0x7f800000u); - exponent = psub(pcast(pshiftright<23>(preinterpret(a))), cst_126f); + exponent = psub(pcast(plogical_shift_right<23>(preinterpret(a))), cst_126f); return por(pand(a, cst_inv_mant_mask), cst_half); } @@ -36,7 +36,7 @@ pldexp_float(Packet a, Packet exponent) const Packet cst_127 = pset1(127.f); // return a * 2^exponent PacketI ei = pcast(padd(exponent, cst_127)); - return pmul(a, preinterpret(pshiftleft<23>(ei))); + return pmul(a, preinterpret(plogical_shift_left<23>(ei))); } // Natural logarithm @@ -466,8 +466,8 @@ Packet psincos_float(const Packet& _x) // Compute the sign to apply to the polynomial. // sin: sign = second_bit(y_int) xor signbit(_x) // cos: sign = second_bit(y_int+1) - Packet sign_bit = ComputeSine ? pxor(_x, preinterpret(pshiftleft<30>(y_int))) - : preinterpret(pshiftleft<30>(padd(y_int,csti_1))); + Packet sign_bit = ComputeSine ? pxor(_x, preinterpret(plogical_shift_left<30>(y_int))) + : preinterpret(plogical_shift_left<30>(padd(y_int,csti_1))); sign_bit = pand(sign_bit, cst_sign_mask); // clear all but left most bit // Get the polynomial selection mask from the second bit of y_int -- cgit v1.2.3