File: demos.h

package info (click to toggle)
suitesparse 1%3A5.12.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 176,720 kB
  • sloc: ansic: 1,193,914; cpp: 31,704; makefile: 6,638; fortran: 1,927; java: 1,826; csh: 765; ruby: 725; sh: 529; python: 333; perl: 225; sed: 164; awk: 35
file content (77 lines) | stat: -rw-r--r-- 2,889 bytes parent folder | download | duplicates (2)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//------------------------------------------------------------------------------
// SLIP_LU/Demo/demos.h: #include file the demo programs
//------------------------------------------------------------------------------

// SLIP_LU: (c) 2019-2020, Chris Lourenco, Jinhao Chen, Erick Moreno-Centeno,
// Timothy A. Davis, Texas A&M University.  All Rights Reserved.  See
// SLIP_LU/License for the license.

//------------------------------------------------------------------------------

#include "SLIP_LU.h"
#include <time.h>
#include <stdint.h>
#include <inttypes.h>

#define OK(method)                      \
{                                       \
    ok = method ;                       \
    if (ok != SLIP_OK)                  \
    {                                   \
        printf ("Error: %d line %d file %s\n", ok, __LINE__, __FILE__) ; \
        FREE_WORKSPACE ;                \
        return 0 ;                      \
    }                                   \
}

#define SLIP_MIN(a,b) (((a) < (b)) ? (a) : (b))

/* Purpose: This processes the command line for user specified options */
SLIP_info SLIP_process_command_line //processes the command line
(
    int argc,               // number of command line arguments
    char* argv[],           // set of command line arguments
    SLIP_options* option,   // struct containing the command options
    char** mat_name,        // Name of the matrix to be read in
    char** rhs_name,        // Name of the RHS vector to be read in
    SLIP_type *rat,         // data type of output solution:
                            // 1:SLIP_MPZ (default), 2:SLIP_FP64, 3:SLIP_MPFR
    bool *help
);

/* Purpose: This function prints out the user specified/default options*/
void SLIP_print_options     // display specified/default options to user
(
    SLIP_options* option // struct containing all of the options
);

/* Purpose: This function shows the usage of the code.*/
void SLIP_show_usage(void);

/* Purpose: This function reads in a matrix stored in a triplet format.
 * This format used can be seen in any of the example mat files.
 */
SLIP_info SLIP_tripread
(
    SLIP_matrix **A_handle,     // Matrix to be constructed
    FILE* file,                 // file to read from (must already be open)
    SLIP_options* option
) ;

/* Purpose: This function reads in a double matrix stored in a triplet format.
 * This format used can be seen in any of the example mat files.
 */
SLIP_info SLIP_tripread_double
(
    SLIP_matrix **A_handle,     // Matrix to be constructed
    FILE* file,                 // file to read from (must already be open)
    SLIP_options* option
) ;

/* Purpose: SLIP_read_dense: read a dense matrix. */
SLIP_info SLIP_read_dense
(
    SLIP_matrix **b_handle,      // Matrix to be constructed
    FILE* file,                  // file to read from (must already be open)
    SLIP_options* option
) ;