Thanks for looking into it, that makes sense. I don't have a Pardiso setup, but looking at the code, I agree that it looks safe to remove. Perhaps you could try to ask on the Eigen Discord server, which gets more attention than the mailing list these days: https://discord.gg/YnYfJEg9
On Wed, Mar 23, 2022 at 7:35 PM Edward Lam <[email protected]> wrote: > Hi Rasmus, > > Actually, `p_null` gets initialized to an empty/nullptr array (in the > highest superclass [1]) which then gets converted to a nullptr that the > assignment checks for and ignores. I did a quick try by removing it which > seems to show it has no effect. However, I only have limited tests. > > Thanks, > -Edward > > 1. I had to step through the debugger to find it > > On Wed, Mar 23, 2022 at 8:15 PM Rasmus Munk Larsen <[email protected]> > wrote: > >> It looks like p_null is uninitialized, so it looks like undefined >> behavior to me, but I'm not entirely sure. Did you try to remove >> *.twistedby(p_null); >> ?* >> >> On Tue, Mar 22, 2022 at 2:03 PM Edward Lam <[email protected]> wrote: >> >>> Hi, >>> >>> At >>> https://gitlab.com/libeigen/eigen/-/blob/master/Eigen/src/PardisoSupport/PardisoSupport.h#L474 >>> (and also at line 538), we have code like this: >>> >>> void getMatrix(const MatrixType& matrix){ // PARDISO supports only upper, >>> row-major matrices PermutationMatrix<Dynamic,Dynamic,StorageIndex> p_null; >>> m_matrix.resize(matrix.rows(), matrix.cols()); m_matrix.template >>> selfadjointView<Upper>() = matrix.template >>> selfadjointView<UpLo>().twistedBy(p_null); m_matrix.makeCompressed();} >>> >>> As far as I can tell, the call to *twistedBy(p_null)* in the code is a >>> no-op right? Or does it serve some purpose that I'm missing? >>> >>> Thanks, >>> -Edward >>> >>
