Test case for OpenCL 1.1 Preprocessor Directives & Macros
authorHomer Hsing <homer.xing@intel.com>
Tue, 20 Nov 2012 03:01:31 +0000 (11:01 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Fri, 29 Mar 2013 10:41:32 +0000 (18:41 +0800)
kernels/compiler_preprocessor_macros.cl [new file with mode: 0644]
utests/compiler_preprocessor_macros.cpp [new file with mode: 0644]

diff --git a/kernels/compiler_preprocessor_macros.cl b/kernels/compiler_preprocessor_macros.cl
new file mode 100644 (file)
index 0000000..2604adf
--- /dev/null
@@ -0,0 +1,13 @@
+/* test case for OpenCL 1.1 Preprocessor Directives & Macros (section 6.9) */
+__kernel void compiler_preprocessor_macros()
+{
+#pragma OPENCL FP_CONTRACT ON
+#pragma OPENCL FP_CONTRACT OFF
+#pragma OPENCL FP_CONTRACT DEFAULT
+  int i = __OPENCL_VERSION__;
+  i = __CL_VERSION_1_0__;
+  i = __CL_VERSION_1_1__;
+  i = __ENDIAN_LITTLE__;
+  i = __IMAGE_SUPPORT__;
+  i = __FAST_RELAXED_MATH__;
+}
diff --git a/utests/compiler_preprocessor_macros.cpp b/utests/compiler_preprocessor_macros.cpp
new file mode 100644 (file)
index 0000000..3cd0272
--- /dev/null
@@ -0,0 +1,9 @@
+#include "utest_helper.hpp"
+
+void compiler_preprocessor_macros(void)
+{
+  OCL_CREATE_KERNEL("compiler_preprocessor_macros");
+}
+
+MAKE_UTEST_FROM_FUNCTION(compiler_preprocessor_macros);
+