-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgraph.h
executable file
·70 lines (56 loc) · 1.27 KB
/
graph.h
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
#pragma once
#include "common.h"
#include "mtx.h"
namespace spmv {
struct mdcsc_t {
public:
uint32_t cols;
uint32_t rows;
uint32_t nnz;
uint32_t nzx;
uint32_t num_parts;
uint32_t data_size;
uint32_t* col_ptr;
uint32_t* col_ind;
uint32_t* row_ptr;
uint32_t* row_ind;
byte_t* values;
mdcsc_t();
mdcsc_t(
uint32_t cols,
uint32_t rows,
uint32_t nnz,
uint32_t nzx,
uint32_t num_parts,
uint32_t data_size) {
this->init(cols, rows, nnz, nzx, num_parts, data_size);
}
mdcsc_t(const char* mtx_file, mtx_format edge_type, uint32_t part_size);
~mdcsc_t();
void init(uint32_t cols,
uint32_t rows,
uint32_t nnz,
uint32_t nzx,
uint32_t num_parts,
uint32_t data_size);
void allocate();
size_t copy(byte_t* dest,
size_t offset,
size_t size,
ch_system_t<ch_matrix_dcsc_t>& desc);
};
struct vertex_t {
byte_t* values;
uint32_t* masks;
uint32_t size;
uint32_t data_size;
vertex_t();
vertex_t(uint32_t size, uint32_t data_size);
~vertex_t();
size_t copy(byte_t* dest,
size_t offset,
size_t size,
ch_system_t<ch_vertex_t>& desc);
void dump();
};
}