MPITrans.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2003 by Craig West
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __MPITrans_h
10 #define __MPITrans_h
11 
12 #include <mpi.h>
13 
14 #define ACTIVATE_MPI 1
15 #include "dsp/MPIRoot.h"
16 
17 
18 namespace dsp {
19 
21  class MPITrans : public MPIRoot {
22 
23  public:
24 
26  MPITrans (MPI_Comm comm);
27 
29  void send_data (BitSeries* data, int dest);
30 
32  void load_data (BitSeries* data);
33 
35  void load_data ();
36 
38  int next_destination ();
39 
41  void request_data ();
42 
44  void request_ready (int node);
45 
47  void shutdown();
48 
49  };
50 
51 }
52 
53 
54 #endif // !defined(____MPITrans_h)
void send_data(BitSeries *data, int dest)
Send the next block using MPI_Isend.
Definition: MPIRoot.C:361
int next_destination()
Returns the rank of the next node ready to receive data.
Definition: MPIRoot.C:318
void load_data()
when mpi_rank == mpi_root, load data from input
Definition: MPIRoot.C:345
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
MPITrans(MPI_Comm comm)
Construct from MPI_Bcast.
Definition: MPITrans.C:20
void request_data()
request data from the root
Definition: MPIRoot.C:442
int next_destination()
Returns the rank of the next node ready to receive data.
Definition: MPITrans.C:49
Loads BitSeries data using the MPI communications protocol.
Definition: MPIRoot.h:21
void send_data(BitSeries *data, int dest)
Send the next block using MPI_Isend.
Definition: MPITrans.C:28
bool auto_request
Automatically request the next data chunk.
Definition: MPIRoot.h:111
A container for storing digitized (generally not floating point) data
Definition: BitSeries.h:35
void shutdown()
Shutdown any remaining requests.
Definition: MPITrans.C:75
Loads BitSeries data using the MPI communications protocol.
Definition: MPITrans.h:21
void request_data()
request data from the root
Definition: MPITrans.C:56
void load_data()
when mpi_rank == mpi_root, load data from input
Definition: MPITrans.C:42
MPI_Comm comm
Communicator in which data will be sent and received.
Definition: MPIRoot.h:96
void request_ready()
request ready-for-data from any node
Definition: MPIRoot.C:327

Generated using doxygen 1.8.17