From: Homer Hsing Date: Tue, 20 Nov 2012 03:01:31 +0000 (+0800) Subject: Test case for OpenCL 1.1 Preprocessor Directives & Macros X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a41896e21369bf17fdef20579a8948d632de1cd;p=contrib%2Fbeignet.git Test case for OpenCL 1.1 Preprocessor Directives & Macros --- diff --git a/kernels/compiler_preprocessor_macros.cl b/kernels/compiler_preprocessor_macros.cl new file mode 100644 index 0000000..2604adf --- /dev/null +++ b/kernels/compiler_preprocessor_macros.cl @@ -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 index 0000000..3cd0272 --- /dev/null +++ b/utests/compiler_preprocessor_macros.cpp @@ -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); +