Kaydet (Commit) 4aa113b2 authored tarafından Kohei Yoshida's avatar Kohei Yoshida Kaydeden (comit) Markus Mohrhard

Use clew from clcc to allow run-time loading of opencl drivers.

Change-Id: I9f6ce113d637dbec069caa86b32459e2001ec0a0
üst 4c859c1d
......@@ -27,11 +27,16 @@ $(eval $(call gb_Library_use_libraries,scopencl,\
$(gb_UWINAPI) \
))
$(eval $(call gb_Library_use_externals,scopencl,opencl))
$(eval $(call gb_Library_add_exception_objects,scopencl,\
sc/source/core/opencl/formulagroupcl \
sc/source/core/opencl/openclwrapper \
sc/source/core/opencl/clcc/clew \
))
ifeq ($(OS),LINUX)
$(eval $(call gb_Library_add_libs,scopencl,\
-ldl \
))
endif
# vim: set noet sw=4 ts=4:
This diff is collapsed.
This diff is collapsed.
......@@ -707,7 +707,10 @@ int OpenclDevice::runKernel( const char *kernelName, void **userdata)
int OpenclDevice::initOpenclRunEnv( int argc )
{
int status = 0;
int status = clewInit("/opt/AMDAPP/lib/x86_64/libOpenCL.so");
if (status < 0)
return 1;
if ( MAX_CLKERNEL_NUM <= 0 )
{
return 1;
......
......@@ -14,11 +14,8 @@
#include <formula/opcode.hxx>
#include <sal/detail/log.h>
#include <cassert>
#ifdef __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
#include "clcc/clew.h"
// CL_MAP_WRITE_INVALIDATE_REGION is new in OpenCL 1.2.
......
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