mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Make TernarySelectOp immune to const differences.
See merge request libeigen/eigen!2058 Co-authored-by: Rasmus Munk Larsen <rmlarsen@google.com>
This commit is contained in:
@@ -789,7 +789,7 @@ struct TensorEvaluator<const TensorSelectOp<IfArgType, ThenArgType, ElseArgType>
|
||||
|
||||
template <int LoadMode, bool UseTernary = TernaryPacketAccess, std::enable_if_t<!UseTernary, bool> = true>
|
||||
EIGEN_DEVICE_FUNC PacketReturnType packet(Index index) const {
|
||||
Scalar arr[PacketSize];
|
||||
std::remove_const_t<Scalar> arr[PacketSize];
|
||||
EIGEN_UNROLL_LOOP
|
||||
for (Index i = 0; i < PacketSize; ++i) {
|
||||
arr[i] = m_condImpl.coeff(index + i) ? Scalar(-1) : Scalar(0);
|
||||
|
||||
Reference in New Issue
Block a user