diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2020-12-03 14:32:45 -0800 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2020-12-03 14:32:45 -0800 |
commit | f23dc5b971d1c11bc0fcb7068788a30e4bd7cbf1 (patch) | |
tree | daf4488df55322bc0840f2c75cb38f3884c4141c /test/packetmath.cpp | |
parent | 4d91519a9be061da5d300079fca17dd0b9328050 (diff) |
Revert "Add log2() operator to Eigen"
This reverts commit 4d91519a9be061da5d300079fca17dd0b9328050.
Diffstat (limited to 'test/packetmath.cpp')
-rw-r--r-- | test/packetmath.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/test/packetmath.cpp b/test/packetmath.cpp index d995e8b71..ae0ead820 100644 --- a/test/packetmath.cpp +++ b/test/packetmath.cpp @@ -488,13 +488,6 @@ void packetmath() { packetmath_minus_zero_add<Scalar, Packet>(); } -// Notice that this definition works for complex types as well. -// c++11 has std::log2 for real, but not for complex types. -template <typename Scalar> -Scalar log2(Scalar x) { - return Scalar(M_LOG2E) * std::log(x); -} - template <typename Scalar, typename Packet> void packetmath_real() { typedef internal::packet_traits<Scalar> PacketTraits; @@ -513,7 +506,6 @@ void packetmath_real() { if (internal::random<float>(0, 1) < 0.1f) data1[internal::random<int>(0, PacketSize)] = Scalar(0); CHECK_CWISE1_IF(PacketTraits::HasLog, std::log, internal::plog); - CHECK_CWISE1_IF(PacketTraits::HasLog, log2, internal::plog2); CHECK_CWISE1_IF(PacketTraits::HasRsqrt, 1 / std::sqrt, internal::prsqrt); for (int i = 0; i < size; ++i) { |