Revision: 56673
          http://sourceforge.net/p/brlcad/code/56673
Author:   ejno
Date:     2013-08-07 17:22:38 +0000 (Wed, 07 Aug 2013)
Log Message:
-----------
add newlines to opencl code

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:06:05 UTC (rev 56672)
+++ brlcad/branches/opencl/src/librt/primitives/sph/sph.c       2013-08-07 
17:22:38 UTC (rev 56673)
@@ -113,27 +113,27 @@
 
 
 const char * const clt_program_code = "\
-__kernel void ell_shot(__global float *output, float3 O, float3 d, float3 c, 
float3 r)\
-{\
-    float A = dot(d, d);\
-    float B = 2*(o-c)*d;\
-    float C = (o-c)*(o-c) - r*r;\
-    float disc = B*B - 4*A*C;\
-    if (disc < 0) {\
-       result[0] = 0;\
-       result[1] = 0;\
-       result[2] = 0;\
-       return;\
-    }\
-\
-    float sqrt_disc = sqrt(disc);\
-    q = B < 0 ? (-B + sqrt_disc)/2 : (-B - sqrt_disc)/2;\
-    \
-    result[0] = 1;\
-    result[1] = q/A;\
-    result[2] = C/q;\
-}\
-\
+__kernel void ell_shot(__global float *output, float3 o, float3 d, float3 c, 
float3 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 disc = B*B - 4*A*C;\n\
+    if (disc < 0) {\n\
+       result[0] = 0;\n\
+       result[1] = 0;\n\
+       result[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\
+    \n\
+    result[0] = 1;\n\
+    result[1] = q/A;\n\
+    result[2] = C/q;\n\
+}\n\
+\n\
 ";
 
 
@@ -373,10 +373,11 @@
 {
 #ifdef OPENCL
     struct Sphere sphere;
-    struct seg *segp;
     VMOVE(sphere.position.s, stp->st_center);
-    sphere.radius = ((sph_specific *)stp->st_specific)->sph_rad;
+    sphere.radius = ((struct sph_specific *)stp->st_specific)->sph_rad;
 
+    (void)rp; (void)ap; (void)seghead; (void)sphere;
+
     return 0;
 #else
     register struct sph_specific *sph =

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