-
Notifications
You must be signed in to change notification settings - Fork 0
/
logic.h
32 lines (17 loc) · 1.19 KB
/
logic.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
#ifndef LOGIC_H_
#define LOGIC_H_
void click_on_cell(board_t* board, int row, int column);
void count_neighbors(board_t* board, unsigned char neighbors[D_ROW_NUM][D_COL_NUM]);
void count_neighbors_mpi(board_t* board, unsigned char neighbors[D_ROW_NUM][D_COL_NUM], int firstRow, int lastRow);
void count_neighbors_spherical_world(board_t* board, unsigned char neighbors[D_ROW_NUM][D_COL_NUM]);
void count_neighbors_spherical_world_mpi(board_t* board, unsigned char neighbors[D_ROW_NUM][D_COL_NUM], int firstRow, int lastRow);
void count_neighbors_flat_world(board_t* board, unsigned char neighbors[D_ROW_NUM][D_COL_NUM]);
void evolve(board_t* board, const unsigned char neighbors[D_ROW_NUM][D_COL_NUM]);
void evolve_mpi(board_t* board, const unsigned char neighbors[D_ROW_NUM][D_COL_NUM], int firstRow, int lastRow);
void life_read ( char *filename, board_t* board);
void life_write ( char *output_filename, board_t* board);
void mpi_life_read (char *filename, board_t* board, int firstRow, int lastRow);
void mpi_life_write ( char *output_filename, board_t* board, int firstRow, int lastRow);
double r8_uniform_01 ( int *seed );
void life_init (board_t* board, double prob, int *seed );
#endif // LOGIC_H_