Text archives Help
- From: boulos@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [Manta] r1672 - trunk/Interface
- Date: Mon, 20 Aug 2007 20:16:44 -0600 (MDT)
Author: boulos
Date: Mon Aug 20 20:16:44 2007
New Revision: 1672
Added:
trunk/Interface/Context.cc
Log:
Strangely psvn didn't actually mark this file for
addition (thanks for the catch Abe)
Added: trunk/Interface/Context.cc
==============================================================================
--- (empty file)
+++ trunk/Interface/Context.cc Mon Aug 20 20:16:44 2007
@@ -0,0 +1,34 @@
+#include <Interface/Context.h>
+#include <Core/Thread/Barrier.h>
+
+using namespace Manta;
+// NOTE(boulos): I believe these default values will result in correct
+// behavior when people create "dummy" contexts that are mixed with
+// the appropriate ones that call done.
+PreprocessContext::PreprocessContext() :
+ manta_interface(0),
+ proc(0),
+ numProcs(1),
+ globalLights(0),
+ barrier(new SCIRun::Barrier("preprocess barrier")) {
+}
+
+PreprocessContext::PreprocessContext(MantaInterface* manta_interface,
+ int proc,
+ int numProcs,
+ LightSet* globalLights) :
+ manta_interface(manta_interface),
+ proc(proc),
+ numProcs(numProcs),
+ globalLights(globalLights),
+ barrier(new SCIRun::Barrier("preprocess barrier")) {
+}
+
+PreprocessContext::~PreprocessContext() {
+ delete barrier;
+}
+
+void PreprocessContext::done() const {
+ barrier->wait(numProcs);
+}
+
- [Manta] r1672 - trunk/Interface, boulos, 08/20/2007
Archive powered by MHonArc 2.6.16.