We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb877e3 commit 67f2bbdCopy full SHA for 67f2bbd
py_open_cl_demo.py
@@ -16,9 +16,10 @@
16
cl.enqueue_write_buffer(queue, a_dev, a)
17
18
# create the pyopencl function a little like weave.inline
19
-# Just in Time compiler
+# Just in Time compiler.
20
+# Notice the way we index into the array a: get_global_id
21
prg = cl.Program(ctx, """
- _kernel void twice(_global float *a)
22
+ __kernel void twice(_global float *a)
23
{ a[ get_global_id (0)] *= 2;}
24
""").build()
25
0 commit comments