mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Created the ptranspose packet primitive that can transpose an array of N packets, where N is the number of words in each packet. This primitive will be used to complete the vectorization of the gemm_pack_lhs and gemm_pack_rhs functions.
Implemented the primitive using SSE instructions.
This commit is contained in:
@@ -208,6 +208,18 @@ template<typename Scalar> void packetmath()
|
||||
ref[i] = data1[PacketSize-i-1];
|
||||
internal::pstore(data2, internal::preverse(internal::pload<Packet>(data1)));
|
||||
VERIFY(areApprox(ref, data2, PacketSize) && "internal::preverse");
|
||||
|
||||
internal::Kernel<Packet> kernel;
|
||||
for (int i=0; i<PacketSize; ++i) {
|
||||
kernel.packet[i] = internal::pload<Packet>(data1+i*PacketSize);
|
||||
}
|
||||
ptranspose(kernel);
|
||||
for (int i=0; i<PacketSize; ++i) {
|
||||
internal::pstore(data2, kernel.packet[i]);
|
||||
for (int j = 0; j < PacketSize; ++j) {
|
||||
VERIFY(isApproxAbs(data2[j], data1[i+j*PacketSize], refvalue));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<typename Scalar> void packetmath_real()
|
||||
|
||||
Reference in New Issue
Block a user