Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 5bf3f770 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Fix complex hermitian conversion test

parent b8979792
No related branches found
No related tags found
No related merge requests found
......@@ -160,11 +160,15 @@ z_spmConvertCSR2CSC( pastix_spm_t *spm )
{
/* Similar to PastixSymmetric case with conjugate of the values */
pastix_complex64_t *valptr = spm->values;
pastix_int_t i;
for(i=0; i<spm->nnz; i++, valptr++){
if (spm->rowptr[i] != spm->colptr[i]) {
*valptr = conj( *valptr );
pastix_int_t *colptr = spm->colptr;
pastix_int_t *rowptr = spm->rowptr;
pastix_int_t i, j;
for(i=0; i<spm->n; i++, rowptr++){
for(j=rowptr[0]; j<rowptr[1]; j++, colptr++, valptr++) {
if ( *colptr != i ) {
*valptr = conj( *valptr );
}
}
}
}
......
......@@ -51,11 +51,15 @@ z_spmConvertCSC2CSR( pastix_spm_t *spm )
{
/* Similar to PastixSymmetric case with conjugate of the values */
pastix_complex64_t *valptr = spm->values;
pastix_int_t i;
for(i=0; i<spm->nnz; i++, valptr++){
if (spm->rowptr[i] != spm->colptr[i]) {
*valptr = conj( *valptr );
pastix_int_t *colptr = spm->colptr;
pastix_int_t *rowptr = spm->rowptr;
pastix_int_t i, j;
for(j=0; j<spm->n; j++, colptr++){
for(i=colptr[0]; i<colptr[1]; i++, rowptr++, valptr++) {
if ( *rowptr != j ) {
*valptr = conj( *valptr );
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment