Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[Manta] r2064 - in trunk: Engine/ImageTraversers Interface StandAlone


Chronological Thread 
  • From: "Thiago Ize" <thiago@sci.utah.edu>
  • To: manta@sci.utah.edu
  • Subject: [Manta] r2064 - in trunk: Engine/ImageTraversers Interface StandAlone
  • Date: Wed, 13 Feb 2008 18:16:41 -0700 (MST)

Author: thiago
Date: Wed Feb 13 18:16:40 2008
New Revision: 2064

Modified:
   trunk/Engine/ImageTraversers/DeadlineImageTraverser.cc
   trunk/Engine/ImageTraversers/DeadlineImageTraverser.h
   trunk/Interface/RandomNumberGenerator.h
   trunk/StandAlone/CMakeLists.txt
Log:
StandAlone/CMakeLists.txt:
  -Added a test for the path traced cornell box using the deadline
   image traverser.

Interface/RandomNumberGenerator.h:
  -inling these two function results in the cornel box test going 1.25x 
faster on 32 bit osx. Improvement is smaller for 64 bit.

Engine/ImageTraversers/DeadlineImageTraverser:
  -Added -dart_benchmark argument which causes the render time to be
   output in dart format and manta to exit when the image
   converges. This allows us to actually measure the performance of
   this image traverser which always has the same framerate. Note that
   I feel the current method is a little hackish...


Modified: trunk/Engine/ImageTraversers/DeadlineImageTraverser.cc
==============================================================================
--- trunk/Engine/ImageTraversers/DeadlineImageTraverser.cc      (original)
+++ trunk/Engine/ImageTraversers/DeadlineImageTraverser.cc      Wed Feb 13 
18:16:40 2008
@@ -78,6 +78,7 @@
   ShowTimeSupersample = false;
   FIFO_cutoff = 1.f;
   use_render_region = false;
+  do_dart_benchmark = false;
 
   float frameRate = 15;
   ypacketsize = 1;
@@ -126,6 +127,8 @@
         throw IllegalArgument("DeadlineImageTraverser -refinement", i, args);
     } else if(arg == "-showtime"){
       ShowTimeSupersample = true;
+    } else if(arg == "-dart_benchmark"){
+      do_dart_benchmark = true;
     } else {
       throw IllegalArgument("DeadlineImageTraverser", i, args);
     }
@@ -283,7 +286,15 @@
       for (int i = 0; i < kNumJitterLevels; i++) {
         total_samples *= 4;
       }
-      cerr << "Took " << total_time << " seconds to refine to "<< 
total_samples <<" spp" << endl;
+      if (do_dart_benchmark) {
+        //This is an ugly hack to get benchmarking information out of
+        //this constant frame rate image traverser. Really don't like
+        //having this hardcoded exit though.
+        std::cout << "<DartMeasurement name=\"total_time\" 
tpe=\"numeric/double\">"<<total_time<<"</DartMeasurement>\n";
+        context.rtrt_int->finish();
+      }
+      else
+        cerr << "Took " << total_time << " seconds to refine to "<< 
total_samples <<" spp" << endl;
     }
   }
 }

Modified: trunk/Engine/ImageTraversers/DeadlineImageTraverser.h
==============================================================================
--- trunk/Engine/ImageTraversers/DeadlineImageTraverser.h       (original)
+++ trunk/Engine/ImageTraversers/DeadlineImageTraverser.h       Wed Feb 13 
18:16:40 2008
@@ -113,6 +113,7 @@
     bool ShowTimeSupersample;
     bool converged;
     double StartFrameTime;
+    bool do_dart_benchmark;
     enum PriorityScheme {
       FIFO, LuminanceVariance, Contrast, FIFO_to_LumVar, Center
     };

Modified: trunk/Interface/RandomNumberGenerator.h
==============================================================================
--- trunk/Interface/RandomNumberGenerator.h     (original)
+++ trunk/Interface/RandomNumberGenerator.h     Wed Feb 13 18:16:40 2008
@@ -107,13 +107,13 @@
     }
 
 
-    virtual double nextDouble() {
+    //Since these are not virtual, need to be careful that child
+    //classes don't break. Inlining removes a sizable call
+    //overhead.
+    inline double nextDouble() {
       return ( (double)nextInt() * (1./4294967296.) );
     }
-
-    //TODO (thiago): Figure out how to inline this so that the HUGE
-    //calling overhead can dissapear.
-    virtual float nextFloat() {
+    inline float nextFloat() {
       return ( (float)nextInt() * (float)((1./4294967296.)) );
     }
   };

Modified: trunk/StandAlone/CMakeLists.txt
==============================================================================
--- trunk/StandAlone/CMakeLists.txt     (original)
+++ trunk/StandAlone/CMakeLists.txt     Wed Feb 13 18:16:40 2008
@@ -21,6 +21,12 @@
                ADD_BUNNY_TEST("CGT")
        ENDIF(MANTA_SSE)
   ENDIF( EXISTS "${bunny_sci_model}" )
+  
+  SET(IMAGE_TRAVERSER_ARG  -imagetraverser "deadline (-dart_benchmark)")
+  # We set nodisplaybench-dart to do a lot of frames so that the
+  # deadline image traverser can finish before the benchmark finishes.
+  ADD_TEST(CornellBoxPathTraced_NP4 ${CMAKE_BINARY_DIR}/bin/manta -np 4 -res 
128x128 -scene "${CMAKE_SOURCE_DIR}/scenes/cornell_box.rtml" -renderer 
pathtracer ${IMAGE_TRAVERSER_ARG} -nodisplaybench-dart 10000 10)
+
 ENDIF(BUILD_TESTING)
          
 SET (BUILD_OCTVOL_BUILD 0 CACHE BOOL "Include .v3c1 tools")




  • [Manta] r2064 - in trunk: Engine/ImageTraversers Interface StandAlone, Thiago Ize, 02/13/2008

Archive powered by MHonArc 2.6.16.

Top of page