summaryrefslogtreecommitdiff
path: root/sc/workben/opencl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-10-31 01:33:02 +0100
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-11-10 07:58:41 +0100
commit79ae63897652995e809ab386e0214e3b8ad74b91 (patch)
tree476bbb8ab76b5bbe9e9e099e71bf555f2edfb8cb /sc/workben/opencl
parent5606d14c3e8732bcb6b0ea5513719fa973a435a2 (diff)
make that file platform independent
Change-Id: I65c056faaa95af3493b73a7403f199c8c826d724
Diffstat (limited to 'sc/workben/opencl')
-rw-r--r--sc/workben/opencl/platform_detect.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/sc/workben/opencl/platform_detect.cxx b/sc/workben/opencl/platform_detect.cxx
index b0a9c610d7e1..ef4558818d24 100644
--- a/sc/workben/opencl/platform_detect.cxx
+++ b/sc/workben/opencl/platform_detect.cxx
@@ -7,13 +7,17 @@
using namespace std;
+#ifdef WIN32
+#define OPENCL_DLL_NAME "OpenCL.dll"
+#elif defined(MACOSX)
+#define OPENCL_DLL_NAME NULL
+#else
+#define OPENCL_DLL_NAME "libOpenCL.so"
+#endif
+
int main()
{
- const char* dllname = "libOpenCL.so"; // on Linux
-// const char* dllname = "OpenCL.dll"; // from GPU driver.
-// const char* dllname = "amdocl.dll"; // from AMD SDK
-// const char* dllname = "intelocl.dll"; // from Intel SDK
- int status = clewInit(dllname);
+ int status = clewInit(OPENCL_DLL_NAME);
if (status < 0)
{
cout << "failed to load" << endl;