5164
|
1 /* ========================================================================== */ |
|
2 /* === UMFPACK_report_perm ================================================== */ |
|
3 /* ========================================================================== */ |
|
4 |
|
5 /* -------------------------------------------------------------------------- */ |
|
6 /* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */ |
|
7 /* Univ. of Florida. All Rights Reserved. See ../Doc/License for License. */ |
|
8 /* web: http://www.cise.ufl.edu/research/sparse/umfpack */ |
|
9 /* -------------------------------------------------------------------------- */ |
|
10 |
|
11 /* |
|
12 User-callable. Prints a permutation vector. See umfpack_report_perm.h |
|
13 for details. |
|
14 |
|
15 Dynamic memory usage: Allocates a size max(np,1)*sizeof(Int) workspace via |
|
16 a single call to UMF_malloc and then frees all of it via UMF_free on return. |
|
17 */ |
|
18 |
|
19 #include "umf_internal.h" |
|
20 #include "umf_report_perm.h" |
|
21 #include "umf_malloc.h" |
|
22 #include "umf_free.h" |
|
23 |
|
24 GLOBAL Int UMFPACK_report_perm |
|
25 ( |
|
26 Int np, |
|
27 const Int Perm [ ], |
|
28 const double Control [UMFPACK_CONTROL] |
|
29 ) |
|
30 { |
|
31 Int prl, *W, status ; |
|
32 |
|
33 prl = GET_CONTROL (UMFPACK_PRL, UMFPACK_DEFAULT_PRL) ; |
|
34 |
|
35 if (prl <= 2) |
|
36 { |
|
37 return (UMFPACK_OK) ; |
|
38 } |
|
39 |
|
40 W = (Int *) UMF_malloc (MAX (np,1), sizeof (Int)) ; |
|
41 status = UMF_report_perm (np, Perm, W, prl, 1) ; |
|
42 (void) UMF_free ((void *) W) ; |
|
43 return (status) ; |
|
44 } |