1 #include "BSprivate.h"
2 
3 /*@ BSfactor - Compute the incomplete factor of a matrix
4 
5     Input Parameters:
6 .   A - The sparse matrix to be factored
7 .   comm - the communication structure of the factoring
8 .   procinfo - the usual processor info
9 
10     Output Parameters:
11 .   A - The factored sparse matrix
12 
13     Returns:
14     0 if successful, otherwise a negative number whose absolute
15     value is the row number of the color (less one) where the
16     failure occured.
17 
18  @*/
BSfactor(BSpar_mat * A,BScomm * comm,BSprocinfo * procinfo)19 int BSfactor(BSpar_mat *A, BScomm *comm, BSprocinfo *procinfo)
20 {
21 	if (A->icc_storage) {
22 		if (procinfo->single) {
23 			return(BSfactor1(A,comm,procinfo));
24 		} else {
25 			return(BSfactorn(A,comm,procinfo));
26 		}
27 	} else {
28 		if (procinfo->single) {
29 			return(BSilu_factor1(A,comm,procinfo));
30 		} else {
31 			return(BSilu_factorn(A,comm,procinfo));
32 		}
33 	}
34 }
35