[opengtl-commits] [294] * add test results for convolution and imagegenerators kernels

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


Revision: 294
Author:   cyrille
Date:     2008-07-02 00:23:37 +0200 (Wed, 02 Jul 2008)

Log Message:
-----------
* add test results for convolution and imagegenerators kernels
* add coumpoundcreation and operations for vectors test

Modified Paths:
--------------
    trunk/OpenGTL/OpenShiva/tests/CMakeLists.txt
    trunk/OpenGTL/OpenShiva/tests/imagegenerators/PlainGenerator.shiva
    trunk/OpenGTL/OpenShiva/tests/vectors/CMakeLists.txt
    trunk/OpenGTL/OpenShiva/tests/vectors/copy.shiva
    trunk/OpenGTL/OpenShiva/tests/vectors/copy4.shiva

Added Paths:
-----------
    trunk/OpenGTL/OpenShiva/tests/convolution/CMakeLists.txt
    trunk/OpenGTL/OpenShiva/tests/convolution/blur.shiva.png
    trunk/OpenGTL/OpenShiva/tests/convolution/copy.shiva.png
    trunk/OpenGTL/OpenShiva/tests/data/
    trunk/OpenGTL/OpenShiva/tests/data/fontromeu.png
    trunk/OpenGTL/OpenShiva/tests/imagegenerators/CMakeLists.txt
    trunk/OpenGTL/OpenShiva/tests/imagegenerators/Gradient.shiva.png
    trunk/OpenGTL/OpenShiva/tests/imagegenerators/MandelbrotSet.shiva.png
    trunk/OpenGTL/OpenShiva/tests/imagegenerators/PlainGenerator.shiva.png
    trunk/OpenGTL/OpenShiva/tests/vectors/coumpoundcreation.shiva
    trunk/OpenGTL/OpenShiva/tests/vectors/operations.shiva


Modified: trunk/OpenGTL/OpenShiva/tests/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/CMakeLists.txt	2008-07-01 22:22:11 UTC (rev 293)
+++ trunk/OpenGTL/OpenShiva/tests/CMakeLists.txt	2008-07-01 22:23:37 UTC (rev 294)
@@ -1,4 +1,6 @@
-add_subdirectory(parse)
-add_subdirectory(library)
-add_subdirectory(structures)
-add_subdirectory(vectors)
+add_subdirectory( parse )
+add_subdirectory( library )
+add_subdirectory( structures )
+add_subdirectory( vectors )
+add_subdirectory( imagegenerators )
+add_subdirectory( convolution )
\ No newline at end of file

Added: trunk/OpenGTL/OpenShiva/tests/convolution/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/convolution/CMakeLists.txt	                        (rev 0)
+++ trunk/OpenGTL/OpenShiva/tests/convolution/CMakeLists.txt	2008-07-01 22:23:37 UTC (rev 294)
@@ -0,0 +1,10 @@
+
+set( TESTS_FILES
+  blur.shiva
+  copy.shiva
+  )
+
+FOREACH( TEST_FILE ${TESTS_FILES} )
+  ADD_TEST(${TEST_FILE} ${SHIVATESTER} -c ${CMAKE_CURRENT_SOURCE_DIR}/${TEST_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/../data/fontromeu.png ${CMAKE_CURRENT_SOURCE_DIR}/${TEST_FILE}.png)
+ENDFOREACH( TEST_FILE )
+

Added: trunk/OpenGTL/OpenShiva/tests/convolution/blur.shiva.png
===================================================================
(Binary files differ)


Property changes on: trunk/OpenGTL/OpenShiva/tests/convolution/blur.shiva.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OpenGTL/OpenShiva/tests/convolution/copy.shiva.png
===================================================================
(Binary files differ)


Property changes on: trunk/OpenGTL/OpenShiva/tests/convolution/copy.shiva.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OpenGTL/OpenShiva/tests/data/fontromeu.png
===================================================================
(Binary files differ)


Property changes on: trunk/OpenGTL/OpenShiva/tests/data/fontromeu.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OpenGTL/OpenShiva/tests/imagegenerators/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/imagegenerators/CMakeLists.txt	                        (rev 0)
+++ trunk/OpenGTL/OpenShiva/tests/imagegenerators/CMakeLists.txt	2008-07-01 22:23:37 UTC (rev 294)
@@ -0,0 +1,11 @@
+
+set( TESTS_FILES
+  Gradient.shiva
+  MandelbrotSet.shiva
+  PlainGenerator.shiva
+  )
+
+FOREACH( TEST_FILE ${TESTS_FILES} )
+  ADD_TEST(${TEST_FILE} ${SHIVATESTER} -c ${CMAKE_CURRENT_SOURCE_DIR}/${TEST_FILE} ${CMAKE_CURRENT_SOURCE_DIR}/${TEST_FILE}.png)
+ENDFOREACH( TEST_FILE )
+

Added: trunk/OpenGTL/OpenShiva/tests/imagegenerators/Gradient.shiva.png
===================================================================
(Binary files differ)


Property changes on: trunk/OpenGTL/OpenShiva/tests/imagegenerators/Gradient.shiva.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: trunk/OpenGTL/OpenShiva/tests/imagegenerators/MandelbrotSet.shiva.png
===================================================================
(Binary files differ)


Property changes on: trunk/OpenGTL/OpenShiva/tests/imagegenerators/MandelbrotSet.shiva.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/OpenGTL/OpenShiva/tests/imagegenerators/PlainGenerator.shiva
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/imagegenerators/PlainGenerator.shiva	2008-07-01 22:22:11 UTC (rev 293)
+++ trunk/OpenGTL/OpenShiva/tests/imagegenerators/PlainGenerator.shiva	2008-07-01 22:23:37 UTC (rev 294)
@@ -2,10 +2,8 @@
 {
   void evaluatePixel(out pixel result)
   {
-    result[0] = 0.5;
-//    for(int i = 0; i < result.size; ++i )
-    {
-//      result[i] = 0.5;
-    }
+    result[0] = 0.2;
+    result[1] = 0.1;
+    result[2] = 0.3;
   }
 }

Added: trunk/OpenGTL/OpenShiva/tests/imagegenerators/PlainGenerator.shiva.png
===================================================================
(Binary files differ)


Property changes on: trunk/OpenGTL/OpenShiva/tests/imagegenerators/PlainGenerator.shiva.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: trunk/OpenGTL/OpenShiva/tests/vectors/CMakeLists.txt
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/vectors/CMakeLists.txt	2008-07-01 22:22:11 UTC (rev 293)
+++ trunk/OpenGTL/OpenShiva/tests/vectors/CMakeLists.txt	2008-07-01 22:23:37 UTC (rev 294)
@@ -3,6 +3,8 @@
   creation.shiva
   copy.shiva
   copy4.shiva
+  operations.shiva
+  coumpoundcreation.shiva
   )
 
 FOREACH( TEST_FILE ${TESTS_FILES} )

