File: GB_helper.h

package info (click to toggle)
suitesparse 1%3A7.10.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, 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 (57 lines) | stat: -rw-r--r-- 2,114 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
//------------------------------------------------------------------------------
// GB_helper.h: helper functions for @GrB interface
//------------------------------------------------------------------------------

// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2025, All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

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

// These functions are only used by the @GrB MATLAB/Octave interface for
// SuiteSparse:GraphBLAS.

#ifndef GB_HELPER_H
#define GB_HELPER_H

#include "GB.h"
#include "math/GB_math.h"

void GB_helper5             // construct pattern of S
(
    // output:
    uint64_t *restrict Si,          // array of size anz
    uint64_t *restrict Sj,          // array of size anz
    // input:
    const void *Mi,                 // array of size mnz, M->i, may be NULL
    const bool Mi_is_32,            // if true, M->i is 32-bit; else 64-bit
    const uint64_t *restrict Mj,    // array of size mnz
    const int64_t mvlen,            // M->vlen
    const void *Ai,                 // array of size anz, A->i, may be NULL
    const bool Ai_is_32,            // if true, A->i is 32-bit; else 64-bit
    const int64_t avlen,            // A->vlen
    const uint64_t anz
) ;

void GB_helper7              // Kx = uint64 (0:mnz-1)
(
    uint64_t *restrict Kx,      // array of size mnz
    const uint64_t mnz
) ;

double GB_helper10       // norm (x-y,p), or -1 on error
(
    GB_void *x_arg,             // float or double, depending on type parameter
    bool x_iso,                 // true if x is iso
    GB_void *y_arg,             // same type as x, treat as zero if NULL
    bool y_iso,                 // true if x is iso
    GrB_Type type,              // GrB_FP32 or GrB_FP64
    int64_t p,                  // 0, 1, 2, INT64_MIN, or INT64_MAX
    uint64_t n
) ;

GxB_Container GB_helper_container (void) ;  // return the global Container
void GB_helper_container_new (void) ;       // allocate the global Container
void GB_helper_container_free (void) ;      // free the global Container

#endif