Thank you! Now rows < cols case is working fine.
> 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.value = Scalar(0);
llElements.index = i;
llElements.next = -1;
This would work for POD types I guess, but not for objects.
Would appreciate clarification.
> 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.