Modified: trunk/OpenGTL/OpenShiva/tests/vectors/copy.shiva
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/vectors/copy.shiva	2008-07-01 22:22:11 UTC (rev 293)
+++ trunk/OpenGTL/OpenShiva/tests/vectors/copy.shiva	2008-07-01 22:23:37 UTC (rev 294)
@@ -6,10 +6,8 @@
   int runTest()
   {
     int count = 0;
-    float2 v;
+    float2 v = { 1.0, -1.0 };
     float2 v2;
-    v[0] = 1.0;
-    v[1] = -1.0;
     v2 = v;
     if( v2[0] != 1.0 ) ++count;
     if( v2[1] != -1.0 ) ++count;

Modified: trunk/OpenGTL/OpenShiva/tests/vectors/copy4.shiva
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/vectors/copy4.shiva	2008-07-01 22:22:11 UTC (rev 293)
+++ trunk/OpenGTL/OpenShiva/tests/vectors/copy4.shiva	2008-07-01 22:23:37 UTC (rev 294)
@@ -1,41 +1,18 @@
 kernel MyKernel
 {
-  struct MyS { 
-    float4 v;
-  };
   void evaluatePixel(output pixel result)
   {
-    float4 v;
-    float4 v2;
   }
-  void func(pixel px)
-  {
-    float4 v;
-    float4 v2;
-    v = v2;
-  }
-  void func3(MyS mys)
-  {
-    float4 v;
-    float4 v2;
-    v = v2;
-  }
-  void func2(float4 t)
-  {
-    float4 v;
-    float4 v2;
-    v = v2;
-  }
   int runTest()
   {
     int count = 0;
-    float4 v;
+    float4 v = { 1.0, -1.0, 12.0, 42.0 };
     float4 v2;
-    v[0] = 1.0;
-    v[1] = -1.0;
     v2 = v;
     if( v2[0] != 1.0 ) ++count;
     if( v2[1] != -1.0 ) ++count;
+    if( v2[2] != 12.0 ) ++count;
+    if( v2[3] != 42.0 ) ++count;
     return count;
   }
 }

Added: trunk/OpenGTL/OpenShiva/tests/vectors/coumpoundcreation.shiva
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/vectors/coumpoundcreation.shiva	                        (rev 0)
+++ trunk/OpenGTL/OpenShiva/tests/vectors/coumpoundcreation.shiva	2008-07-01 22:23:37 UTC (rev 294)
@@ -0,0 +1,14 @@
+kernel MyKernel
+{
+  void evaluatePixel(output pixel result)
+  {
+  }
+  int runTest()
+  {
+    int count = 0;
+    float2 v = { 1.0,-1.0 };
+    if( v[0] != 1.0 ) ++count;
+    if( v[1] != -1.0 ) ++count;
+    return count;
+  }
+}

Added: trunk/OpenGTL/OpenShiva/tests/vectors/operations.shiva
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/vectors/operations.shiva	                        (rev 0)
+++ trunk/OpenGTL/OpenShiva/tests/vectors/operations.shiva	2008-07-01 22:23:37 UTC (rev 294)
@@ -0,0 +1,29 @@
+kernel MyKernel
+{
+  void evaluatePixel(output pixel result)
+  {
+  }
+  int runTest()
+  {
+    int count = 0;
+    float2 v;
+    float2 v2;
+    v[0] = 2.0;
+    v[1] = -1.0;
+    v2[0] = 4.0;
+    v2[1] = 3.0;
+    float2 v3 = v + v2;
+    if( v3[0] != 6.0 ) ++count;
+    if( v3[1] != 2.0 ) ++count;
+    v3 = v - v2;
+    if( v3[0] != -2.0 ) ++count;
+    if( v3[1] != -4.0 ) ++count;
+    v3 = v * v2;
+    if( v3[0] != 8.0 ) ++count;
+    if( v3[1] != -3.0 ) ++count;
+    v3 = v / v2;
+    if( v3[0] != 0.5 ) ++count;
+    if( v3[1] != (-1.0 / 3.0) ) ++count;
+    return count;
+  }
+}


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