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
>>
>

Reply via email to