Permalink
Browse files

No kernel code necessary

  • Loading branch information...
1 parent cd92515 commit c6cd78255cac30e2c8a0d9fe3f7e31e15490356e @matze committed Jul 20, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 check.c
View
12 check.c
@@ -107,17 +107,17 @@ int main(int argc, char *argv[])
/* Check that two different kernel programs can be built if the arguments
* stay the same */
if (ocl->num_devices > 1) {
+ cl_kernel kernel;
+
static const char *source = "\
#ifdef FIRST\n \
- __kernel void foo(__global float *arg) { arg[0] = 0.0; }\n\
- __kernel void bar(__global float *arg) { arg[0] = 1.0; }\n\
+ __kernel void foo(__global float *arg) {}\n\
+ __kernel void bar(__global float *arg) {}\n\
#else\n \
- __kernel void foo(__global float *arg) { arg[0] = 1.0; }\n\
- __kernel void bar(__constant float *arg) { }\n\
+ __kernel void foo(__global float *arg) {}\n\
+ __kernel void bar(__constant float *arg) {}\n\
#endif";
- cl_kernel kernel;
-
program = clCreateProgramWithSource (ocl->context, 1, (const char **) &source, NULL, &errcode);
print_check ("Creating program `kernel-definition`", errcode);

0 comments on commit c6cd782

Please sign in to comment.