Improve pow(x,y): 25% speedup, increase accuracy for integer exponents.

This commit is contained in:
Rasmus Munk Larsen
2024-11-26 06:13:48 +00:00
parent 8ad4344ca7
commit 1ea61a5d26
2 changed files with 50 additions and 78 deletions

View File

@@ -194,7 +194,7 @@ struct is_half {
static constexpr int Size = unpacket_traits<Packet>::size;
using DefaultPacket = typename packet_traits<Scalar>::type;
static constexpr int DefaultSize = unpacket_traits<DefaultPacket>::size;
static constexpr bool value = Size < DefaultSize;
static constexpr bool value = Size != 1 && Size < DefaultSize;
};
template <typename Src, typename Tgt>