[opengtl-commits] [439] call evaluateDepends

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 439
Author:   cyrille
Date:     2008-10-10 00:44:01 +0200 (Fri, 10 Oct 2008)

Log Message:
-----------
call evaluateDepends

Modified Paths:
--------------
    trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.cpp
    trunk/OpenGTL/OpenShiva/tests/imagegenerators/raytracer.shiva


Modified: trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.cpp	2008-10-09 22:33:17 UTC (rev 438)
+++ trunk/OpenGTL/OpenShiva/OpenShiva/Kernel.cpp	2008-10-09 22:44:01 UTC (rev 439)
@@ -134,6 +134,15 @@
     // Create the generateEvaluatePixeles LLVM function
     d->evaluatePixelesFunction = CodeGenerator::generateEvaluatePixeles( this, d->count_channels_generic );
     d->name = nameSpace;
+    // Call evaluateDepends as needed
+    GTLCore::Function* evaluateDependentsFunc = d->m_moduleData->function( "MyKernel", "evaluateDependents");
+    if( evaluateDependentsFunc )
+    {
+
+      void (*func)() = (void (*)())GTLCore::VirtualMachine::instance()->getPointerToFunction( evaluateDependentsFunc, 0 );
+      (*func)();
+    }
+
   } else {
     cleanup();
     d->compilationErrors = c.errorMessages();

Modified: trunk/OpenGTL/OpenShiva/tests/imagegenerators/raytracer.shiva
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/imagegenerators/raytracer.shiva	2008-10-09 22:33:17 UTC (rev 438)
+++ trunk/OpenGTL/OpenShiva/tests/imagegenerators/raytracer.shiva	2008-10-09 22:44:01 UTC (rev 439)
@@ -324,6 +324,13 @@
             }
             else rayShots = 0;
         }
+        
+        // TODO remove this:
+        for(int i = 0; i < 3; ++i)
+        {
+          if( dst[i] < 0 ) dst[i] = 0;
+          if( dst[i] > 1 ) dst[i] = 1;
+        }
     }
     
     region generated()


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/