mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Backport AVX512 implementation from devel branch to 3.3 (the 3.3 version had many issues)
This commit is contained in:
@@ -248,12 +248,13 @@ template<typename Scalar> void packetmath()
|
||||
VERIFY(isApproxAbs(ref[0], internal::predux(internal::pload<Packet>(data1)), refvalue) && "internal::predux");
|
||||
|
||||
{
|
||||
for (int i=0; i<4; ++i)
|
||||
int newsize = PacketSize>4?PacketSize/2:PacketSize;
|
||||
for (int i=0; i<newsize; ++i)
|
||||
ref[i] = 0;
|
||||
for (int i=0; i<PacketSize; ++i)
|
||||
ref[i%4] += data1[i];
|
||||
ref[i%newsize] += data1[i];
|
||||
internal::pstore(data2, internal::predux_downto4(internal::pload<Packet>(data1)));
|
||||
VERIFY(areApprox(ref, data2, PacketSize>4?PacketSize/2:PacketSize) && "internal::predux_downto4");
|
||||
VERIFY(areApprox(ref, data2, newsize) && "internal::predux_downto4");
|
||||
}
|
||||
|
||||
ref[0] = 1;
|
||||
@@ -304,7 +305,7 @@ template<typename Scalar> void packetmath()
|
||||
}
|
||||
}
|
||||
|
||||
if (PacketTraits::HasBlend || g_vectorize_sse) {
|
||||
if (PacketTraits::HasBlend) {
|
||||
// pinsertfirst
|
||||
for (int i=0; i<PacketSize; ++i)
|
||||
ref[i] = data1[i];
|
||||
@@ -314,7 +315,7 @@ template<typename Scalar> void packetmath()
|
||||
VERIFY(areApprox(ref, data2, PacketSize) && "internal::pinsertfirst");
|
||||
}
|
||||
|
||||
if (PacketTraits::HasBlend || g_vectorize_sse) {
|
||||
if (PacketTraits::HasBlend) {
|
||||
// pinsertlast
|
||||
for (int i=0; i<PacketSize; ++i)
|
||||
ref[i] = data1[i];
|
||||
|
||||
Reference in New Issue
Block a user