File: spok.h

package info (click to toggle)
suitesparse 1%3A7.10.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 254,920 kB
  • sloc: ansic: 1,134,743; cpp: 46,133; makefile: 4,875; fortran: 2,087; java: 1,826; sh: 996; ruby: 725; python: 495; asm: 371; sed: 166; awk: 44
file content (41 lines) | stat: -rw-r--r-- 1,321 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
// SuiteSparse/MATLAB_Tools/spok/spok.h
// SPOK, Copyright (c) 2008-2011, Timothy A Davis. All Rights Reserved.
// SPDX-License-Identifier: BSD-3-clause

#ifdef MATLAB_MEX_FILE
#include "mex.h"
#define SPOK_INT mwSignedIndex
#else
/* for use outside of MATLAB, use with -DSPOK_INT=long to get long version of
   code, -DSPOK_INT=int for int version, etc */
#ifndef SPOK_INT
#define SPOK_INT ptrdiff_t
#endif
#endif

#define SPOK_OK 1
#define SPOK_WARNING 0

#define SPOK_FATAL_M (-1)
#define SPOK_FATAL_N (-2)
#define SPOK_FATAL_NZMAX (-3)
#define SPOK_FATAL_P (-4)
#define SPOK_FATAL_I (-5)

SPOK_INT spok
(
    /* inputs, not modified */
    SPOK_INT m,             /* number of rows */
    SPOK_INT n,             /* number of columns */
    SPOK_INT nzmax,         /* max # of entries */
    SPOK_INT *Ap,           /* size n+1, column pointers */
    SPOK_INT *Ai,           /* size nz = Ap [n], row indices */
    double *Ax,             /* double matrices always have Ax */
    double *Az,             /* imaginary matrices always have Az */
    char *As,               /* logical matrices always have As */

    /* outputs, not defined on input */
    SPOK_INT *p_njumbled,   /* # of jumbled row indices (-1 if not computed) */
    SPOK_INT *p_nzeros      /* number of explicit zeros (-1 if not computed) */
) ;