PaCO++  0.05
BasicDistributionLibrary.h
Go to the documentation of this file.
1 #ifndef BASIC_DISTRIBUTION_LIBRARY_IS_DEFINED
2 #define BASIC_DISTRIBUTION_LIBRARY_IS_DEFINED
3 
5 #include <stdio.h>
6 
8 {
9 private:
10  PaCO::distLoc_t _mode; // ClientSide, ServerSide, CommSide
14 
15  // We are waiting for native type to be supported ;(
16  LocalData_t _ld;
17 
18  void* _comm; // communicator
19 
20  Fabrique* _fab;
21  Abstrait* _darray;
22  vAbstrait* _vdarray;
23  int _remaining; // number of messages to yet to be received
24 public:
25  // Constructors
26  BasicDistributionLibrary(Fabrique* f);
27  BasicDistributionLibrary(Fabrique* f, void* comm);
28 
29  virtual ~BasicDistributionLibrary();
30 
31  // Comm management
32  void setCommunicator(void* comm);
33 
34  // Fabric managment
35  void setFabric(Fabrique* f);
36 
37  // Reset
38  void reset();
39 
40  // Methods
41  const PaCO::distLoc_t& getMode() const;
42 
43  bool setMode(const PaCO::distLoc_t mode); // true if ok
44 
45  bool setServerConfiguration(const PaCO::PacoTopology_t & stopo);
46  bool setClientConfiguration(const PaCO::PacoTopology_t & ctopo);
47 
50 
52  void computeSend(const void* data, vAbstrait& vdarray, vector<unsigned>& destid);
53 
55  bool computeReceive(Abstrait* darray);
56 
58  Abstrait* getResult() const ;
59 };
60 
61 
62 #endif
bool setLocalDataConfiguration(const PaCO::PacoLocalData_t &ld)
bool computeReceive(Abstrait *darray)
Compute communication schedule on the server side.
Abstrait * getResult() const
If computeReceive returns ok, get the data.
bool setGlobalDataConfiguration(const PaCO::PacoGlobalData_t &gd)
const PaCO::distLoc_t & getMode() const
bool setClientConfiguration(const PaCO::PacoTopology_t &ctopo)
void computeSend(const void *data, vAbstrait &vdarray, vector< unsigned > &destid)
Compute communication schedule on the client side.
bool setServerConfiguration(const PaCO::PacoTopology_t &stopo)
distLoc_t
Definition: PaCO++.idl:12
bool setMode(const PaCO::distLoc_t mode)