git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1201 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
parent
6837cf133d
commit
7a57ae90ee
1 changed files with 61 additions and 74 deletions
|
|
@ -3,7 +3,7 @@
|
|||
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
|
||||
* (C) OPAC Team, LIFL, 2002-2008
|
||||
*
|
||||
* Clive Canape
|
||||
* Alexandru-Adrian TANTAR
|
||||
*
|
||||
* This software is governed by the CeCILL license under French law and
|
||||
* abiding by the rules of distribution of free software. You can use,
|
||||
|
|
@ -52,6 +52,7 @@
|
|||
#include "core/peo_debug.h"
|
||||
|
||||
|
||||
|
||||
class peoAsyncDataTransfer : public Cooperative, public eoUpdater
|
||||
{
|
||||
|
||||
|
|
@ -124,36 +125,15 @@ class peoAsyncDataTransfer : public Cooperative, public eoUpdater
|
|||
}
|
||||
|
||||
|
||||
void operator()();
|
||||
|
||||
void pack();
|
||||
void unpack();
|
||||
|
||||
void packSynchronizeReq();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
void sendData();
|
||||
void receiveData();
|
||||
|
||||
|
||||
private:
|
||||
|
||||
// the neighboring topology
|
||||
Topology& topology;
|
||||
|
||||
// source and destination end-points
|
||||
AbstractMsgTransferQueue* source;
|
||||
AbstractMsgTransferQueue* destination;
|
||||
|
||||
std :: queue< Cooperative* > coop_em;
|
||||
};
|
||||
|
||||
|
||||
void peoAsyncDataTransfer :: pack()
|
||||
void operator()()
|
||||
{
|
||||
|
||||
sendData(); // sending data
|
||||
receiveData(); // receiving data
|
||||
}
|
||||
|
||||
void pack()
|
||||
{
|
||||
lock ();
|
||||
|
||||
::pack( coop_em.front()->getKey() );
|
||||
|
|
@ -163,7 +143,7 @@ void peoAsyncDataTransfer :: pack()
|
|||
unlock();
|
||||
}
|
||||
|
||||
void peoAsyncDataTransfer :: unpack()
|
||||
void unpack()
|
||||
{
|
||||
|
||||
lock ();
|
||||
|
|
@ -171,11 +151,12 @@ void peoAsyncDataTransfer :: unpack()
|
|||
unlock();
|
||||
}
|
||||
|
||||
void peoAsyncDataTransfer :: packSynchronizeReq()
|
||||
{
|
||||
}
|
||||
void packSynchronizeReq(){}
|
||||
|
||||
void peoAsyncDataTransfer :: sendData()
|
||||
|
||||
private:
|
||||
|
||||
void sendData()
|
||||
{
|
||||
|
||||
std :: vector< Cooperative* > in, out;
|
||||
|
|
@ -193,7 +174,7 @@ void peoAsyncDataTransfer :: sendData()
|
|||
}
|
||||
}
|
||||
|
||||
void peoAsyncDataTransfer :: receiveData()
|
||||
void receiveData()
|
||||
{
|
||||
|
||||
lock ();
|
||||
|
|
@ -210,12 +191,18 @@ void peoAsyncDataTransfer :: receiveData()
|
|||
unlock();
|
||||
}
|
||||
|
||||
void peoAsyncDataTransfer :: operator()()
|
||||
{
|
||||
|
||||
sendData(); // sending data
|
||||
receiveData(); // receiving data
|
||||
}
|
||||
private:
|
||||
|
||||
// the neighboring topology
|
||||
Topology& topology;
|
||||
|
||||
// source and destination end-points
|
||||
AbstractMsgTransferQueue* source;
|
||||
AbstractMsgTransferQueue* destination;
|
||||
|
||||
std :: queue< Cooperative* > coop_em;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue