File tree Expand file tree Collapse file tree 4 files changed +69
-16
lines changed Expand file tree Collapse file tree 4 files changed +69
-16
lines changed Original file line number Diff line number Diff line change 11%%MatrixMarket matrix coordinate pattern general
2- %%GraphBLAS type bool
2+ %%GraphBLAS type double
339 9 3
4- 1 4
5- 1 3
6- 3 4
4+ 1 4 0.33333
5+ 1 3 0.33333
6+ 3 4 0.33333
Original file line number Diff line number Diff line change 11%%MatrixMarket matrix coordinate pattern general
2- %%GraphBLAS type bool
2+ %%GraphBLAS type double
339 9 5
4- 1 9
5- 2 7
6- 2 8
7- 3 6
8- 4 5
4+ 1 9 0.2
5+ 2 7 0.2
6+ 2 8 0.2
7+ 3 6 0.2
8+ 4 5 0.2
Original file line number Diff line number Diff line change 11%%MatrixMarket matrix coordinate pattern general
2- %%GraphBLAS type bool
2+ %%GraphBLAS type double
339 9 4
4- 5 6
5- 5 9
6- 6 7
7- 6 9
4+ 5 6 0.25
5+ 5 9 0.25
6+ 6 7 0.25
7+ 6 9 0.25
Original file line number Diff line number Diff line change 11#include <stdio.h>
2+ #include <stdint.h>
23#include "../vendor/GraphBLAS/Include/GraphBLAS.h"
34#include "../vendor/LAGraph/include/LAGraph.h"
5+ typedef enum {
6+ VISA ,
7+ MIR ,
8+ MASTERCARD ,
9+ } System ;
10+
11+ typedef enum {
12+ MALE ,
13+ FEMALE ,
14+ } Gender ;
15+
16+ typedef enum {
17+ EDGE_OWNS ,
18+ EDGE_CALL ,
19+ EDGE_TX
20+ } EdgeType ;
21+
22+ typedef struct {
23+ Gender gender ;
24+ uint8_t age ;
25+ } User ;
26+
27+ typedef struct {
28+ System system ;
29+ double limit ;
30+ } Card ;
31+
32+ typedef struct {
33+ EdgeType type ;
34+ double weight ;
35+ double aux ;
36+ } EdgeInfo ;
37+
38+ void edge_mul (void * z , const void * x , const void * y ) {
39+
40+ }
41+
42+ void edge_add (void * z , const void * x , const void * y ) {
43+
44+ }
445
546int main ()
647{
7- printf ("Helllo, World!\n" );
48+ // init graphblas
49+ GrB_Info info = GrB_init (GrB_NONBLOCKING );
50+ if (info != GrB_SUCCESS ) {
51+ fprintf (stderr , "GraphBLAS init failed\n" );
52+ return 1 ;
53+ }
54+ printf ("GraphBLAS initialized.\n" );
55+
56+ // custom type
57+ GrB_Type EdgeInfo_Type ;
58+ GrB_Type_new (& EdgeInfo_Type , sizeof (EdgeInfo ));
59+
60+
861}
You can’t perform that action at this time.
0 commit comments