Revision: 56675
          http://sourceforge.net/p/brlcad/code/56675
Author:   ejno
Date:     2013-08-07 17:47:53 +0000 (Wed, 07 Aug 2013)
Log Message:
-----------
opencl code fixes

Modified Paths:
--------------
    brlcad/branches/opencl/src/librt/primitives/sph/sph.c

Modified: brlcad/branches/opencl/src/librt/primitives/sph/sph.c
===================================================================
--- brlcad/branches/opencl/src/librt/primitives/sph/sph.c       2013-08-07 
17:39:22 UTC (rev 56674)
+++ brlcad/branches/opencl/src/librt/primitives/sph/sph.c       2013-08-07 
17:47:53 UTC (rev 56675)
@@ -113,25 +113,25 @@
 
 
 const char * const clt_program_code = "\
-__kernel void ell_shot(__global float *output, float3 o, float3 d, float3 c, 
float3 r)\n\
+__kernel void ell_shot(__global float *output, float3 o, float3 l, float3 c, 
float r)\n\
 {\n\
-    `float A = dot(d, d);\n\
-    float B = 2*(o-c)*d;\n\
-    float C = (o-c)*(o-c) - r*r;\n\
+    float A = dot(l, l);\n\
+    float B = 2*dot(l, o-c);\n\
+    float C = dot(o-c, o-c) - r*r;\n\
     float disc = B*B - 4*A*C;\n\
     if (disc < 0) {\n\
-       result[0] = 0;\n\
-       result[1] = 0;\n\
-       result[2] = 0;\n\
+       output[0] = 0;\n\
+       output[1] = 0;\n\
+       output[2] = 0;\n\
        return;\n\
     }\n\
 \n\
     float sqrt_disc = sqrt(disc);\n\
-    q = B < 0 ? (-B + sqrt_disc)/2 : (-B - sqrt_disc)/2;\n\
+    float q = B < 0 ? (-B + sqrt_disc)/2 : (-B - sqrt_disc)/2;\n\
     \n\
-    result[0] = 1;\n\
-    result[1] = q/A;\n\
-    result[2] = C/q;\n\
+    output[0] = 1;\n\
+    output[1] = q/A;\n\
+    output[2] = C/q;\n\
 }\n\
 \n\
 ";

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to