lppcom / opencl-book-samples

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

work_dim argument for clEnqueueNDRangeKernel() in OpenCLConvolution sample #76

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Is this errata for the book or an issue with the source code?
- It is sample code but the sample code is also printed on the book.

If errata, please describe the problem in the book (with page number). If
this is an issue with the source code, please specify the problem,
platform, OpenCL implementation, and any additional information that will
help us reproduce the problem:
- Page number 95

Please provide any additional information below.
- The value of work_dim argument for clEnqueueNDRangeKernel() call on page 95 
is set as 1. However, on Convolution.cl on page 91 thereis the following code:
    const int x = get_global_id(0);
    const int y = get_global_id(1);

On page 151 it is said:
size_t get_global_id_(uint dimindx): Valid values of dimindx are 0 to 
get_work_dim() - 1. For other values of dimindx, get_global_id() returns 0.

uint get_work_dim(): Returns the number of dimensions in use. This is the value 
given to the work_dim argument specified in clEnqueueNDRangeKernel().

Based on this: should the value of work_dim argument for 
clEnqueueNDRangeKernel() call be 2 instead of 1?

Original issue reported on code.google.com by panu2...@kolumbus.fi on 15 Jan 2013 at 4:17