git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@1201 331e1502-861f-0410-8da2-ba01fb791d7f

This commit is contained in:
atantar 2008-06-15 16:29:06 +00:00
commit 7a57ae90ee

View file

@ -3,7 +3,7 @@
* Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008 * Copyright (C) DOLPHIN Project-Team, INRIA Futurs, 2006-2008
* (C) OPAC Team, LIFL, 2002-2008 * (C) OPAC Team, LIFL, 2002-2008
* *
* Clive Canape * Alexandru-Adrian TANTAR
* *
* This software is governed by the CeCILL license under French law and * This software is governed by the CeCILL license under French law and
* abiding by the rules of distribution of free software. You can use, * abiding by the rules of distribution of free software. You can use,
@ -52,6 +52,7 @@
#include "core/peo_debug.h" #include "core/peo_debug.h"
class peoAsyncDataTransfer : public Cooperative, public eoUpdater class peoAsyncDataTransfer : public Cooperative, public eoUpdater
{ {
@ -124,36 +125,15 @@ class peoAsyncDataTransfer : public Cooperative, public eoUpdater
} }
void operator()(); 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()
{ {
sendData(); // sending data
receiveData(); // receiving data
}
void pack()
{
lock (); lock ();
::pack( coop_em.front()->getKey() ); ::pack( coop_em.front()->getKey() );
@ -163,7 +143,7 @@ void peoAsyncDataTransfer :: pack()
unlock(); unlock();
} }
void peoAsyncDataTransfer :: unpack() void unpack()
{ {
lock (); lock ();
@ -171,11 +151,12 @@ void peoAsyncDataTransfer :: unpack()
unlock(); unlock();
} }
void peoAsyncDataTransfer :: packSynchronizeReq() void packSynchronizeReq(){}
{
}
void peoAsyncDataTransfer :: sendData()
private:
void sendData()
{ {
std :: vector< Cooperative* > in, out; std :: vector< Cooperative* > in, out;
@ -193,7 +174,7 @@ void peoAsyncDataTransfer :: sendData()
} }
} }
void peoAsyncDataTransfer :: receiveData() void receiveData()
{ {
lock (); lock ();
@ -210,12 +191,18 @@ void peoAsyncDataTransfer :: receiveData()
unlock(); unlock();
} }
void peoAsyncDataTransfer :: operator()()
{
sendData(); // sending data private:
receiveData(); // receiving data
} // the neighboring topology
Topology& topology;
// source and destination end-points
AbstractMsgTransferQueue* source;
AbstractMsgTransferQueue* destination;
std :: queue< Cooperative* > coop_em;
};
#endif #endif