-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmpi_comm.h
More file actions
executable file
·35 lines (29 loc) · 775 Bytes
/
mpi_comm.h
File metadata and controls
executable file
·35 lines (29 loc) · 775 Bytes
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
#ifndef MPI_COMM_H
#define MPI_COMM_H
#include <mpi.h>
#include "sor.h"
#ifdef __cplusplus
extern "C" {
#endif
//------------------------------
// Communicator
//------------------------------
MPI_Comm CARTESIAN_COMM;
//-------------------------------------------
// Datatypes
//-------------------------------------------
MPI_Datatype mpi_column;
MPI_Datatype mpi_row;
MPI_Datatype mpi_block;
//-------------------------------------------
// Functions
//-------------------------------------------
int init_mpi();
int init_mpi_cart(int* dims);
void createDatatypes(int width, int height);
void getNeighbors(sor* block);
void mpi_sync(sor* block);
#ifdef __cplusplus
}
#endif
#endif //MPI_COMM_H