MADNESS 0.10.1
Classes | Namespaces | Functions
macrotaskq.h File Reference

Declares the macrotaskq and MacroTaskBase classes. More...

#include <madness/world/cloud.h>
#include <madness/world/world.h>
#include <madness/mra/macrotaskpartitioner.h>
Include dependency graph for macrotaskq.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  madness::madness::archive::ArchiveLoadImpl< Archive, std::shared_ptr< ScalarResult< T > > >
 
struct  madness::madness::archive::ArchiveStoreImpl< Archive, std::shared_ptr< ScalarResult< T > > >
 
struct  madness::MacroTask< taskT >::io_redirect
 RAII class to redirect cout to a file. More...
 
struct  madness::is_scalar_result_ptr< typename >
 
struct  madness::is_scalar_result_ptr< std::shared_ptr< madness::ScalarResult< T > > >
 
struct  madness::is_scalar_result_ptr_vector< typename >
 
struct  madness::is_scalar_result_ptr_vector< std::vector< std::shared_ptr< typename madness::ScalarResult< T > > > >
 
struct  madness::MacroTask< taskT >::is_vector< Q >
 
struct  madness::MacroTask< taskT >::is_vector< std::vector< Q > >
 
class  madness::MacroTask< taskT >
 
class  madness::MacroTaskBase
 base class More...
 
class  madness::MacroTaskIntermediate< macrotaskT >
 
class  madness::MacroTask< taskT >::MacroTaskInternal
 
class  madness::MacroTaskOperationBase
 
class  madness::MacroTaskQ
 
class  madness::ScalarResult< T >
 helper class for returning the result of a task, which is not a madness Function, but a simple scalar More...
 

Namespaces

namespace  madness
 Namespace for all elements and tools of MADNESS.
 

Functions

template<typename T >
void madness::gaxpy (const double a, ScalarResult< T > &left, const double b, const T &right, const bool fence=true)
 the result type of a macrotask must implement gaxpy
 
template<typename T >
std::vector< std::shared_ptr< ScalarResult< T > > > madness::scalar_result_shared_ptr_vector (World &world, std::size_t n)
 helper function to create a vector of ScalarResult, circumventing problems with the constructors
 

Detailed Description

Declares the macrotaskq and MacroTaskBase classes.

A MacroTaskq executes tasks on World objects, e.g. differentiation of a function or other arithmetic. Complex algorithms can be implemented.

The universe world is split into subworlds, each of them executing macrotasks of the task queue. This improves locality and speedups for large number of compute nodes, by reducing communications within worlds.

The user defines a macrotask (an example is found in test_vectormacrotask.cc), the tasks are lightweight and carry only bookkeeping information, actual input and output are stored in a cloud (see cloud.h)

The user-defined macrotask is derived from MacroTaskIntermediate and must implement the run() method. A heterogeneous task queue is possible.

TODO: priority q TODO: task submission from inside task (serialize task instead of replicate) TODO: update documentation TODO: consider serializing task member variables