Gamaru / opencl-book-samples

Automatically exported from code.google.com/p/opencl-book-samples
0 stars 0 forks source link

Errata: Incorrect array subscripts, ch 9, pg 324 #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Errata: ch 9, pg 324
The example shows indexes on k_events as [1] and [2].  Since the array is of 
size 2, the indexes should be [0] and [1].

// Set up memory objs, programs, kernels and enqueue a DAG spanning 
// two command-queues (only the last few "enqueues" are shown).
    err = clEnqueueNDRangeKernel(Comm1, kernel1, 1, NULL, &global, 
                 &local,0, NULL, &k_events[1]);
    err = clEnqueueNDRangeKernel(Comm1, kernel2, 1, NULL, &global,
                 &local, 0, NULL, &k_events[2]);

Original issue reported on code.google.com by rikmor...@gmail.com on 5 Sep 2011 at 2:33