File: ssmult.h

package info (click to toggle)
suitesparse 1%3A5.8.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 152,716 kB
  • sloc: ansic: 774,385; cpp: 24,213; makefile: 6,310; fortran: 1,927; java: 1,826; csh: 1,686; ruby: 725; sh: 535; perl: 225; python: 209; sed: 164; awk: 60
file content (72 lines) | stat: -rw-r--r-- 2,309 bytes parent folder | download | duplicates (4)
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
/* ========================================================================== */
/* === ssmult.h ============================================================= */
/* ========================================================================== */

/* Include file for ssmult.c and ssmultsym.c
 * Copyright 2007-2009, Timothy A. Davis, http://www.suitesparse.com
 */

#include "mex.h"
#include <stdlib.h>

/* NOTE: this code will FAIL abysmally if Int is mwIndex. */
#define Int mwSignedIndex

#define ERROR_DIMENSIONS (-1)
#define ERROR_TOO_LARGE (-2)

/* turn off debugging */
#ifndef NDEBUG
#define NDEBUG
#endif

#define MAX(a,b) (((a) > (b)) ? (a) : (b))

#define MXFREE(a) { \
    void *ptr ; \
    ptr = (void *) (a) ; \
    if (ptr != NULL) mxFree (ptr) ; \
}

mxArray *ssmult_transpose       /* returns C = A' or A.' */
(
    const mxArray *A,
    int conj                    /* compute A' if true, compute A.' if false */
) ;

int ssmult_nnz (const mxArray *A) ;

void ssmult_invalid (int error_code) ;

mxArray *ssmult         /* returns C = A*B or variants */
(
    const mxArray *A,
    const mxArray *B,
    int at,             /* if true: trans(A)  if false: A */
    int ac,             /* if true: conj(A)   if false: A. ignored if A real */
    int bt,             /* if true: trans(B)  if false: B */
    int bc,             /* if true: conj(B)   if false: B. ignored if B real */
    int ct,             /* if true: trans(C)  if false: C */
    int cc              /* if true: conj(C)   if false: C. ignored if C real */
) ;

mxArray *ssmult_saxpy   /* returns C = A*B using the sparse saxpy method */
(
    const mxArray *A,
    const mxArray *B,
    int ac,                 /* if true use conj(A) */
    int bc,                 /* if true use conj(B) */
    int cc,                 /* if true compute conj(C) */
    int sorted              /* if true, return C with sorted columns */
) ;

mxArray *ssmult_dot     /* returns C = A'*B using sparse dot product method */
(
    const mxArray *A,
    const mxArray *B,
    int ac,             /* if true: conj(A)   if false: A. ignored if A real */
    int bc,             /* if true: conj(B)   if false: B. ignored if B real */
    int cc              /* if true: conj(C)   if false: C. ignored if C real */
) ;

void ssdump (const mxArray *A) ;