.../
... + -- EO
| |
| |
+-- src ----- + -- EDO
| |
| |
+-- test + -- MO
| |
| |
+-- tutorial + -- MOEO
| |
| |
+-- doc + -- SMP
| |
| |
... + -- EOMPI
|
|
+ -- EOSERIAL
Question for current maintainers: ./README: new release?
Also:
* Moving out eompi & eoserial modules (issue #2).
* Correction of the errors when executing "make doc" command.
* Adding a solution for the conflicting headers problem (see the two CMake Cache
Values: PROJECT_TAG & PROJECT_HRS_INSTALL_SUBPATH) (issue #1)
* Header inclusions:
** src: changing absolute paths into relative paths ('#include <...>' -> '#include "..."')
** test, tutorial: changing relative paths into absolute paths ('#include "..."' -> '#include <...>')
* Moving out some scripts from EDO -> to the root
* Add a new script for compilation and installation (see build_gcc_linux_install)
* Compilation with uBLAS library or EDO module: now ok
* Minor modifications on README & INSTALL files
* Comment eompi failed tests with no end
*** TODO: CPack (debian (DEB) & RedHat (RPM) packages) (issues #6 & #7) ***
51 lines
1.1 KiB
C++
Executable file
51 lines
1.1 KiB
C++
Executable file
# ifndef __T_MPI_COMMON_H__
|
|
# define __T_MPI_COMMON_H__
|
|
|
|
#include <paradiseo/eoserial.h>
|
|
|
|
/**
|
|
* @file t-mpi-common.h
|
|
*
|
|
* This file shows an example of serialization of a primitive type, so as to be used in a parallel algorithm.
|
|
* It is fully compatible with the basic type, by implementing conversion operator and constructor based on type.
|
|
* It can contain any simple type which can be written in a std::ostream.
|
|
*/
|
|
|
|
template< class T >
|
|
struct SerializableBase : public eoserial::Persistent
|
|
{
|
|
public:
|
|
|
|
operator T&()
|
|
{
|
|
return _value;
|
|
}
|
|
|
|
SerializableBase() : _value()
|
|
{
|
|
// empty
|
|
}
|
|
|
|
SerializableBase( T base ) : _value( base )
|
|
{
|
|
// empty
|
|
}
|
|
|
|
void unpack( const eoserial::Object* obj )
|
|
{
|
|
eoserial::unpack( *obj, "value", _value );
|
|
}
|
|
|
|
eoserial::Object* pack(void) const
|
|
{
|
|
eoserial::Object* obj = new eoserial::Object;
|
|
obj->add("value", eoserial::make( _value ) );
|
|
return obj;
|
|
}
|
|
|
|
private:
|
|
T _value;
|
|
};
|
|
|
|
|
|
# endif // __T_MPI_COMMON_H__
|