Thank you! Now rows < cols case is working fine.
I.
> Regarding AmbiVector, replacing allocations by operator new with malloc, plus a few inplace construct and destruct should do the job.
I thought this too. However the biggest problem I found - is in idea of AmbiVector itself.
It seems that Scalar* m_buffer is used to store structs of ListEl type in sparse case.
There are many places with:
ListEl* EIGEN_RESTRICT llElements = reinterpret_cast<ListEl*>(m_buffer);
...
llElements[0].value = Scalar(0);
llElements[0].index = i;
llElements[0].next = -1;
This would work for POD types I guess, but not for objects.
Would appreciate clarification.
II. > I guess you compiled with -DNDEBUG
Actually, I am using debug mode, asserts are popping up for other cases, but not for the out-of-bounds accesses in SparseQR.
Still out of bounds accesses are detected even for rows >= cols and with recent changes you made.
Maybe ICC is going crazy or something, but it doesn't show such problems for SparseLU & LDLT.
***