summaryrefslogtreecommitdiff
path: root/src/api/api_platform.cpp
diff options
context:
space:
mode:
authorZack Rusin <zack@kde.org>2009-08-30 15:03:08 -0400
committerZack Rusin <zack@kde.org>2009-08-30 15:03:08 -0400
commitfe552119577560a7d842d852f1c37844b14a2e2f (patch)
treea8a8ebecce27f9dc891627115de10558ee3ad14d /src/api/api_platform.cpp
parentf9b2a85968d82b938842606d5765348a3f9cd9d7 (diff)
reorganize the directory structure a bit
Diffstat (limited to 'src/api/api_platform.cpp')
-rw-r--r--src/api/api_platform.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/api/api_platform.cpp b/src/api/api_platform.cpp
new file mode 100644
index 0000000..b6429e7
--- /dev/null
+++ b/src/api/api_platform.cpp
@@ -0,0 +1,34 @@
+#include <OpenCL/cl.h>
+
+#include <string.h>
+
+#define PROFILE_STR "FULL_PROFILE"
+#define PROFILE_STR_LEN 12
+
+#define VERSION_STR "OpenCL 1.0"
+#define VERSION_STR_LEN 10
+
+// Platform API
+cl_int
+clGetPlatformInfo(cl_platform_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret)
+{
+ switch(param_name) {
+ case CL_PLATFORM_PROFILE:
+ strcpy((char*)param_value, PROFILE_STR);
+ *param_value_size_ret = PROFILE_STR_LEN;
+ break;
+
+ case CL_PLATFORM_VERSION:
+ strcpy((char*)param_value, VERSION_STR);
+ *param_value_size_ret = VERSION_STR_LEN;
+ break;
+
+ default:
+ return CL_INVALID_VALUE;
+ }
+
+ return CL_SUCCESS;
+}