Kaydet (Commit) cab3e225 authored tarafından Michael Meeks's avatar Michael Meeks

OpenCL code cleanups

Change-Id: Iab75b11f13856a6e631587e22b5d76977b8c7448
üst f01985a2
......@@ -29,7 +29,7 @@
# External headers
ifeq ($(ENABLE_OPENGCL),TRUE)
ifeq ($(ENABLE_OPENCL),TRUE)
define gb_LinkTarget__use_opencl
$(call gb_LinkTarget_set_include,$(1),\
......
......@@ -9756,8 +9756,8 @@ if test "z$with_opencl_sdk" = "z"; then
else
if test -d $with_opencl_sdk/include; then
ENABLE_OPENCL=TRUE
OPENCL_CFLAGS="-I $with_opencl_sdk/include"
OPENCL_LIBS="-L $with_opencl_sdk/lib/x86 -lOpenCL"
OPENCL_CFLAGS="-I$with_opencl_sdk/include"
OPENCL_LIBS="-L$with_opencl_sdk/lib/x86 -lOpenCL"
AC_MSG_RESULT([found at path $with_opencl_sdk])
else
AC_MSG_ERROR([no headers found found at $with_opencl_sdk/include ])
......
......@@ -20,6 +20,9 @@ $(eval $(call gb_CppunitTest_use_library_objects,sc_ucalc,sc))
ifeq ($(ENABLE_TELEPATHY),TRUE)
$(eval $(call gb_CppunitTest_use_libraries,sc_ucalc,tubes))
endif
ifeq ($(ENABLE_OPENCL),TRUE)
$(eval $(call gb_CppunitTest_use_externals,sc_ucalc,opencl))
endif
$(eval $(call gb_CppunitTest_use_externals,sc_ucalc,\
boost_headers \
......
......@@ -11,6 +11,7 @@
#include <stdlib.h>
#include <string.h>
#include "random.hxx"
#include "openclwrapper.hxx"
#include "oclkernels.hxx"
......@@ -1003,10 +1004,8 @@ double OclCalc::OclProcess(cl_kernel_function function, double *data,
double OclCalc::OclTest() {
double data[NUM];
srand((unsigned int) time(NULL));
for (int i = 0; i < NUM; i++) {
data[i] = rand() / (RAND_MAX + 1.0);
data[i] = sc::rng::uniform();
fprintf(stderr, "%f\t", data[i]);
}
OclProcess(&OclFormulax, data, AVG);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment