freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Use Pooma::begin/endExpression() where appropriate


From: Richard Guenther
Subject: [PATCH] Use Pooma::begin/endExpression() where appropriate
Date: Thu, 11 Dec 2003 11:46:35 +0100 (CET)

Hi!

This uses Pooma::begin/endExpression() at places where it makes no
difference.

Ok?

Richard.


2003Dec11  Richard Guenther <address@hidden>

        * src/Evaluator/PatchFunction.h: replace begin/endGeneration()
        calls with begin/endExpression() calls where appropriate.

===== PatchFunction.h 1.3 vs edited =====
--- 1.3/r2/src/Evaluator/PatchFunction.h        Thu Oct 23 14:41:02 2003
+++ edited/PatchFunction.h      Thu Dec 11 11:44:25 2003
@@ -138,16 +138,10 @@
   {
     typedef typename EvaluatorTag1<A1>::Evaluator_t Evaluator_t;
     PatchEvaluator<Evaluator_t> evaluator;
-    Pooma::Scheduler_t &scheduler = Pooma::scheduler();
-    scheduler.beginGeneration();
+    Pooma::beginExpression();
     evaluator.evaluate(a1(), function);
     notifyEngineWrite(a1.engine());
-    scheduler.endGeneration();
-
-    if (Pooma::blockingExpressions())
-    {
-      Pooma::blockAndEvaluate();
-    }
+    Pooma::endExpression();
   }

   template<class A1, class Function>
@@ -155,15 +149,9 @@
   {
     typedef typename EvaluatorTag1<A1>::Evaluator_t Evaluator_t;
     PatchEvaluator<Evaluator_t> evaluator;
-    Pooma::Scheduler_t &scheduler = Pooma::scheduler();
-    scheduler.beginGeneration();
+    Pooma::beginExpression();
     evaluator.evaluateRead(a1(), function);
-    scheduler.endGeneration();
-
-    if (Pooma::blockingExpressions())
-    {
-      Pooma::blockAndEvaluate();
-    }
+    Pooma::endExpression();
   }

   template<class A1,class A2,class Function>
@@ -172,16 +160,10 @@
   {
     typedef typename EvaluatorTag<A1,A2>::Evaluator_t Eval_t;
     PatchEvaluator<Eval_t> evaluator;
-    Pooma::Scheduler_t &scheduler = Pooma::scheduler();
-    scheduler.beginGeneration();
+    Pooma::beginExpression();
     evaluator.evaluate2(a1(), a2(), function);
     notifyEngineWrite(a1.engine());
-    scheduler.endGeneration();
-
-    if (Pooma::blockingExpressions())
-    {
-      Pooma::blockAndEvaluate();
-    }
+    Pooma::endExpression();
   }

   template<class A1, class A2, class A3, class Function>
@@ -195,16 +177,10 @@
     typedef typename EvaluatorCombine<Eval1_t,Eval23_t>::Evaluator_t Eval_t;

     PatchEvaluator<Eval_t> evaluator;
-    Pooma::Scheduler_t &scheduler = Pooma::scheduler();
-    scheduler.beginGeneration();
+    Pooma::beginExpression();
     evaluator.evaluate3(a1(), a2(), a3(), function);
     notifyEngineWrite(a1.engine());
-    scheduler.endGeneration();
-
-    if (Pooma::blockingExpressions())
-    {
-      Pooma::blockAndEvaluate();
-    }
+    Pooma::endExpression();
   }

 private:
@@ -372,7 +348,7 @@
                const PatchParticle1<Write1> &) const
   {
     Pooma::Scheduler_t &scheduler = Pooma::scheduler();
-    scheduler.beginGeneration();
+    Pooma::beginExpression();

     int n = a1.numPatchesLocal();
     int i;
@@ -389,12 +365,7 @@

     notifyEngineWrite(a1.engine(), WrappedInt<Write1>());

-    scheduler.endGeneration();
-
-    if (Pooma::blockingExpressions())
-    {
-      Pooma::blockAndEvaluate();
-    }
+    Pooma::endExpression();
   }

   template<class A1, class Function, bool Write1>
@@ -441,7 +412,7 @@
                 const PatchParticle2<Write1, Write2> &) const
   {
     Pooma::Scheduler_t &scheduler = Pooma::scheduler();
-    scheduler.beginGeneration();
+    Pooma::beginExpression();

     int n1 = a1.numPatchesLocal();
     int n2 = a2.numPatchesLocal();
@@ -463,12 +434,7 @@
     notifyEngineWrite(a1.engine(), WrappedInt<Write1>());
     notifyEngineWrite(a2.engine(), WrappedInt<Write2>());

-    scheduler.endGeneration();
-
-    if (Pooma::blockingExpressions())
-    {
-      Pooma::blockAndEvaluate();
-    }
+    Pooma::endExpression();
   }

   template<class A1, class A2, class Function, bool Write1, bool Write2>
@@ -520,7 +486,7 @@
                 const PatchParticle3<Write1, Write2, Write3> &) const
   {
     Pooma::Scheduler_t &scheduler = Pooma::scheduler();
-    scheduler.beginGeneration();
+    Pooma::beginExpression();

     int n1 = a1.numPatchesLocal();
     int n2 = a2.numPatchesLocal();
@@ -546,12 +512,7 @@
     notifyEngineWrite(a2.engine(), WrappedInt<Write2>());
     notifyEngineWrite(a3.engine(), WrappedInt<Write3>());

-    scheduler.endGeneration();
-
-    if (Pooma::blockingExpressions())
-    {
-      Pooma::blockAndEvaluate();
-    }
+    Pooma::endExpression();
   }

   template<class A1, class A2, class A3, class Function,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]