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