-
Notifications
You must be signed in to change notification settings - Fork 2
/
sor.h
executable file
·51 lines (41 loc) · 1.01 KB
/
sor.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
#ifndef SOR_H
#define SOR_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct
{
float* data;
float* next_data;
float* top_row;
float* bottom_row;
float* first_col;
float* last_col;
float h;
float w;
float threshold;
int coords[2];
int proc_num;
int rank_id;
int grid_size;
int generation;
int rank_upper;
int rank_lower;
int rank_left;
int rank_right;
//int matrix_width;
//int matrix_height;
int block_width;
int block_height;
}sor;
sor* init_sor(int rank, int num_proc, int matrix_width,
int matrix_height, float p_h, float p_w, float p_threshold, int q);
int compute(sor* block, int cnv_check);
float compute_red(sor* block, int cnv_check);
float compute_black(sor* block, int cnv_check);
void dispach_data(sor* block);
void sync_ext(sor* block);
#ifdef __cplusplus
}
#endif
#endif //SOR_H