FreePOOMA
2.4.1
|
PatchFunction is mix-in class that encapsulates evaluation of patch-based functors in parallel. More...
#include "PETE/PETE.h"
#include "Pooma/PETE/AssertEquals.h"
#include "Evaluator/EvaluatorTags.h"
#include "Evaluator/Evaluator.h"
#include "Evaluator/PatchKernel.h"
#include "Engine/EnginePatch.h"
#include "Threads/PoomaCSem.h"
Classes | |
struct | PatchTag1 |
struct | PatchReadTag1 |
struct | PatchTag2 |
struct | PatchTag3 |
struct | PatchParticle1< Write1 > |
struct | PatchParticle2< Write1, Write2 > |
struct | PatchParticle3< Write1, Write2, Write3 > |
class | PatchEvaluator< EvalTag > |
class | PatchEvaluator< MainEvaluatorTag > |
class | PatchEvaluator< SinglePatchEvaluatorTag > |
class | PatchEvaluator< MultiPatchEvaluatorTag > |
class | ParticleEvaluator |
struct | ParticleEvaluator::NoOp |
class | PatchFunction< Function, Patch > |
class | PatchFunction< Function, PatchTag1 > |
class | PatchFunction< Function, PatchReadTag1 > |
class | PatchFunction< Function, PatchTag2 > |
class | PatchFunction< Function, PatchTag3 > |
class | PatchFunction< Function, PatchParticle1< Write1 > > |
class | PatchFunction< Function, PatchParticle2< Write1, Write2 > > |
class | PatchFunction< Function, PatchParticle3< Write1, Write2, Write3 > > |
Defines | |
#define | POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS(CLASS, MEMBER) |
PatchFunction is mix-in class that encapsulates evaluation of patch-based functors in parallel.
PatchFunctions are tools that allow you to apply a functor to the patches in an array in parallel. For example, you could write a functor:
struct MyFunction { template<class ArrayPatch> void apply(const ArrayPatch& a) const { for (i=0;i<a.domain().size();++i) { a(i) += 2; } } };
and apply it to an array with the PatchFunction:
PatchFunction<MyFunction,PatchTag1> myFunc; myFunc(array);
Iterates will be spawned for each patch in array, and MyFuntion::apply() will be called for each patch. The general form of PatchFunction is PatchFunction<Functor,Tag> func(c1,c2...); Constructor arguments are passed to the constructor of a functor object of type Functor. Tag is a policy tag specifying the type of action performed. Currently the following tags are supported:
#define POOMA_PATCHFUNCTION_ARGUMENT_CONSTRUCTORS | ( | CLASS, | |
MEMBER | |||
) |