Revision: 56994
          http://sourceforge.net/p/brlcad/code/56994
Author:   ejno
Date:     2013-08-20 16:32:05 +0000 (Tue, 20 Aug 2013)
Log Message:
-----------
changes for other systems

Modified Paths:
--------------
    brlcad/branches/opencl/src/librt/CMakeLists.txt
    brlcad/branches/opencl/src/librt/primitives/sph/sph.c
    brlcad/branches/opencl/src/librt/primitives/sph/sph_shot.cl

Modified: brlcad/branches/opencl/src/librt/CMakeLists.txt
===================================================================
--- brlcad/branches/opencl/src/librt/CMakeLists.txt     2013-08-20 15:09:08 UTC 
(rev 56993)
+++ brlcad/branches/opencl/src/librt/CMakeLists.txt     2013-08-20 16:32:05 UTC 
(rev 56994)
@@ -289,7 +289,7 @@
   set(LIBRT_SOURCES ${LIBRT_SOURCES} timer42.c)
 endif(MSVC)
 
-set(OPENCL_LIBRARY /System/Library/Frameworks/OpenCL.framework/OpenCL)
+set(OPENCL_LIBRARY /usr/lib/libOpenCL.so)
 
 BRLCAD_ADDLIB(librt "${LIBRT_SOURCES}" 
"${OPENCL_LIBRARY};${LIBGDIAM_LIBRARY};${LIBVDS_LIBRARY};libbn;libbu;${OPENNURBS_LIBRARY};${P2T_LIBRARY};libbrep;${REGEX_LIBRARY};${ZLIB_LIBRARY};${WINSOCK_LIB};${RPCRT_LIB};${STDCXX_LIBRARIES}"
 NO_STRICT_CXX)
 

Modified: brlcad/branches/opencl/src/librt/primitives/sph/sph.c
===================================================================
--- brlcad/branches/opencl/src/librt/primitives/sph/sph.c       2013-08-20 
15:09:08 UTC (rev 56993)
+++ brlcad/branches/opencl/src/librt/primitives/sph/sph.c       2013-08-20 
16:32:05 UTC (rev 56994)
@@ -70,7 +70,7 @@
 
 
 #define CLT
-#define CLT_SINGLE_PRECISION
+/* #define CLT_SINGLE_PRECISION */
 
 
 #ifdef CLT
@@ -80,7 +80,7 @@
 
 
 #ifndef CL_VERSION_1_2
-#error "Requires OpenCL 1.2."
+/* #error "Requires OpenCL 1.2." */
 #endif
 
 
@@ -225,7 +225,7 @@
 
 
 static cl_double3
-clt_shot(cl_double3 o, cl_double3 dir, cl_double3 V, cl_double radsq, unsigned 
hypersample)
+clt_shot(cl_double3 o, cl_double3 dir, cl_double3 V, cl_double radsq, size_t 
hypersample)
 {
     cl_int error;
     cl_mem output;
@@ -234,7 +234,7 @@
 
 
     VSET(result.s, 0, 0, 0);
-    output = clCreateBuffer(clt_context, CL_MEM_USE_HOST_PTR | 
CL_MEM_HOST_READ_ONLY | CL_MEM_WRITE_ONLY,
+    output = clCreateBuffer(clt_context, CL_MEM_USE_HOST_PTR | 
CL_MEM_WRITE_ONLY,
            sizeof(cl_double3), &result, &error);
     if (error != CL_SUCCESS) bu_bomb("failed to create OpenCL output buffer");
 
@@ -408,7 +408,7 @@
 rt_sph_shot(struct soltab *stp, register struct xray *rp, struct application 
*ap, struct seg *seghead)
 {
 #ifdef CLT
-    const int hypersample = 10;
+    const size_t hypersample = 1;
     cl_double3 o;    /* ray origin  */
     cl_double3 dir;  /* ray direction (unit vector) */
     cl_double3 V;    /* vector to sphere  */

Modified: brlcad/branches/opencl/src/librt/primitives/sph/sph_shot.cl
===================================================================
--- brlcad/branches/opencl/src/librt/primitives/sph/sph_shot.cl 2013-08-20 
15:09:08 UTC (rev 56993)
+++ brlcad/branches/opencl/src/librt/primitives/sph/sph_shot.cl 2013-08-20 
16:32:05 UTC (rev 56994)
@@ -24,7 +24,6 @@
 */
 
 
-
 __kernel void sph_shot(__global __write_only double3 *output,
        const double3 o, const double3 dir, const double3 V, const double radsq)
 {

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


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to