1 #include "BSprivate.h" 2 3 /*@ BSsave_diag - Copy the diagonal of A into special storage in A 4 5 Input Parameters: 6 . A - a sparse matrix 7 . procinfo - the usual processor stuff 8 9 Output Parameters: 10 . A - a sparse matrix with the diagonal saved 11 12 Returns: 13 void 14 15 @*/ BSsave_diag(BSpar_mat * A,BSprocinfo * procinfo)16void BSsave_diag(BSpar_mat *A, BSprocinfo *procinfo) 17 { 18 19 if (A->save_diag == NULL) { 20 MY_MALLOC(A->save_diag,(FLOAT *),sizeof(FLOAT)*A->num_rows,1); 21 } 22 BSget_diag(A,A->save_diag,procinfo); CHKERR(0); 23 } 24