1 /* ========================================================================== */
2 /* === umf_version.h ======================================================== */
3 /* ========================================================================== */
4 
5 /* -------------------------------------------------------------------------- */
6 /* Copyright (c) 2005-2012 by Timothy A. Davis, http://www.suitesparse.com.   */
7 /* All Rights Reserved.  See ../Doc/License.txt for License.                  */
8 /* -------------------------------------------------------------------------- */
9 
10 /*
11    Define routine names, depending on version being compiled.
12 
13    DINT:	double precision, int's as integers
14    DLONG:	double precision, SuiteSparse_long's as integers
15    ZLONG:	complex double precision, SuiteSparse_long's as integers
16    ZINT:	complex double precision, int's as integers
17 */
18 
19 /* Set DINT as the default, if nothing is defined */
20 #if !defined (DLONG) && !defined (DINT) && !defined (ZLONG) && !defined (ZINT)
21 #define DINT
22 #endif
23 
24 /* Determine if this is a real or complex version */
25 #if defined (ZLONG) || defined (ZINT)
26 #define COMPLEX
27 #endif
28 
29 /* -------------------------------------------------------------------------- */
30 /* integer type (Int is int or SuiteSparse_long) defined in amd_internal.h */
31 /* -------------------------------------------------------------------------- */
32 
33 #if defined (DLONG) || defined (ZLONG)
34 #define LONG_INTEGER
35 #endif
36 
37 /* -------------------------------------------------------------------------- */
38 /* Numerical relop macros for correctly handling the NaN case */
39 /* -------------------------------------------------------------------------- */
40 
41 /*
42 SCALAR_IS_NAN(x):
43     True if x is NaN.  False otherwise.  The commonly-existing isnan(x)
44     function could be used, but it's not in Kernighan & Ritchie 2nd edition
45     (ANSI C).  It may appear in <math.h>, but I'm not certain about
46     portability.  The expression x != x is true if and only if x is NaN,
47     according to the IEEE 754 floating-point standard.
48 
49 SCALAR_IS_ZERO(x):
50     True if x is zero.  False if x is nonzero, NaN, or +/- Inf.
51     This is (x == 0) if the compiler is IEEE 754 compliant.
52 
53 SCALAR_IS_NONZERO(x):
54     True if x is nonzero, NaN, or +/- Inf.  False if x zero.
55     This is (x != 0) if the compiler is IEEE 754 compliant.
56 
57 SCALAR_IS_LTZERO(x):
58     True if x is < zero or -Inf.  False if x is >= 0, NaN, or +Inf.
59     This is (x < 0) if the compiler is IEEE 754 compliant.
60 */
61 
62 #if defined (UMF_WINDOWS) && !defined (MATHWORKS)
63 
64 /* Yes, this is exceedingly ugly.  Blame Microsoft, which hopelessly */
65 /* violates the IEEE 754 floating-point standard in a bizarre way. */
66 /* If you're using an IEEE 754-compliant compiler, then x != x is true */
67 /* iff x is NaN.  For Microsoft, (x < x) is true iff x is NaN. */
68 /* So either way, this macro safely detects a NaN. */
69 #define SCALAR_IS_NAN(x)	(((x) != (x)) || (((x) < (x))))
70 #define SCALAR_IS_ZERO(x)	(((x) == 0.) && !SCALAR_IS_NAN(x))
71 #define SCALAR_IS_NONZERO(x)	(((x) != 0.) || SCALAR_IS_NAN(x))
72 #define SCALAR_IS_LTZERO(x)	(((x) < 0.) && !SCALAR_IS_NAN(x))
73 
74 #else
75 
76 /* These all work properly, according to the IEEE 754 standard ... except on */
77 /* a PC with windows.  Works fine in Linux on the same PC... */
78 #define SCALAR_IS_NAN(x)	((x) != (x))
79 #define SCALAR_IS_ZERO(x)	((x) == 0.)
80 #define SCALAR_IS_NONZERO(x)	((x) != 0.)
81 #define SCALAR_IS_LTZERO(x)	((x) < 0.)
82 
83 #endif
84 
85 /* scalar absolute value macro. If x is NaN, the result is NaN: */
86 #define SCALAR_ABS(x) ((SCALAR_IS_LTZERO (x)) ? -(x) : (x))
87 
88 /* true if an integer (stored in double x) would overflow (or if x is NaN) */
89 #define INT_OVERFLOW(x) ((!((x) * (1.0+1e-8) <= (double) Int_MAX)) \
90 			|| SCALAR_IS_NAN (x))
91 
92 /* print a scalar (avoid printing "-0" for negative zero).  */
93 #define PRINT_SCALAR(a) \
94 { \
95     if (SCALAR_IS_NONZERO (a)) \
96     { \
97 	PRINTF ((" (%g)", (a))) ; \
98     } \
99     else \
100     { \
101 	PRINTF ((" (0)")) ; \
102     } \
103 }
104 
105 /* -------------------------------------------------------------------------- */
106 /* Real floating-point arithmetic */
107 /* -------------------------------------------------------------------------- */
108 
109 #ifndef COMPLEX
110 
111 #define Entry double
112 
113 #define SPLIT(s)    		    (1)
114 #define REAL_COMPONENT(c)	    (c)
115 #define IMAG_COMPONENT(c)	    (0.)
116 #define ASSIGN(c,s1,s2,p,split)	    { (c) = (s1)[p] ; }
117 #define CLEAR(c)		    { (c) = 0. ; }
118 #define CLEAR_AND_INCREMENT(p)	    { *p++ = 0. ; }
119 #define IS_NAN(a)		    SCALAR_IS_NAN (a)
120 #define IS_ZERO(a)		    SCALAR_IS_ZERO (a)
121 #define IS_NONZERO(a)		    SCALAR_IS_NONZERO (a)
122 #define SCALE_DIV(c,s)		    { (c) /= (s) ; }
123 #define SCALE(c,s)		    { (c) *= (s) ; }
124 #define ASSEMBLE(c,a)		    { (c) += (a) ; }
125 #define ASSEMBLE_AND_INCREMENT(c,p) { (c) += *p++ ; }
126 #define DECREMENT(c,a)		    { (c) -= (a) ; }
127 #define MULT(c,a,b)		    { (c) = (a) * (b) ; }
128 #define MULT_CONJ(c,a,b)	    { (c) = (a) * (b) ; }
129 #define MULT_SUB(c,a,b)		    { (c) -= (a) * (b) ; }
130 #define MULT_SUB_CONJ(c,a,b)	    { (c) -= (a) * (b) ; }
131 #define DIV(c,a,b)		    { (c) = (a) / (b) ; }
132 #define DIV_CONJ(c,a,b)		    { (c) = (a) / (b) ; }
133 #define APPROX_ABS(s,a)		    { (s) = SCALAR_ABS (a) ; }
134 #define ABS(s,a)		    { (s) = SCALAR_ABS (a) ; }
135 #define PRINT_ENTRY(a)		    PRINT_SCALAR (a)
136 
137 /* for flop counts */
138 #define MULTSUB_FLOPS	2.	/* c -= a*b */
139 #define DIV_FLOPS	1.	/* c = a/b */
140 #define ABS_FLOPS	0.	/* c = abs (a) */
141 #define ASSEMBLE_FLOPS	1.	/* c += a */
142 #define DECREMENT_FLOPS	1.	/* c -= a */
143 #define MULT_FLOPS	1.	/* c = a*b */
144 #define SCALE_FLOPS	1.	/* c = a/s */
145 
146 #else
147 
148 /* -------------------------------------------------------------------------- */
149 /* Complex floating-point arithmetic */
150 /* -------------------------------------------------------------------------- */
151 
152 /*
153     Note:  An alternative to this DoubleComplex type would be to use a
154     struct { double r ; double i ; }.  The problem with that method
155     (used by the Sun Performance Library, for example) is that ANSI C provides
156     no guarantee about the layout of a struct.  It is possible that the sizeof
157     the struct above would be greater than 2 * sizeof (double).  This would
158     mean that the complex BLAS could not be used.  The method used here avoids
159     that possibility.  ANSI C *does* guarantee that an array of structs has
160     the same size as n times the size of one struct.
161 
162     The ANSI C99 version of the C language includes a "double _Complex" type.
163     It should be possible in that case to do the following:
164 
165     #define Entry double _Complex
166 
167     and remove the DoubleComplex struct.  The macros, below, could then be
168     replaced with instrinsic operators.  Note that the #define Real and
169     #define Imag should also be removed (they only appear in this file).
170 
171     For the MULT, MULT_SUB, MULT_SUB_CONJ, and MULT_CONJ macros,
172     the output argument c cannot be the same as any input argument.
173 
174 */
175 
176 typedef struct
177 {
178     double component [2] ;	/* real and imaginary parts */
179 
180 } DoubleComplex ;
181 
182 #define Entry DoubleComplex
183 #define Real component [0]
184 #define Imag component [1]
185 
186 /* for flop counts */
187 #define MULTSUB_FLOPS	8.	/* c -= a*b */
188 #define DIV_FLOPS	9.	/* c = a/b */
189 #define ABS_FLOPS	6.	/* c = abs (a), count sqrt as one flop */
190 #define ASSEMBLE_FLOPS	2.	/* c += a */
191 #define DECREMENT_FLOPS	2.	/* c -= a */
192 #define MULT_FLOPS	6.	/* c = a*b */
193 #define SCALE_FLOPS	2.	/* c = a/s or c = a*s */
194 
195 /* -------------------------------------------------------------------------- */
196 
197 /* real part of c */
198 #define REAL_COMPONENT(c) ((c).Real)
199 
200 /* -------------------------------------------------------------------------- */
201 
202 /* imag part of c */
203 #define IMAG_COMPONENT(c) ((c).Imag)
204 
205 /* -------------------------------------------------------------------------- */
206 
207 /* Return TRUE if a complex number is in split form, FALSE if in packed form */
208 #define SPLIT(sz) ((sz) != (double *) NULL)
209 
210 /* -------------------------------------------------------------------------- */
211 
212 /* c = (s1) + (s2)*i, if s2 is null, then X is in "packed" format (compatible
213  * with Entry and ANSI C99 double _Complex type).  */
214 #define ASSIGN(c,s1,s2,p,split)	\
215 { \
216     if (split) \
217     { \
218         (c).Real = (s1)[p] ; \
219         (c).Imag = (s2)[p] ; \
220     }  \
221     else \
222     { \
223  	(c) = ((Entry *)(s1))[p] ; \
224     }  \
225 }
226 
227 /* -------------------------------------------------------------------------- */
228 
229 /* c = 0 */
230 #define CLEAR(c) \
231 { \
232     (c).Real = 0. ; \
233     (c).Imag = 0. ; \
234 }
235 
236 /* -------------------------------------------------------------------------- */
237 
238 /* *p++ = 0 */
239 #define CLEAR_AND_INCREMENT(p) \
240 { \
241     p->Real = 0. ; \
242     p->Imag = 0. ; \
243     p++ ; \
244 }
245 
246 /* -------------------------------------------------------------------------- */
247 
248 /* True if a == 0 */
249 #define IS_ZERO(a) \
250     (SCALAR_IS_ZERO ((a).Real) && SCALAR_IS_ZERO ((a).Imag))
251 
252 /* -------------------------------------------------------------------------- */
253 
254 /* True if a is NaN */
255 #define IS_NAN(a) \
256     (SCALAR_IS_NAN ((a).Real) || SCALAR_IS_NAN ((a).Imag))
257 
258 /* -------------------------------------------------------------------------- */
259 
260 /* True if a != 0 */
261 #define IS_NONZERO(a) \
262     (SCALAR_IS_NONZERO ((a).Real) || SCALAR_IS_NONZERO ((a).Imag))
263 
264 /* -------------------------------------------------------------------------- */
265 
266 /* c /= s */
267 #define SCALE_DIV(c,s) \
268 { \
269     (c).Real /= (s) ; \
270     (c).Imag /= (s) ; \
271 }
272 
273 /* -------------------------------------------------------------------------- */
274 
275 /* c *= s */
276 #define SCALE(c,s) \
277 { \
278     (c).Real *= (s) ; \
279     (c).Imag *= (s) ; \
280 }
281 
282 /* -------------------------------------------------------------------------- */
283 
284 /* c += a */
285 #define ASSEMBLE(c,a) \
286 { \
287     (c).Real += (a).Real ; \
288     (c).Imag += (a).Imag ; \
289 }
290 
291 /* -------------------------------------------------------------------------- */
292 
293 /* c += *p++ */
294 #define ASSEMBLE_AND_INCREMENT(c,p) \
295 { \
296     (c).Real += p->Real ; \
297     (c).Imag += p->Imag ; \
298     p++ ; \
299 }
300 
301 /* -------------------------------------------------------------------------- */
302 
303 /* c -= a */
304 #define DECREMENT(c,a) \
305 { \
306     (c).Real -= (a).Real ; \
307     (c).Imag -= (a).Imag ; \
308 }
309 
310 /* -------------------------------------------------------------------------- */
311 
312 /* c = a*b, assert because c cannot be the same as a or b */
313 #define MULT(c,a,b) \
314 { \
315     ASSERT (&(c) != &(a) && &(c) != &(b)) ; \
316     (c).Real = (a).Real * (b).Real - (a).Imag * (b).Imag ; \
317     (c).Imag = (a).Imag * (b).Real + (a).Real * (b).Imag ; \
318 }
319 
320 /* -------------------------------------------------------------------------- */
321 
322 /* c = a*conjugate(b), assert because c cannot be the same as a or b */
323 #define MULT_CONJ(c,a,b) \
324 { \
325     ASSERT (&(c) != &(a) && &(c) != &(b)) ; \
326     (c).Real = (a).Real * (b).Real + (a).Imag * (b).Imag ; \
327     (c).Imag = (a).Imag * (b).Real - (a).Real * (b).Imag ; \
328 }
329 
330 /* -------------------------------------------------------------------------- */
331 
332 /* c -= a*b, assert because c cannot be the same as a or b */
333 #define MULT_SUB(c,a,b) \
334 { \
335     ASSERT (&(c) != &(a) && &(c) != &(b)) ; \
336     (c).Real -= (a).Real * (b).Real - (a).Imag * (b).Imag ; \
337     (c).Imag -= (a).Imag * (b).Real + (a).Real * (b).Imag ; \
338 }
339 
340 /* -------------------------------------------------------------------------- */
341 
342 /* c -= a*conjugate(b), assert because c cannot be the same as a or b */
343 #define MULT_SUB_CONJ(c,a,b) \
344 { \
345     ASSERT (&(c) != &(a) && &(c) != &(b)) ; \
346     (c).Real -= (a).Real * (b).Real + (a).Imag * (b).Imag ; \
347     (c).Imag -= (a).Imag * (b).Real - (a).Real * (b).Imag ; \
348 }
349 
350 /* -------------------------------------------------------------------------- */
351 
352 /* c = a/b, using function pointer */
353 #define DIV(c,a,b) \
354 { \
355     (void) SuiteSparse_config.divcomplex_func \
356         ((a).Real, (a).Imag, (b).Real, (b).Imag, \
357 	&((c).Real), &((c).Imag)) ; \
358 }
359 
360 /* -------------------------------------------------------------------------- */
361 
362 /* c = a/conjugate(b), using function pointer */
363 #define DIV_CONJ(c,a,b) \
364 { \
365     (void) SuiteSparse_config.divcomplex_func \
366         ((a).Real, (a).Imag, (b).Real, (-(b).Imag), \
367 	&((c).Real), &((c).Imag)) ; \
368 }
369 
370 /* -------------------------------------------------------------------------- */
371 
372 /* approximate absolute value, s = |r|+|i| */
373 #define APPROX_ABS(s,a) \
374 { \
375     (s) = SCALAR_ABS ((a).Real) + SCALAR_ABS ((a).Imag) ; \
376 }
377 
378 /* -------------------------------------------------------------------------- */
379 
380 /* exact absolute value, s = sqrt (a.real^2 + a.imag^2) */
381 #define ABS(s,a) \
382 { \
383     (s) = SuiteSparse_config.hypot_func ((a).Real, (a).Imag) ; \
384 }
385 
386 /* -------------------------------------------------------------------------- */
387 
388 /* print an entry (avoid printing "-0" for negative zero).  */
389 #define PRINT_ENTRY(a) \
390 { \
391     if (SCALAR_IS_NONZERO ((a).Real)) \
392     { \
393 	PRINTF ((" (%g", (a).Real)) ; \
394     } \
395     else \
396     { \
397 	PRINTF ((" (0")) ; \
398     } \
399     if (SCALAR_IS_LTZERO ((a).Imag)) \
400     { \
401 	PRINTF ((" - %gi)", -(a).Imag)) ; \
402     } \
403     else if (SCALAR_IS_ZERO ((a).Imag)) \
404     { \
405 	PRINTF ((" + 0i)")) ; \
406     } \
407     else \
408     { \
409 	PRINTF ((" + %gi)", (a).Imag)) ; \
410     } \
411 }
412 
413 /* -------------------------------------------------------------------------- */
414 
415 #endif	/* #ifndef COMPLEX */
416 
417 /* -------------------------------------------------------------------------- */
418 /* Double precision, with int's as integers */
419 /* -------------------------------------------------------------------------- */
420 
421 #ifdef DINT
422 
423 #define UMF_analyze		 umf_i_analyze
424 #define UMF_apply_order		 umf_i_apply_order
425 #define UMF_assemble		 umfdi_assemble
426 #define UMF_assemble_fixq	 umfdi_assemble_fixq
427 #define UMF_blas3_update	 umfdi_blas3_update
428 #define UMF_build_tuples	 umfdi_build_tuples
429 #define UMF_build_tuples_usage	 umfdi_build_tuples_usage
430 #define UMF_colamd		 umf_i_colamd
431 #define UMF_colamd_set_defaults	 umf_i_colamd_set_defaults
432 #define UMF_create_element	 umfdi_create_element
433 #define UMF_extend_front	 umfdi_extend_front
434 #define UMF_free		 umf_i_free
435 #define UMF_fsize		 umf_i_fsize
436 #define UMF_garbage_collection	 umfdi_garbage_collection
437 #define UMF_get_memory		 umfdi_get_memory
438 #define UMF_grow_front		 umfdi_grow_front
439 #define UMF_init_front		 umfdi_init_front
440 #define UMF_is_permutation	 umf_i_is_permutation
441 #define UMF_kernel		 umfdi_kernel
442 #define UMF_kernel_init		 umfdi_kernel_init
443 #define UMF_kernel_init_usage	 umfdi_kernel_init_usage
444 #define UMF_kernel_wrapup	 umfdi_kernel_wrapup
445 #define UMF_local_search	 umfdi_local_search
446 #define UMF_lsolve		 umfdi_lsolve
447 #define UMF_ltsolve		 umfdi_ltsolve
448 #define UMF_lhsolve		 umfdi_lhsolve
449 #define UMF_malloc		 umf_i_malloc
450 #define UMF_mem_alloc_element	 umfdi_mem_alloc_element
451 #define UMF_mem_alloc_head_block umfdi_mem_alloc_head_block
452 #define UMF_mem_alloc_tail_block umfdi_mem_alloc_tail_block
453 #define UMF_mem_free_tail_block	 umfdi_mem_free_tail_block
454 #define UMF_mem_init_memoryspace umfdi_mem_init_memoryspace
455 #define UMF_realloc		 umf_i_realloc
456 #define UMF_report_perm		 umf_i_report_perm
457 #define UMF_report_vector	 umfdi_report_vector
458 #define UMF_row_search		 umfdi_row_search
459 #define UMF_scale		 umfdi_scale
460 #define UMF_scale_column	 umfdi_scale_column
461 #define UMF_set_stats		 umf_i_set_stats
462 #define UMF_singletons		 umf_i_singletons
463 #define UMF_solve		 umfdi_solve
464 #define UMF_start_front		 umfdi_start_front
465 #define UMF_store_lu		 umfdi_store_lu
466 #define UMF_store_lu_drop	 umfdi_store_lu_drop
467 #define UMF_symbolic_usage	 umfdi_symbolic_usage
468 #define UMF_transpose		 umfdi_transpose
469 #define UMF_tuple_lengths	 umfdi_tuple_lengths
470 #define UMF_usolve		 umfdi_usolve
471 #define UMF_utsolve		 umfdi_utsolve
472 #define UMF_uhsolve		 umfdi_uhsolve
473 #define UMF_valid_numeric	 umfdi_valid_numeric
474 #define UMF_valid_symbolic	 umfdi_valid_symbolic
475 #define UMF_triplet_map_x	 umfdi_triplet_map_x
476 #define UMF_triplet_map_nox	 umfdi_triplet_map_nox
477 #define UMF_triplet_nomap_x	 umfdi_triplet_nomap_x
478 #define UMF_triplet_nomap_nox	 umfdi_triplet_nomap_nox
479 #define UMF_cholmod		 umf_i_cholmod
480 
481 #define UMFPACK_col_to_triplet	 umfpack_di_col_to_triplet
482 #define UMFPACK_defaults	 umfpack_di_defaults
483 #define UMFPACK_free_numeric	 umfpack_di_free_numeric
484 #define UMFPACK_free_symbolic	 umfpack_di_free_symbolic
485 #define UMFPACK_get_lunz	 umfpack_di_get_lunz
486 #define UMFPACK_get_numeric	 umfpack_di_get_numeric
487 #define UMFPACK_get_symbolic	 umfpack_di_get_symbolic
488 #define UMFPACK_get_determinant	 umfpack_di_get_determinant
489 #define UMFPACK_numeric		 umfpack_di_numeric
490 #define UMFPACK_qsymbolic	 umfpack_di_qsymbolic
491 #define UMFPACK_fsymbolic	 umfpack_di_fsymbolic
492 #define UMFPACK_report_control	 umfpack_di_report_control
493 #define UMFPACK_report_info	 umfpack_di_report_info
494 #define UMFPACK_report_matrix	 umfpack_di_report_matrix
495 #define UMFPACK_report_numeric	 umfpack_di_report_numeric
496 #define UMFPACK_report_perm	 umfpack_di_report_perm
497 #define UMFPACK_report_status	 umfpack_di_report_status
498 #define UMFPACK_report_symbolic	 umfpack_di_report_symbolic
499 #define UMFPACK_report_triplet	 umfpack_di_report_triplet
500 #define UMFPACK_report_vector	 umfpack_di_report_vector
501 #define UMFPACK_save_numeric	 umfpack_di_save_numeric
502 #define UMFPACK_save_symbolic	 umfpack_di_save_symbolic
503 #define UMFPACK_load_numeric	 umfpack_di_load_numeric
504 #define UMFPACK_load_symbolic	 umfpack_di_load_symbolic
505 #define UMFPACK_scale		 umfpack_di_scale
506 #define UMFPACK_solve		 umfpack_di_solve
507 #define UMFPACK_symbolic	 umfpack_di_symbolic
508 #define UMFPACK_transpose	 umfpack_di_transpose
509 #define UMFPACK_triplet_to_col	 umfpack_di_triplet_to_col
510 #define UMFPACK_wsolve		 umfpack_di_wsolve
511 
512 /* for debugging only: */
513 #define UMF_malloc_count	 umf_i_malloc_count
514 #define UMF_debug		 umfdi_debug
515 #define UMF_allocfail		 umfdi_allocfail
516 #define UMF_gprob		 umfdi_gprob
517 #define UMF_dump_dense		 umfdi_dump_dense
518 #define UMF_dump_element	 umfdi_dump_element
519 #define UMF_dump_rowcol		 umfdi_dump_rowcol
520 #define UMF_dump_matrix		 umfdi_dump_matrix
521 #define UMF_dump_current_front	 umfdi_dump_current_front
522 #define UMF_dump_lu		 umfdi_dump_lu
523 #define UMF_dump_memory		 umfdi_dump_memory
524 #define UMF_dump_packed_memory	 umfdi_dump_packed_memory
525 #define UMF_dump_col_matrix	 umfdi_dump_col_matrix
526 #define UMF_dump_chain		 umfdi_dump_chain
527 #define UMF_dump_start		 umfdi_dump_start
528 #define UMF_dump_rowmerge	 umfdi_dump_rowmerge
529 #define UMF_dump_diagonal_map	 umfdi_dump_diagonal_map
530 
531 #endif
532 
533 /* -------------------------------------------------------------------------- */
534 /* Double precision, with SuiteSparse_long's as integers */
535 /* -------------------------------------------------------------------------- */
536 
537 #ifdef DLONG
538 
539 #define UMF_analyze		 umf_l_analyze
540 #define UMF_apply_order		 umf_l_apply_order
541 #define UMF_assemble		 umfdl_assemble
542 #define UMF_assemble_fixq	 umfdl_assemble_fixq
543 #define UMF_blas3_update	 umfdl_blas3_update
544 #define UMF_build_tuples	 umfdl_build_tuples
545 #define UMF_build_tuples_usage	 umfdl_build_tuples_usage
546 #define UMF_colamd		 umf_l_colamd
547 #define UMF_colamd_set_defaults	 umf_l_colamd_set_defaults
548 #define UMF_create_element	 umfdl_create_element
549 #define UMF_extend_front	 umfdl_extend_front
550 #define UMF_free		 umf_l_free
551 #define UMF_fsize		 umf_l_fsize
552 #define UMF_garbage_collection	 umfdl_garbage_collection
553 #define UMF_get_memory		 umfdl_get_memory
554 #define UMF_grow_front		 umfdl_grow_front
555 #define UMF_init_front		 umfdl_init_front
556 #define UMF_is_permutation	 umf_l_is_permutation
557 #define UMF_kernel		 umfdl_kernel
558 #define UMF_kernel_init		 umfdl_kernel_init
559 #define UMF_kernel_init_usage	 umfdl_kernel_init_usage
560 #define UMF_kernel_wrapup	 umfdl_kernel_wrapup
561 #define UMF_local_search	 umfdl_local_search
562 #define UMF_lsolve		 umfdl_lsolve
563 #define UMF_ltsolve		 umfdl_ltsolve
564 #define UMF_lhsolve		 umfdl_lhsolve
565 #define UMF_malloc		 umf_l_malloc
566 #define UMF_mem_alloc_element	 umfdl_mem_alloc_element
567 #define UMF_mem_alloc_head_block umfdl_mem_alloc_head_block
568 #define UMF_mem_alloc_tail_block umfdl_mem_alloc_tail_block
569 #define UMF_mem_free_tail_block	 umfdl_mem_free_tail_block
570 #define UMF_mem_init_memoryspace umfdl_mem_init_memoryspace
571 #define UMF_realloc		 umf_l_realloc
572 #define UMF_report_perm		 umf_l_report_perm
573 #define UMF_report_vector	 umfdl_report_vector
574 #define UMF_row_search		 umfdl_row_search
575 #define UMF_scale		 umfdl_scale
576 #define UMF_scale_column	 umfdl_scale_column
577 #define UMF_set_stats		 umf_l_set_stats
578 #define UMF_singletons		 umf_l_singletons
579 #define UMF_solve		 umfdl_solve
580 #define UMF_start_front		 umfdl_start_front
581 #define UMF_store_lu		 umfdl_store_lu
582 #define UMF_store_lu_drop	 umfdl_store_lu_drop
583 #define UMF_symbolic_usage	 umfdl_symbolic_usage
584 #define UMF_transpose		 umfdl_transpose
585 #define UMF_tuple_lengths	 umfdl_tuple_lengths
586 #define UMF_usolve		 umfdl_usolve
587 #define UMF_utsolve		 umfdl_utsolve
588 #define UMF_uhsolve		 umfdl_uhsolve
589 #define UMF_valid_numeric	 umfdl_valid_numeric
590 #define UMF_valid_symbolic	 umfdl_valid_symbolic
591 #define UMF_triplet_map_x	 umfdl_triplet_map_x
592 #define UMF_triplet_map_nox	 umfdl_triplet_map_nox
593 #define UMF_triplet_nomap_x	 umfdl_triplet_nomap_x
594 #define UMF_triplet_nomap_nox	 umfdl_triplet_nomap_nox
595 #define UMF_cholmod		 umf_l_cholmod
596 
597 #define UMFPACK_col_to_triplet	 umfpack_dl_col_to_triplet
598 #define UMFPACK_defaults	 umfpack_dl_defaults
599 #define UMFPACK_free_numeric	 umfpack_dl_free_numeric
600 #define UMFPACK_free_symbolic	 umfpack_dl_free_symbolic
601 #define UMFPACK_get_lunz	 umfpack_dl_get_lunz
602 #define UMFPACK_get_numeric	 umfpack_dl_get_numeric
603 #define UMFPACK_get_symbolic	 umfpack_dl_get_symbolic
604 #define UMFPACK_get_determinant	 umfpack_dl_get_determinant
605 #define UMFPACK_numeric		 umfpack_dl_numeric
606 #define UMFPACK_qsymbolic	 umfpack_dl_qsymbolic
607 #define UMFPACK_fsymbolic	 umfpack_dl_fsymbolic
608 #define UMFPACK_report_control	 umfpack_dl_report_control
609 #define UMFPACK_report_info	 umfpack_dl_report_info
610 #define UMFPACK_report_matrix	 umfpack_dl_report_matrix
611 #define UMFPACK_report_numeric	 umfpack_dl_report_numeric
612 #define UMFPACK_report_perm	 umfpack_dl_report_perm
613 #define UMFPACK_report_status	 umfpack_dl_report_status
614 #define UMFPACK_report_symbolic	 umfpack_dl_report_symbolic
615 #define UMFPACK_report_triplet	 umfpack_dl_report_triplet
616 #define UMFPACK_report_vector	 umfpack_dl_report_vector
617 #define UMFPACK_save_numeric	 umfpack_dl_save_numeric
618 #define UMFPACK_save_symbolic	 umfpack_dl_save_symbolic
619 #define UMFPACK_load_numeric	 umfpack_dl_load_numeric
620 #define UMFPACK_load_symbolic	 umfpack_dl_load_symbolic
621 #define UMFPACK_scale		 umfpack_dl_scale
622 #define UMFPACK_solve		 umfpack_dl_solve
623 #define UMFPACK_symbolic	 umfpack_dl_symbolic
624 #define UMFPACK_transpose	 umfpack_dl_transpose
625 #define UMFPACK_triplet_to_col	 umfpack_dl_triplet_to_col
626 #define UMFPACK_wsolve		 umfpack_dl_wsolve
627 
628 /* for debugging only: */
629 #define UMF_malloc_count	 umf_l_malloc_count
630 #define UMF_debug		 umfdl_debug
631 #define UMF_allocfail		 umfdl_allocfail
632 #define UMF_gprob		 umfdl_gprob
633 #define UMF_dump_dense		 umfdl_dump_dense
634 #define UMF_dump_element	 umfdl_dump_element
635 #define UMF_dump_rowcol		 umfdl_dump_rowcol
636 #define UMF_dump_matrix		 umfdl_dump_matrix
637 #define UMF_dump_current_front	 umfdl_dump_current_front
638 #define UMF_dump_lu		 umfdl_dump_lu
639 #define UMF_dump_memory		 umfdl_dump_memory
640 #define UMF_dump_packed_memory	 umfdl_dump_packed_memory
641 #define UMF_dump_col_matrix	 umfdl_dump_col_matrix
642 #define UMF_dump_chain		 umfdl_dump_chain
643 #define UMF_dump_start		 umfdl_dump_start
644 #define UMF_dump_rowmerge	 umfdl_dump_rowmerge
645 #define UMF_dump_diagonal_map	 umfdl_dump_diagonal_map
646 
647 #endif
648 
649 /* -------------------------------------------------------------------------- */
650 /* Complex double precision, with int's as integers */
651 /* -------------------------------------------------------------------------- */
652 
653 #ifdef ZINT
654 
655 #define UMF_analyze		 umf_i_analyze
656 #define UMF_apply_order		 umf_i_apply_order
657 #define UMF_assemble		 umfzi_assemble
658 #define UMF_assemble_fixq	 umfzi_assemble_fixq
659 #define UMF_blas3_update	 umfzi_blas3_update
660 #define UMF_build_tuples	 umfzi_build_tuples
661 #define UMF_build_tuples_usage	 umfzi_build_tuples_usage
662 #define UMF_colamd		 umf_i_colamd
663 #define UMF_colamd_set_defaults	 umf_i_colamd_set_defaults
664 #define UMF_create_element	 umfzi_create_element
665 #define UMF_extend_front	 umfzi_extend_front
666 #define UMF_free		 umf_i_free
667 #define UMF_fsize		 umf_i_fsize
668 #define UMF_garbage_collection	 umfzi_garbage_collection
669 #define UMF_get_memory		 umfzi_get_memory
670 #define UMF_grow_front		 umfzi_grow_front
671 #define UMF_init_front		 umfzi_init_front
672 #define UMF_is_permutation	 umf_i_is_permutation
673 #define UMF_kernel		 umfzi_kernel
674 #define UMF_kernel_init		 umfzi_kernel_init
675 #define UMF_kernel_init_usage	 umfzi_kernel_init_usage
676 #define UMF_kernel_wrapup	 umfzi_kernel_wrapup
677 #define UMF_local_search	 umfzi_local_search
678 #define UMF_lsolve		 umfzi_lsolve
679 #define UMF_ltsolve		 umfzi_ltsolve
680 #define UMF_lhsolve		 umfzi_lhsolve
681 #define UMF_malloc		 umf_i_malloc
682 #define UMF_mem_alloc_element	 umfzi_mem_alloc_element
683 #define UMF_mem_alloc_head_block umfzi_mem_alloc_head_block
684 #define UMF_mem_alloc_tail_block umfzi_mem_alloc_tail_block
685 #define UMF_mem_free_tail_block	 umfzi_mem_free_tail_block
686 #define UMF_mem_init_memoryspace umfzi_mem_init_memoryspace
687 #define UMF_realloc		 umf_i_realloc
688 #define UMF_report_perm		 umf_i_report_perm
689 #define UMF_report_vector	 umfzi_report_vector
690 #define UMF_row_search		 umfzi_row_search
691 #define UMF_scale		 umfzi_scale
692 #define UMF_scale_column	 umfzi_scale_column
693 #define UMF_set_stats		 umfzi_set_stats
694 #define UMF_singletons		 umf_i_singletons
695 #define UMF_solve		 umfzi_solve
696 #define UMF_start_front		 umfzi_start_front
697 #define UMF_store_lu		 umfzi_store_lu
698 #define UMF_store_lu_drop	 umfzi_store_lu_drop
699 #define UMF_symbolic_usage	 umfzi_symbolic_usage
700 #define UMF_transpose		 umfzi_transpose
701 #define UMF_tuple_lengths	 umfzi_tuple_lengths
702 #define UMF_usolve		 umfzi_usolve
703 #define UMF_utsolve		 umfzi_utsolve
704 #define UMF_uhsolve		 umfzi_uhsolve
705 #define UMF_valid_numeric	 umfzi_valid_numeric
706 #define UMF_valid_symbolic	 umfzi_valid_symbolic
707 #define UMF_triplet_map_x	 umfzi_triplet_map_x
708 #define UMF_triplet_map_nox	 umfzi_triplet_map_nox
709 #define UMF_triplet_nomap_x	 umfzi_triplet_nomap_x
710 #define UMF_triplet_nomap_nox	 umfzi_triplet_nomap_nox
711 #define UMF_cholmod		 umf_i_cholmod
712 
713 #define UMFPACK_col_to_triplet	 umfpack_zi_col_to_triplet
714 #define UMFPACK_defaults	 umfpack_zi_defaults
715 #define UMFPACK_free_numeric	 umfpack_zi_free_numeric
716 #define UMFPACK_free_symbolic	 umfpack_zi_free_symbolic
717 #define UMFPACK_get_lunz	 umfpack_zi_get_lunz
718 #define UMFPACK_get_numeric	 umfpack_zi_get_numeric
719 #define UMFPACK_get_symbolic	 umfpack_zi_get_symbolic
720 #define UMFPACK_get_determinant	 umfpack_zi_get_determinant
721 #define UMFPACK_numeric		 umfpack_zi_numeric
722 #define UMFPACK_qsymbolic	 umfpack_zi_qsymbolic
723 #define UMFPACK_fsymbolic	 umfpack_zi_fsymbolic
724 #define UMFPACK_report_control	 umfpack_zi_report_control
725 #define UMFPACK_report_info	 umfpack_zi_report_info
726 #define UMFPACK_report_matrix	 umfpack_zi_report_matrix
727 #define UMFPACK_report_numeric	 umfpack_zi_report_numeric
728 #define UMFPACK_report_perm	 umfpack_zi_report_perm
729 #define UMFPACK_report_status	 umfpack_zi_report_status
730 #define UMFPACK_report_symbolic	 umfpack_zi_report_symbolic
731 #define UMFPACK_report_triplet	 umfpack_zi_report_triplet
732 #define UMFPACK_report_vector	 umfpack_zi_report_vector
733 #define UMFPACK_save_numeric	 umfpack_zi_save_numeric
734 #define UMFPACK_save_symbolic	 umfpack_zi_save_symbolic
735 #define UMFPACK_load_numeric	 umfpack_zi_load_numeric
736 #define UMFPACK_load_symbolic	 umfpack_zi_load_symbolic
737 #define UMFPACK_scale		 umfpack_zi_scale
738 #define UMFPACK_solve		 umfpack_zi_solve
739 #define UMFPACK_symbolic	 umfpack_zi_symbolic
740 #define UMFPACK_transpose	 umfpack_zi_transpose
741 #define UMFPACK_triplet_to_col	 umfpack_zi_triplet_to_col
742 #define UMFPACK_wsolve		 umfpack_zi_wsolve
743 
744 /* for debugging only: */
745 #define UMF_malloc_count	 umf_i_malloc_count
746 #define UMF_debug		 umfzi_debug
747 #define UMF_allocfail		 umfzi_allocfail
748 #define UMF_gprob		 umfzi_gprob
749 #define UMF_dump_dense		 umfzi_dump_dense
750 #define UMF_dump_element	 umfzi_dump_element
751 #define UMF_dump_rowcol		 umfzi_dump_rowcol
752 #define UMF_dump_matrix		 umfzi_dump_matrix
753 #define UMF_dump_current_front	 umfzi_dump_current_front
754 #define UMF_dump_lu		 umfzi_dump_lu
755 #define UMF_dump_memory		 umfzi_dump_memory
756 #define UMF_dump_packed_memory	 umfzi_dump_packed_memory
757 #define UMF_dump_col_matrix	 umfzi_dump_col_matrix
758 #define UMF_dump_chain		 umfzi_dump_chain
759 #define UMF_dump_start		 umfzi_dump_start
760 #define UMF_dump_rowmerge	 umfzi_dump_rowmerge
761 #define UMF_dump_diagonal_map	 umfzi_dump_diagonal_map
762 
763 #endif
764 
765 /* -------------------------------------------------------------------------- */
766 /* Complex double precision, with SuiteSparse_long's as integers */
767 /* -------------------------------------------------------------------------- */
768 
769 #ifdef ZLONG
770 
771 #define UMF_analyze		 umf_l_analyze
772 #define UMF_apply_order		 umf_l_apply_order
773 #define UMF_assemble		 umfzl_assemble
774 #define UMF_assemble_fixq	 umfzl_assemble_fixq
775 #define UMF_blas3_update	 umfzl_blas3_update
776 #define UMF_build_tuples	 umfzl_build_tuples
777 #define UMF_build_tuples_usage	 umfzl_build_tuples_usage
778 #define UMF_colamd		 umf_l_colamd
779 #define UMF_colamd_set_defaults	 umf_l_colamd_set_defaults
780 #define UMF_create_element	 umfzl_create_element
781 #define UMF_extend_front	 umfzl_extend_front
782 #define UMF_free		 umf_l_free
783 #define UMF_fsize		 umf_l_fsize
784 #define UMF_garbage_collection	 umfzl_garbage_collection
785 #define UMF_get_memory		 umfzl_get_memory
786 #define UMF_grow_front		 umfzl_grow_front
787 #define UMF_init_front		 umfzl_init_front
788 #define UMF_is_permutation	 umf_l_is_permutation
789 #define UMF_kernel		 umfzl_kernel
790 #define UMF_kernel_init		 umfzl_kernel_init
791 #define UMF_kernel_init_usage	 umfzl_kernel_init_usage
792 #define UMF_kernel_wrapup	 umfzl_kernel_wrapup
793 #define UMF_local_search	 umfzl_local_search
794 #define UMF_lsolve		 umfzl_lsolve
795 #define UMF_ltsolve		 umfzl_ltsolve
796 #define UMF_lhsolve		 umfzl_lhsolve
797 #define UMF_malloc		 umf_l_malloc
798 #define UMF_mem_alloc_element	 umfzl_mem_alloc_element
799 #define UMF_mem_alloc_head_block umfzl_mem_alloc_head_block
800 #define UMF_mem_alloc_tail_block umfzl_mem_alloc_tail_block
801 #define UMF_mem_free_tail_block	 umfzl_mem_free_tail_block
802 #define UMF_mem_init_memoryspace umfzl_mem_init_memoryspace
803 #define UMF_realloc		 umf_l_realloc
804 #define UMF_report_perm		 umf_l_report_perm
805 #define UMF_report_vector	 umfzl_report_vector
806 #define UMF_row_search		 umfzl_row_search
807 #define UMF_scale		 umfzl_scale
808 #define UMF_scale_column	 umfzl_scale_column
809 #define UMF_set_stats		 umfzl_set_stats
810 #define UMF_singletons		 umf_l_singletons
811 #define UMF_solve		 umfzl_solve
812 #define UMF_start_front		 umfzl_start_front
813 #define UMF_store_lu		 umfzl_store_lu
814 #define UMF_store_lu_drop	 umfzl_store_lu_drop
815 #define UMF_symbolic_usage	 umfzl_symbolic_usage
816 #define UMF_transpose		 umfzl_transpose
817 #define UMF_tuple_lengths	 umfzl_tuple_lengths
818 #define UMF_usolve		 umfzl_usolve
819 #define UMF_utsolve		 umfzl_utsolve
820 #define UMF_uhsolve		 umfzl_uhsolve
821 #define UMF_valid_numeric	 umfzl_valid_numeric
822 #define UMF_valid_symbolic	 umfzl_valid_symbolic
823 #define UMF_triplet_map_x	 umfzl_triplet_map_x
824 #define UMF_triplet_map_nox	 umfzl_triplet_map_nox
825 #define UMF_triplet_nomap_x	 umfzl_triplet_nomap_x
826 #define UMF_triplet_nomap_nox	 umfzl_triplet_nomap_nox
827 #define UMF_cholmod		 umf_l_cholmod
828 
829 #define UMFPACK_col_to_triplet	 umfpack_zl_col_to_triplet
830 #define UMFPACK_defaults	 umfpack_zl_defaults
831 #define UMFPACK_free_numeric	 umfpack_zl_free_numeric
832 #define UMFPACK_free_symbolic	 umfpack_zl_free_symbolic
833 #define UMFPACK_get_lunz	 umfpack_zl_get_lunz
834 #define UMFPACK_get_numeric	 umfpack_zl_get_numeric
835 #define UMFPACK_get_symbolic	 umfpack_zl_get_symbolic
836 #define UMFPACK_get_determinant	 umfpack_zl_get_determinant
837 #define UMFPACK_numeric		 umfpack_zl_numeric
838 #define UMFPACK_qsymbolic	 umfpack_zl_qsymbolic
839 #define UMFPACK_fsymbolic	 umfpack_zl_fsymbolic
840 #define UMFPACK_report_control	 umfpack_zl_report_control
841 #define UMFPACK_report_info	 umfpack_zl_report_info
842 #define UMFPACK_report_matrix	 umfpack_zl_report_matrix
843 #define UMFPACK_report_numeric	 umfpack_zl_report_numeric
844 #define UMFPACK_report_perm	 umfpack_zl_report_perm
845 #define UMFPACK_report_status	 umfpack_zl_report_status
846 #define UMFPACK_report_symbolic	 umfpack_zl_report_symbolic
847 #define UMFPACK_report_triplet	 umfpack_zl_report_triplet
848 #define UMFPACK_report_vector	 umfpack_zl_report_vector
849 #define UMFPACK_save_numeric	 umfpack_zl_save_numeric
850 #define UMFPACK_save_symbolic	 umfpack_zl_save_symbolic
851 #define UMFPACK_load_numeric	 umfpack_zl_load_numeric
852 #define UMFPACK_load_symbolic	 umfpack_zl_load_symbolic
853 #define UMFPACK_scale		 umfpack_zl_scale
854 #define UMFPACK_solve		 umfpack_zl_solve
855 #define UMFPACK_symbolic	 umfpack_zl_symbolic
856 #define UMFPACK_transpose	 umfpack_zl_transpose
857 #define UMFPACK_triplet_to_col	 umfpack_zl_triplet_to_col
858 #define UMFPACK_wsolve		 umfpack_zl_wsolve
859 
860 /* for debugging only: */
861 #define UMF_malloc_count	 umf_l_malloc_count
862 #define UMF_debug		 umfzl_debug
863 #define UMF_allocfail		 umfzl_allocfail
864 #define UMF_gprob		 umfzl_gprob
865 #define UMF_dump_dense		 umfzl_dump_dense
866 #define UMF_dump_element	 umfzl_dump_element
867 #define UMF_dump_rowcol		 umfzl_dump_rowcol
868 #define UMF_dump_matrix		 umfzl_dump_matrix
869 #define UMF_dump_current_front	 umfzl_dump_current_front
870 #define UMF_dump_lu		 umfzl_dump_lu
871 #define UMF_dump_memory		 umfzl_dump_memory
872 #define UMF_dump_packed_memory	 umfzl_dump_packed_memory
873 #define UMF_dump_col_matrix	 umfzl_dump_col_matrix
874 #define UMF_dump_chain		 umfzl_dump_chain
875 #define UMF_dump_start		 umfzl_dump_start
876 #define UMF_dump_rowmerge	 umfzl_dump_rowmerge
877 #define UMF_dump_diagonal_map	 umfzl_dump_diagonal_map
878 
879 #endif
880