fpmas 1.6
Classes | Namespaces
output.h File Reference
#include <fstream>
#include <sstream>
#include "fpmas/api/runtime/runtime.h"
#include "fpmas/scheduler/scheduler.h"
#include "fpmas/api/io/output.h"
#include "fpmas/communication/communication.h"
Include dependency graph for output.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fpmas::io::Void
 
struct  fpmas::io::Local< T >
 
class  fpmas::io::Local< T >::Single
 
class  fpmas::io::Local< T >::All
 
struct  fpmas::io::Reduce< T, BinaryOp, Mpi >
 
class  fpmas::io::Reduce< T, BinaryOp, Mpi >::Single
 
class  fpmas::io::Reduce< T, BinaryOp, Mpi >::All
 
class  fpmas::io::Cout
 
class  fpmas::io::StringOutput
 
class  fpmas::io::FileOutput
 
class  fpmas::io::DynamicFileOutput
 
class  fpmas::io::OutputTask
 
class  fpmas::io::OutputBase
 

Namespaces

namespace  fpmas
 
namespace  fpmas::io
 

Detailed Description

fpmas::api::output related implementations.

FPMAS defines a powerful output system that can be used to efficiently and easily collect data accross processes.

Data can be locally fetched on each process using a Watcher instance. Data can then be gathered, summed, filtered or any other operation thanks to the usage of DistributedOperation types, described below. For concrete usage and implementations, see fpmas::output::Local, fpmas::output::Reduce and fpmas::output::DistributedCsvOutput.

DistributedOperation Trait

A DistributedOperation, that can for example be used by fpmas::output::DistributedCsvOutput to specify distributed CSV fields, must satisfy the following requirements.

Member types

Member Type Description
Type Datatype used by local watchers
Params Extra parameters that can be passed to Single or All
Single Operator used when data must be returned on a single process
All Operator used when data must be returned on all processes

In addition, Single and All must satisfy the following requirements:

Single

Constructor

Single must define a constructor with the following signature:

Single(
int root,
const Watcher<T>& watcher,
const Params& params
)
Definition: communication.h:251
Parameters
commMPI communicator
rootprocess on which data must be returned. Data returned on all other processes is undefined.
watcherlocal watcher used on each process
paramsextra parameters

Call operator

Single must define a call operator that does not take any parameter and returns a instance of Type:

Type operator()();

This method must return fetched data if the current process is root: results returned on other processes are undefined.

All

Constructor

All must define a constructor with the following signature:

Single(
const Watcher<T>& watcher,
const Params& params
)
Parameters
commMPI communicator
watcherlocal watcher used on each process
paramsextra parameters

Call operator

All must define a call operator that does not take any parameter and returns a instance of Type:

Type operator()();

This method must return fetched data on all processes. Notice that this does not mean that fetched data is the same on all processes (see for example fpmas::output::Local).