diff options
author | Denis Steckelmacher <steckdenis@yahoo.fr> | 2011-07-06 14:44:55 +0200 |
---|---|---|
committer | Denis Steckelmacher <steckdenis@yahoo.fr> | 2011-07-06 14:44:55 +0200 |
commit | 3b7ce9ae035525fd6247dd529362aea4591a3971 (patch) | |
tree | 4930165a40db877dbae2b4e2ae22590884e36749 /tests | |
parent | 964fb6bbb37847d0beac57a188a5dac3d843c58c (diff) |
Embed a small stdlib header in every OpenCL program.
We can now compile OpenCL kernels without any hack to recognize
OpenCL-specific syntax.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_program.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/test_program.cpp b/tests/test_program.cpp index ba35aa3..ca65ade 100644 --- a/tests/test_program.cpp +++ b/tests/test_program.cpp @@ -5,14 +5,13 @@ #include <cstring> const char program_source[] = - "#define __global __attribute__((address_space(1)))\n" "#warning We need that line\n" "\n" - "__kernel void test(__global float *a, __global float *b, int n) {\n" + "__kernel void test(__global float4 *a, __global float4 *b, int n) {\n" " int i;\n" "\n" " for (i=0; i<n; i++) {\n" - " a[i] = 3.1415926f * b[0] * b[0];\n" + " a[i].xwyz = 3.1415926f * b[0].xyzw * b[0].wzyx;\n" " }\n" "}\n"; |