From e786d363484e8d723138d67c0afbd104d293d779 Mon Sep 17 00:00:00 2001 From: Homer Hsing Date: Thu, 6 Dec 2012 09:18:27 +0800 Subject: [PATCH] support some OpenCL 1.1 preprocessor directives & macros --- backend/src/ocl_stdlib.h | 6 ++++++ backend/src/ocl_stdlib_str.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/backend/src/ocl_stdlib.h b/backend/src/ocl_stdlib.h index 3dc4e0b..3926e57 100644 --- a/backend/src/ocl_stdlib.h +++ b/backend/src/ocl_stdlib.h @@ -55,6 +55,12 @@ DEF(ulong); DEF(float); #undef DEF ///////////////////////////////////////////////////////////////////////////// +// OpenCL preprocessor directives & macros +///////////////////////////////////////////////////////////////////////////// +#define __OPENCL_VERSION__ 110 +#define __CL_VERSION_1_0__ 100 +#define __CL_VERSION_1_1__ 110 +///////////////////////////////////////////////////////////////////////////// // OpenCL address space ///////////////////////////////////////////////////////////////////////////// #define __private __attribute__((address_space(0))) diff --git a/backend/src/ocl_stdlib_str.cpp b/backend/src/ocl_stdlib_str.cpp index f8eef73..843da95 100644 --- a/backend/src/ocl_stdlib_str.cpp +++ b/backend/src/ocl_stdlib_str.cpp @@ -59,6 +59,12 @@ std::string ocl_stdlib_str = "#undef DEF\n" "\n" "/////////////////////////////////////////////////////////////////////////////\n" +"// OpenCL preprocessor directives & macros\n" +"/////////////////////////////////////////////////////////////////////////////\n" +"#define __OPENCL_VERSION__ 110\n" +"#define __CL_VERSION_1_0__ 100\n" +"#define __CL_VERSION_1_1__ 110\n" +"/////////////////////////////////////////////////////////////////////////////\n" "// OpenCL address space\n" "/////////////////////////////////////////////////////////////////////////////\n" "#define __private __attribute__((address_space(0)))\n" -- 2.7.4