1 /* -------------------------------------------------------------------------- */ 2 /* Copyright (c) 2005-2012 by Timothy A. Davis, http://www.suitesparse.com. */ 3 /* All Rights Reserved. See ../Doc/License.txt for License. */ 4 /* -------------------------------------------------------------------------- */ 5 6 /* umf_dump.h: debugging definitions. */ 7 8 #ifndef NDEBUG 9 10 GLOBAL void UMF_dump_dense 11 ( 12 Entry *C, 13 Int dim, 14 Int m, 15 Int n 16 ) ; 17 18 GLOBAL void UMF_dump_element 19 ( 20 NumericType *Numeric, 21 WorkType *Work, 22 Int e, 23 Int clean 24 ) ; 25 26 GLOBAL void UMF_dump_rowcol 27 ( 28 Int dump_which, 29 NumericType *Numeric, 30 WorkType *Work, 31 Int dump_index, 32 Int check_degree 33 ) ; 34 35 GLOBAL void UMF_dump_matrix 36 ( 37 NumericType *Numeric, 38 WorkType *Work, 39 Int check_degree 40 ) ; 41 42 GLOBAL void UMF_dump_current_front 43 ( 44 NumericType *Numeric, 45 WorkType *Work, 46 Int check 47 ) ; 48 49 GLOBAL void UMF_dump_lu 50 ( 51 NumericType *Numeric 52 ) ; 53 54 GLOBAL void UMF_dump_memory 55 ( 56 NumericType *Numeric 57 ) ; 58 59 GLOBAL void UMF_dump_packed_memory 60 ( 61 NumericType *Numeric, 62 WorkType *Work 63 ) ; 64 65 GLOBAL void UMF_dump_col_matrix 66 ( 67 const double Ax [ ], 68 #ifdef COMPLEX 69 const double Az [ ], 70 #endif 71 const Int Ai [ ], 72 const Int Ap [ ], 73 Int n_row, 74 Int n_col, 75 Int nz 76 ) ; 77 78 GLOBAL void UMF_dump_chain 79 ( 80 Int frontid, 81 Int Front_parent [ ], 82 Int Front_npivcol [ ], 83 Int Front_nrows [ ], 84 Int Front_ncols [ ], 85 Int nfr 86 ) ; 87 88 GLOBAL void UMF_dump_rowmerge 89 ( 90 NumericType *Numeric, 91 SymbolicType *Symbolic, 92 WorkType *Work 93 ) ; 94 95 GLOBAL void UMF_dump_start 96 ( 97 void 98 ) ; 99 100 101 GLOBAL void UMF_dump_diagonal_map 102 ( 103 Int Diagonal_map [ ], 104 Int Diagonal_imap [ ], 105 Int nn 106 ) ; 107 108 #define UMF_DBMAX 50000 109 110 #ifndef EXTERN 111 #define EXTERN extern 112 #endif 113 114 GLOBAL EXTERN Int UMF_debug ; 115 GLOBAL EXTERN Int UMF_allocfail ; 116 GLOBAL EXTERN double UMF_gprob ; 117 118 #define DEBUGk(k,params) { if (UMF_debug >= (k)) { PRINTF (params) ; } } 119 120 #define DEBUGm4(params) DEBUGk (-4, params) 121 #define DEBUGm3(params) DEBUGk (-3, params) 122 #define DEBUGm2(params) DEBUGk (-2, params) 123 #define DEBUGm1(params) DEBUGk (-1, params) 124 #define DEBUG0(params) DEBUGk (0, params) 125 #define DEBUG1(params) DEBUGk (1, params) 126 #define DEBUG2(params) DEBUGk (2, params) 127 #define DEBUG3(params) DEBUGk (3, params) 128 #define DEBUG4(params) DEBUGk (4, params) 129 #define DEBUG5(params) DEBUGk (5, params) 130 #define DEBUG6(params) DEBUGk (6, params) 131 #define DEBUG7(params) DEBUGk (7, params) 132 #define DEBUG8(params) DEBUGk (8, params) 133 #define DEBUG9(params) DEBUGk (9, params) 134 135 #define EDEBUGk(k,a) { if (UMF_debug >= (k)) { PRINT_ENTRY (a) ; } } 136 137 #define EDEBUG0(a) EDEBUGk (0, a) 138 #define EDEBUG1(a) EDEBUGk (1, a) 139 #define EDEBUG2(a) EDEBUGk (2, a) 140 #define EDEBUG3(a) EDEBUGk (3, a) 141 #define EDEBUG4(a) EDEBUGk (4, a) 142 #define EDEBUG5(a) EDEBUGk (5, a) 143 #define EDEBUG6(a) EDEBUGk (6, a) 144 #define EDEBUG7(a) EDEBUGk (7, a) 145 #define EDEBUG8(a) EDEBUGk (8, a) 146 #define EDEBUG9(a) EDEBUGk (9, a) 147 148 /* ASSERT defined in amd_dump.h */ 149 150 #else 151 152 /* ========================================================================== */ 153 /* === No debugging ========================================================= */ 154 /* ========================================================================== */ 155 156 /* turn off all debugging macros */ 157 158 #define DEBUGk(k,params) 159 160 #define DEBUGm4(params) 161 #define DEBUGm3(params) 162 #define DEBUGm2(params) 163 #define DEBUGm1(params) 164 #define DEBUG0(params) 165 #define DEBUG1(params) 166 #define DEBUG2(params) 167 #define DEBUG3(params) 168 #define DEBUG4(params) 169 #define DEBUG5(params) 170 #define DEBUG6(params) 171 #define DEBUG7(params) 172 #define DEBUG8(params) 173 #define DEBUG9(params) 174 175 #define EDEBUGk(k,a) 176 177 #define EDEBUG0(a) 178 #define EDEBUG1(a) 179 #define EDEBUG2(a) 180 #define EDEBUG3(a) 181 #define EDEBUG4(a) 182 #define EDEBUG5(a) 183 #define EDEBUG6(a) 184 #define EDEBUG7(a) 185 #define EDEBUG8(a) 186 #define EDEBUG9(a) 187 188 #endif /* NDEBUG */ 189