Commit 8988f7dc authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

use pid instead of rank

parent 1205166f
......@@ -57,7 +57,7 @@ void dtkDistributedCommunicator::uninitialize(void)
// DTK_DEFAULT_IMPLEMENTATION;
}
int dtkDistributedCommunicator::rank(void)
int dtkDistributedCommunicator::pid(void)
{
// DTK_DEFAULT_IMPLEMENTATION;
return 0;
......@@ -89,5 +89,3 @@ void dtkDistributedCommunicator::put(qint32 dest, qlonglong position, qlonglong
}
// template<class T> T * get(qint32 from, qlonglong position, qlonglong size, qlonglong buffer_id);
// template<class T> void put(qint32 dest, qlonglong position, qlonglong size, const T &data, qlonglong buffer_id);
......@@ -55,7 +55,7 @@ public:
// template<class T> void put(qint32 dest, qlonglong position, qlonglong size, const T &data, qlonglong buffer_id);
public:
virtual qint32 rank(void);
virtual qint32 pid(void);
virtual qint32 size(void);
};
......@@ -3,9 +3,9 @@
* Author: Thibaud Kloczko
* Created: Tue Feb 5 14:12:49 2013 (+0100)
* Version:
* Last-Updated: 2013 Fri Feb 8 15:56:49 (+0100)
* By: Thibaud Kloczko
* Update #: 174
* Last-Updated: lun. févr. 11 11:08:38 2013 (+0100)
* By: Nicolas Niclausse
* Update #: 177
*/
/* Change Log:
......@@ -43,9 +43,9 @@ template<typename T> dtkDistributedContainer<T>::~dtkDistributedContainer(void)
template<typename T> void dtkDistributedContainer<T>::allocate(void)
{
m_buffer_size = m_mapper->count(m_comm->rank());
m_buffer_size = m_mapper->count(m_comm->pid());
m_buffer = new T[m_buffer_size];
// m_buffer_id = m_comm->allocate(m_mapper->count(m_comm->rank()), sizeof(T), m_buffer);
// m_buffer_id = m_comm->allocate(m_mapper->count(m_comm->pid()), sizeof(T), m_buffer);
};
template <typename T> qlonglong dtkDistributedContainer<T>::size(void) const
......@@ -65,7 +65,7 @@ template <typename T> void dtkDistributedContainer<T>::setLocal(const qlonglong&
template <typename T> T dtkDistributedContainer<T>::at(const qlonglong& global_id)
{
qint32 me = m_comm->rank();
qint32 me = m_comm->pid();
qint32 owner = static_cast<qint32>(m_mapper->owner(global_id));
qlonglong pos = m_mapper->globalToLocal(global_id);
......
......@@ -72,7 +72,7 @@ void dtkDistributedContainerTestCase::testGlobal(void)
QVERIFY(N == c.size());
if (comm.rank() == 0) {
if (comm.pid() == 0) {
dtkDistributedGlobalIterator<qlonglong>& g_it = c.globalIterator();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment