Advertisement
Litigare

Untitled

Jun 16th, 2021
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #pragma once
  2. #include <mpi.h>
  3. #include "Coordinate.h"
  4. #include "Node.h"
  5.  
  6. class AStarMPICommunication
  7. {
  8.     MPI_Datatype dt_coordinate;
  9.     //MPI_Datatype dt_nodeSet;
  10.     MPI_Datatype dt_node;
  11.  
  12. public:
  13.     void DefineCoordinateTypeInMPI();
  14.     //void DefineNodeSetTypeInMPI();
  15.     void DefineNodeTypeInMPI();
  16.  
  17.     void CommunicationWithCoordinateExample(int rank);
  18.     void CommunicationWithNodeExample(int rank);
  19.  
  20.     void SendCoordinate(int rank, Coordinate coordinate);
  21.     Coordinate ReceiveCoordinate(int rank);
  22.  
  23.     void SendNode(int rank, Node node);
  24.     Node ReceiveNode(int rank);
  25.  
  26.     // void BroadcastNodeSet();
  27.     // NodeSet ReceiveNodeSet();
  28. };
  29.  
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement