mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Get rid of pblend packet op.
There was only a single code path left in TensorEvaluator using pblend. We can replace that with a call to the more general TernarySelectOp and get rid of pblend entirely from Core. Closes #2998 See merge request libeigen/eigen!2056 Co-authored-by: Rasmus Munk Larsen <rmlarsen@google.com>
This commit is contained in:
@@ -747,22 +747,6 @@ void packetmath() {
|
||||
}
|
||||
}
|
||||
|
||||
if (PacketTraits::HasBlend) {
|
||||
Packet thenPacket = internal::pload<Packet>(data1);
|
||||
Packet elsePacket = internal::pload<Packet>(data2);
|
||||
EIGEN_ALIGN_MAX internal::Selector<PacketSize> selector;
|
||||
for (int i = 0; i < PacketSize; ++i) {
|
||||
selector.select[i] = i;
|
||||
}
|
||||
|
||||
Packet blend = internal::pblend(selector, thenPacket, elsePacket);
|
||||
EIGEN_ALIGN_MAX Scalar result[size];
|
||||
internal::pstore(result, blend);
|
||||
for (int i = 0; i < PacketSize; ++i) {
|
||||
VERIFY(test::isApproxAbs(result[i], (selector.select[i] ? data1[i] : data2[i]), refvalue));
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
for (int i = 0; i < PacketSize; ++i) {
|
||||
// "if" mask
|
||||
|
||||
Reference in New Issue
Block a user