#include "BSprivate.h"

/*@ BSsave_diag - Copy the diagonal of A into special storage in A

    Input Parameters:
.   A - a sparse matrix
.   procinfo - the usual processor stuff

    Output Parameters:
.   A - a sparse matrix with the diagonal saved

    Returns:
    void

 @*/
void BSsave_diag(BSpar_mat *A, BSprocinfo *procinfo)
{

	if (A->save_diag == NULL) {
		MY_MALLOC(A->save_diag,(FLOAT *),sizeof(FLOAT)*A->num_rows,1);
	}
	BSget_diag(A,A->save_diag,procinfo); CHKERR(0);
}


syntax highlighted by Code2HTML, v. 0.9.1