Bug 689 - 'then' statement is equivalent to the 'else'
'then' statement is equivalent to the 'else'
Status: RESOLVED FIXED
Product: Eigen
Classification: Unclassified
Component: Core - matrix products
3.2
All All
: Normal Unknown
Assigned To: Nobody
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-26 17:42 UTC by maksqwe1
Modified: 2013-10-29 12:50 UTC (History)
1 user (show)



Attachments

Description maksqwe1 2013-10-26 17:42:34 UTC
Eigen/src/Core/products/GeneralMatrixVector.h 294:

if ((size_t(lhs0+alignedStart)%sizeof(LhsPacket))==0)
  for (Index i = alignedStart;i<alignedSize;i+=ResPacketSize)
    pstore(&res[i], pcj.pmadd(ploadu<LhsPacket>(&lhs0[i]), ptmp0, pload<ResPacket>(&res[i])));
else
  for (Index i = alignedStart;i<alignedSize;i+=ResPacketSize)
    pstore(&res[i], pcj.pmadd(ploadu<LhsPacket>(&lhs0[i]), ptmp0, pload<ResPacket>(&res[i])));

after this commit https://bitbucket.org/eigen/eigen/commits/38fe6a9428cb9e36dbc3b032660e1ac64bf29180
Comment 1 maksqwe1 2013-10-28 17:47:42 UTC
I am sorry that no written details.

Before that commit:
if ((size_t(lhs0+alignedStart)%sizeof(LhsPacket))==0)
  for (Index j = alignedStart;j<alignedSize;j+=ResPacketSize)
    ei_pstore(&res[j], pcj.pmadd(ei_pload<LhsPacket>(&lhs0[j]), ptmp0, ... <===
                                         ^
after:                              
    ei_pstore(&res[i], pcj.pmadd(ei_ploadu<LhsPacket>(&lhs0[i]), ptmp0, ...
                                         ^
Comment 2 Christoph Hertzberg 2013-10-29 12:50:23 UTC
Fixed in default and 3.2. Thanks for the report. It was clear from the first description, but we did not consider this very urgent. Basically, it only caused a small overhead. Unfortunately, those regressions are not caught by unit-tests.

https://bitbucket.org/eigen/eigen/commits/abccf5aa84bcf8a3e32e13c4701c11b4bcde89c4

Note You need to log in before you can comment on or make changes to this bug.