Text archives Help
- From: boulos@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [Manta] r1870 - in trunk: Core/Thread Model/Groups/private
- Date: Mon, 26 Nov 2007 23:16:59 -0700 (MST)
Author: boulos
Date: Mon Nov 26 23:16:57 2007
New Revision: 1870
Added:
trunk/Core/Thread/share.h
Modified:
trunk/Model/Groups/private/CGT.cc
trunk/Model/Groups/private/CGT.h
Log:
Core/Thread/share.h
Adding a file Steve missed (which probably needs to be updated)
Model/Groups/private/CGT.cc
Model/Groups/private/CGT.h
Fixing build break for CGT
Added: trunk/Core/Thread/share.h
==============================================================================
--- (empty file)
+++ trunk/Core/Thread/share.h Mon Nov 26 23:16:57 2007
@@ -0,0 +1,11 @@
+#undef SCISHARE
+
+#ifdef _WIN32
+#ifdef BUILD_Core_Thread
+#define SCISHARE __declspec(dllexport)
+#else
+#define SCISHARE __declspec(dllimport)
+#endif
+#else
+#define SCISHARE
+#endif
Modified: trunk/Model/Groups/private/CGT.cc
==============================================================================
--- trunk/Model/Groups/private/CGT.cc (original)
+++ trunk/Model/Groups/private/CGT.cc Mon Nov 26 23:16:57 2007
@@ -1,5 +1,5 @@
#include <Model/Groups/private/CGT.h>
-#include <SCIRun/Core/Thread/Time.h>
+#include <Core/Thread/Time.h>
#include <Core/Geometry/BBox.h>
#include <Core/Util/UpdateGraph.h>
#include <Interface/MantaInterface.h>
@@ -89,13 +89,13 @@
void Grid::rebuild(int proc, int numProcs)
{
if (proc == 0) {
- startGlobalBuildTime = SCIRun::Time::currentSeconds();
+ startGlobalBuildTime = Time::currentSeconds();
preFrameSetup(proc, numProcs); //currGroup size might have changed
}
CellData *myCell;
- double startThreadBuildTime = SCIRun::Time::currentSeconds();
+ double startThreadBuildTime = Time::currentSeconds();
PreprocessContext blah;
currGroup->computeBounds(blah, proc, numProcs);
@@ -188,14 +188,14 @@
if (firstTime || DISPLAY_BUILD_TIMES)
cout << "first stage of grid build : "
- << (SCIRun::Time::currentSeconds() - startThreadBuildTime)*1e3 <<
"ms" << endl;
+ << (Time::currentSeconds() - startThreadBuildTime)*1e3 << "ms" <<
endl;
}
barrier.wait(numProcs);
myCell = &cellVector[0];
- double startClearTime = SCIRun::Time::currentSeconds();
+ double startClearTime = Time::currentSeconds();
#if 0 || !defined(MACRO_CELLS)
const int start_z = (oldN[2] * proc) / numProcs;
@@ -255,7 +255,7 @@
{
char buf[128];
sprintf(buf, "%d: time to clear old grid: %fms\n",
- proc, (SCIRun::Time::currentSeconds() - startClearTime)*1e3);
+ proc, (Time::currentSeconds() - startClearTime)*1e3);
cout<<buf;
}
@@ -283,7 +283,7 @@
//whether this is slowing down the code...
barrier.wait(numProcs);
- double startSortTime = SCIRun::Time::currentSeconds();
+ double startSortTime = Time::currentSeconds();
for (int i = startObject; i < endObject; i++) {
BBox bbox;
@@ -331,13 +331,13 @@
if (DISPLAY_BUILD_TIMES) {
char buf[128];
sprintf(buf, "%d engriddingTimer time: %fms\n",
- proc, (SCIRun::Time::currentSeconds()-startSortTime)*1e3f);
+ proc, (Time::currentSeconds()-startSortTime)*1e3f);
cout<<buf;
}
barrier.wait(numProcs);
- double startMergeTime = SCIRun::Time::currentSeconds();
+ double startMergeTime = Time::currentSeconds();
for (int i=0; i < numProcs; i++) {
for (size_t k=0; k < buildQueues[i*numProcs +
proc].loc_primitives.size(); ++k) {
@@ -351,7 +351,7 @@
if (DISPLAY_BUILD_TIMES) {
char buf[128];
sprintf(buf, "%d merge time: %fms\n",
- proc, (SCIRun::Time::currentSeconds() - startMergeTime)*1e3);
+ proc, (Time::currentSeconds() - startMergeTime)*1e3);
cout<<buf;
}
@@ -363,7 +363,7 @@
barrier.wait(numProcs);
- double startMacroBuildTime = SCIRun::Time::currentSeconds();
+ double startMacroBuildTime = Time::currentSeconds();
const int length = N_mc[1]*N_mc[2] - 1;
const int start_iz = length*proc /
@@ -405,7 +405,7 @@
if (DISPLAY_BUILD_TIMES) {
char buf[128];
sprintf(buf, "%d macro cell build time: %fms\n",
- proc, (SCIRun::Time::currentSeconds() -
startMacroBuildTime)*1e3);
+ proc, (Time::currentSeconds() - startMacroBuildTime)*1e3);
cout<<buf;
}
@@ -425,7 +425,7 @@
if (firstTime|| DISPLAY_BUILD_TIMES)
cout << "grid built in "
- << (SCIRun::Time::currentSeconds() - startGlobalBuildTime)*1e3 <<
"ms\n\n";
+ << (Time::currentSeconds() - startGlobalBuildTime)*1e3 << "ms\n\n";
firstTime = false;
}
Modified: trunk/Model/Groups/private/CGT.h
==============================================================================
--- trunk/Model/Groups/private/CGT.h (original)
+++ trunk/Model/Groups/private/CGT.h Mon Nov 26 23:16:57 2007
@@ -7,7 +7,7 @@
#include <Interface/Context.h>
#include <Core/Math/SSEDefs.h>
#include <Core/Thread/Barrier.h>
-#include <SCIRun/Core/Thread/Mutex.h>
+#include <Core/Thread/Mutex.h>
#include <Core/Util/AlignedAllocator.h>
#include <ostream>
@@ -190,10 +190,10 @@
protected:
bool firstTime;
- SCIRun::Mutex mutex;
+ Mutex mutex;
int done_count;
- SCIRun::Barrier barrier;
- SCIRun::Mutex buildQueue_resize_mutex;
+ Barrier barrier;
+ Mutex buildQueue_resize_mutex;
Group *currGroup;
- [Manta] r1870 - in trunk: Core/Thread Model/Groups/private, boulos, 11/27/2007
Archive powered by MHonArc 2.6.16.