mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Prevent predux_half for DoublePacket from accidentally catching complex Packets of size >= 16
libeigen/eigen!2125
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
4d05fcf8da
commit
0ac2a2df9f
@@ -650,7 +650,9 @@ const DoublePacket<Packet>& predux_half(const DoublePacket<Packet>& a,
|
|||||||
|
|
||||||
template <typename Packet>
|
template <typename Packet>
|
||||||
DoublePacket<typename unpacket_traits<Packet>::half> predux_half(
|
DoublePacket<typename unpacket_traits<Packet>::half> predux_half(
|
||||||
const DoublePacket<Packet>& a, std::enable_if_t<unpacket_traits<Packet>::size == 16>* = 0) {
|
const DoublePacket<Packet>& a,
|
||||||
|
std::enable_if_t<unpacket_traits<Packet>::size >= 16 &&
|
||||||
|
!NumTraits<typename unpacket_traits<Packet>::type>::IsComplex>* = 0) {
|
||||||
// yes, that's pretty hackish :(
|
// yes, that's pretty hackish :(
|
||||||
DoublePacket<typename unpacket_traits<Packet>::half> res;
|
DoublePacket<typename unpacket_traits<Packet>::half> res;
|
||||||
typedef std::complex<typename unpacket_traits<Packet>::type> Cplx;
|
typedef std::complex<typename unpacket_traits<Packet>::type> Cplx;
|
||||||
|
|||||||
Reference in New Issue
Block a user