Re: [eigen] question about ploadu/pstoreu and alignment

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Actually, we are currently incrementing with respect to sizeof(Scalar), for instance for ploadu we have:

for (int offset=0; offset<PacketSize; ++offset)
{
  internal::pstore(data2, internal::ploadu<Packet>(data1+offset));
  VERIFY(areApprox(data1+offset, data2, PacketSize) && "internal::ploadu");
}

where data1 is a Scalar*, so data1+1 is actually incrementing the address by sizeof(Scalar).

Gael.



On Thu, Sep 18, 2014 at 4:24 PM, Konstantinos Margaritis <markos@xxxxxxxxxxx> wrote:
On Thu, 18 Sep 2014 17:12:55 +0300
Konstantinos Margaritis <markos@xxxxxxxxxxx> wrote:

> only word-alignment (ie move in steps of sizeof(Scalar) and not +1).

correction, I meant sizeof(int32_t) or sizeof(float), as Scalar can also
be double.





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/