Commit 0a75b7b2 authored by NICLAUSSE Nicolas's avatar NICLAUSSE Nicolas
Browse files

first version of dtkDistributedCommunicator API

parent ca5c7742
### CMakeLists.txt ---
##
### CMakeLists.txt ---
##
## Author: Julien Wintz
## Created: Mon Feb 4 12:16:39 2013 (+0100)
## Version:
## Last-Updated: 2013 Thu Feb 7 12:25:52 (+0100)
## By: Thibaud Kloczko
## Update #: 32
######################################################################
##
##
### Change Log:
##
##
######################################################################
project(dtkDistributed)
......@@ -19,6 +15,7 @@ project(dtkDistributed)
## #################################################################
set(${PROJECT_NAME}_HEADERS
dtkDistributedCommunicator.h
dtkDistributedCommunicatorPlugin
dtkDistributedCommunicatorPlugin.h
dtkDistributedCommunicatorPluginManager
......@@ -28,6 +25,7 @@ set(${PROJECT_NAME}_HEADERS
dtkDistributedMapper.h)
set(${PROJECT_NAME}_SOURCES
dtkDistributedCommunicator.cpp
dtkDistributedCommunicatorPluginManager.cpp
dtkDistributedMapper.cpp)
......
/* @(#)dtkDistributedCommunicator.cpp ---
*
* Author: Nicolas Niclausse
* Copyright (C) 2013 - Nicolas Niclausse, Inria.
* Created: 2013/02/07 13:59:41
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#include "dtkDistributedCommunicator.h"
// #include <dtk/dtkGlobal.h>
dtkDistributedCommunicator::dtkDistributedCommunicator(void) : QObject()
{
}
dtkDistributedCommunicator::~dtkDistributedCommunicator(void)
{
// delete d;
// d = NULL;
}
dtkDistributedCommunicator::dtkDistributedCommunicator(const dtkDistributedCommunicator& other)
{
}
dtkDistributedCommunicator& dtkDistributedCommunicator::operator = (const dtkDistributedCommunicator& other)
{
return *this;
}
void dtkDistributedCommunicator::initialize(void)
{
// DTK_DEFAULT_IMPLEMENTATION;
}
bool dtkDistributedCommunicator::initialized(void)
{
// DTK_DEFAULT_IMPLEMENTATION;
return false;
}
void dtkDistributedCommunicator::uninitialize(void)
{
// DTK_DEFAULT_IMPLEMENTATION;
}
int dtkDistributedCommunicator::rank(void)
{
// DTK_DEFAULT_IMPLEMENTATION;
return -1;
}
int dtkDistributedCommunicator::size(void)
{
// DTK_DEFAULT_IMPLEMENTATION;
return 0;
}
qlonglong dtkDistributedCommunicator::allocate(qlonglong count, qlonglong size, void *buffer)
{
return -1;
}
QByteArray dtkDistributedCommunicator::get(qint32 from, qlonglong position , qlonglong size, qlonglong buffer_id)
{
return QByteArray();
}
void dtkDistributedCommunicator::put(qint32 dest, qlonglong position, qlonglong size, const QByteArray &data, qlonglong buffer_id)
{
}
// 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);
/* dtkDistributedCommunicator.h ---
*
* Author: Nicolas Niclausse
* Copyright (C) 2013 - Nicolas Niclausse, Inria.
* Created: 2013/02/07 11:38:59
*/
/* Commentary:
*
*/
/* Change log:
*
*/
#pragma once
#include <QtCore>
// class dtkDistributedCommunicatorPrivate;
class dtkDistributedCommunicator : public QObject
{
Q_OBJECT
public:
dtkDistributedCommunicator(void);
virtual ~dtkDistributedCommunicator(void);
public:
// use the same value as defined in mpi.h
static const qint32 ANY_TAG = -1;
static const qint32 ANY_SOURCE = -1;
public:
dtkDistributedCommunicator(const dtkDistributedCommunicator& other);
dtkDistributedCommunicator& operator = (const dtkDistributedCommunicator& other);
public:
virtual void initialize(void);
virtual bool initialized(void);
virtual void uninitialize(void);
public:
virtual qlonglong allocate(qlonglong count, qlonglong size, void *buffer);
virtual QByteArray get(qint32 from, qlonglong position , qlonglong size, qlonglong buffer_id);
virtual void put(qint32 dest, qlonglong position, qlonglong size, const QByteArray &data, qlonglong buffer_id);
// public:
// 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);
public:
virtual qint32 rank(void);
virtual qint32 size(void);
};
Markdown is supported
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