Fixed the CSC to CSR conversion for KLU matrix-vector multiplication

This commit is contained in:
Francesco Lannutti 2016-06-30 22:43:31 +02:00 committed by rlar
parent 74b6460326
commit 48114b1e40
1 changed files with 9 additions and 1 deletions

View File

@ -72,8 +72,16 @@ KLU_convert_matrix_in_CSR /* return TRUE if successful, FALSE otherwise
return (FALSE) ;
}
if (Ap_CSC == NULL || Ai_CSC == NULL || Ax_CSC == NULL || Ap_CSR == NULL || Ai_CSR == NULL || Ax_CSR == NULL)
if (Ap_CSC != NULL)
{
if (Ai_CSC == NULL || Ax_CSC == NULL)
{
Ap_CSR [0] = 0 ;
Ap_CSR [1] = 0 ;
Common->status = KLU_OK ;
return (TRUE) ;
}
} else {
Common->status = KLU_INVALID ;
return (FALSE) ;
}