Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r1925 - trunk/Core/Util


Chronological Thread 
  • From: boulos@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [Manta] r1925 - trunk/Core/Util
  • Date: Wed, 12 Dec 2007 17:21:21 -0700 (MST)

Author: boulos
Date: Wed Dec 12 17:21:19 2007
New Revision: 1925

Modified:
   trunk/Core/Util/ApproximatePriorityQueue.h
Log:
Core/Util/ApproximatePriorityQueue.h

 Avoid allocating an array of CheapRNGs by switching to MT_RNG (these will 
have less correlation anyway). An alternative would be to use the same setup 
as the vector of mutexes, so that we don't get AlignedAllocator problems 
(can't do array allocation)

Modified: trunk/Core/Util/ApproximatePriorityQueue.h
==============================================================================
--- trunk/Core/Util/ApproximatePriorityQueue.h  (original)
+++ trunk/Core/Util/ApproximatePriorityQueue.h  Wed Dec 12 17:21:19 2007
@@ -3,7 +3,7 @@
 
 #include <Core/Util/PriorityQueue.h>
 
-#include <Core/Math/CheapRNG.h>
+#include <Core/Math/MT_RNG.h>
 #include <Core/Thread/Mutex.h>
 #include <vector>
 
@@ -28,7 +28,7 @@
 
     ApproximatePriorityQueue(size_t num_queues, size_t max_threads = 64) :
       num_queues(num_queues), max_threads(max_threads) {
-      rngs = new CheapRNG[max_threads];
+      rngs = new MT_RNG[max_threads];
       for (size_t i = 0; i < max_threads; i++) {
         rngs[i].seed(i * 12345 + 62284);
       }
@@ -201,7 +201,7 @@
 
     size_t num_queues;
     size_t max_threads;
-    CheapRNG* rngs;
+    MT_RNG* rngs;
     QueueType* queues;
     std::vector<Mutex*> mutexes;
   };




  • [Manta] r1925 - trunk/Core/Util, boulos, 12/12/2007

Archive powered by MHonArc 2.6.16.

Top of page