Re: [eigen] HouseholderQR bug??

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


      ei_assert( ((!(ei_traits<Derived>::Flags&AlignedBit))
                  || ((size_t(m_data)&0xf)==0)) && "data is not aligned");

Note the ! here

By the way, we should rewrite this using EIGEN_IMPLIES...

So what error exactly do you get? For me, this program works:

#include <Eigen/Core>
#include <iostream>

using namespace Eigen;
using namespace std;

int main()
{
  double *array;
  typedef Matrix<double,1,Dynamic,1,1,Dynamic> T;
  Map<T> m0(array, 1024);
  Map<T> m1(array+1, 1024);
}

Benoit

2010/4/26 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
> For me
>
> MapBase< Map< Matrix<double,1,Dynamic,1,1,Dynamic>,0, Stride<0,0> >
>>::checkSanity()
>
> is failing and there it seems as if alignment is required.
>
> - Hauke
>
> On Mon, Apr 26, 2010 at 1:48 PM, Benoit Jacob <jacob.benoit.1@xxxxxxxxx> wrote:
>> Map does not assume aligned by default. Unless you pass the Aligned
>> option, the pointer is not required to be aligned.
>>
>> Benoit
>>
>> 2010/4/26 Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
>>> Hi,
>>>
>>> I am trying to trace down the std::vector issue and stumbled over the following.
>>>
>>> In HouseholderQR line 220, applyHouseholderOnTheLeft(...) is called
>>> with this raw pointer
>>>
>>>  &m_temp.coeffRef(k+1)
>>>
>>> which is mapped as
>>>
>>> Map<typename ei_plain_row_type<PlainObject>::type> tmp(workspace,cols());
>>>
>>> and results in unaligned data because even if m_temp is aligned,
>>> m_temp.getData()+1 is not necessarily.
>>>
>>> How do we fix this? This does not help - I always thought it were
>>> affecting the Flags property
>>>
>>> Map<typename ei_plain_row_type<PlainObject>::type, Unaligned>
>>> tmp(workspace,cols());
>>>
>>> - Hauke
>>>
>>>
>>>
>>
>>
>>
>
>
>



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