~ubuntu-branches/ubuntu/saucy/deal.ii/saucy

« back to all changes in this revision

Viewing changes to contrib/umfpack/UMFPACK/Include/umfpack_tictoc.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam C. Powell, IV
  • Date: 2009-05-08 23:13:50 UTC
  • Revision ID: james.westby@ubuntu.com-20090508231350-rrh1ltgi0tifabwc
Tags: upstream-6.2.0
ImportĀ upstreamĀ versionĀ 6.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ========================================================================== */
 
2
/* === umfpack_tictoc ======================================================= */
 
3
/* ========================================================================== */
 
4
 
 
5
/* -------------------------------------------------------------------------- */
 
6
/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */
 
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
void umfpack_tic (double stats [2]) ;
 
12
 
 
13
void umfpack_toc (double stats [2]) ;
 
14
 
 
15
 
 
16
/*
 
17
Syntax (for all versions: di, dl, zi, and zl):
 
18
 
 
19
    #include "umfpack.h"
 
20
    double stats [2] ;
 
21
    umfpack_tic (stats) ;
 
22
    ...
 
23
    umfpack_toc (stats) ;
 
24
 
 
25
Purpose:
 
26
 
 
27
    umfpack_tic returns the CPU time and wall clock time used by the process.
 
28
    The CPU time includes both "user" and "system" time (the latter is time
 
29
    spent by the system on behalf of the process, and is thus charged to the
 
30
    process).  umfpack_toc returns the CPU time and wall clock time since the
 
31
    last call to umfpack_tic with the same stats array.
 
32
 
 
33
    Typical usage:
 
34
 
 
35
        umfpack_tic (stats) ;
 
36
        ... do some work ...
 
37
        umfpack_toc (stats) ;
 
38
 
 
39
    then stats [1] contains the time in seconds used by the code between
 
40
    umfpack_tic and umfpack_toc, and stats [0] contains the wall clock time
 
41
    elapsed between the umfpack_tic and umfpack_toc.  These two routines act
 
42
    just like tic and toc in MATLAB, except that the both process time and
 
43
    wall clock time are returned.
 
44
 
 
45
    This routine normally uses the sysconf and times routines in the POSIX
 
46
    standard.  If -DNPOSIX is defined at compile time, then the ANSI C clock
 
47
    routine is used instead, and only the CPU time is returned (stats [0]
 
48
    is set to zero).
 
49
 
 
50
    umfpack_tic and umfpack_toc are the routines used internally in UMFPACK
 
51
    to time the symbolic analysis, numerical factorization, and the forward/
 
52
    backward solve.
 
53
 
 
54
Arguments:
 
55
 
 
56
    double stats [2]:
 
57
 
 
58
        stats [0]:  wall clock time, in seconds
 
59
        stats [1]:  CPU time, in seconds
 
60
*/