Closed GoogleCodeExporter closed 9 years ago
This is a follow-on request for the work that was completed in
http://code.google.com/p/aparapi/issues/detail?id=10
Original comment by ryan.lam...@gmail.com
on 10 Nov 2011 at 7:04
Ryan, sorry for the delay here. I am still thinking about this one. I think
OpenCL's get_global_id(int dim) is not doing what you think here, however I am
having a lack of confidence moment here ;) maybe it does and I don't actually
understand it. So I am reading the specs.
Standby... ;)
Original comment by frost.g...@gmail.com
on 10 Nov 2011 at 7:33
Alright I experimented with this yesterday. You are correct I should have
exposed the dimension access to allow width and height (and depth possibly) to
kernel.execute() as well as provide mappings from getGlobalId(0..2) and
getGlobalSize(0..2).
This probably is not hard, and can be worked around so I am not sure it will be
a high priority enhancement request. Although probably a great project for
someone to try to do. ;)
My suggestion is that we keep all the current API's but provide
getGlobalId(int dim) mappings to opencl's get_global_id(int dim). We can keep
the no-arg version as a helper for getGlobalId(0). So getGlobalId() equiv of
getGlobalId(0).
Same for getGlobalSize().
For Kernel.execute(range, itercount) I recommend adding
Kernel.executeXY(xrange, yrange, itercount) and Kernel.executeXYZ(xrange,
yrange, zrange, itercount) or possibly Kernel.execute1D, Kernel.execute2D or
Kernel.execute3D if people find those names preferable.
Most of this is name mapping in KernelWriter and of course some JNI to access
the ranges.
What do you think?
Original comment by frost.g...@gmail.com
on 17 Nov 2011 at 4:06
You are correct, by encoding the values in the globalId we can work-around this
issue for now.
I think it would be alright to simply overload the same method as long as the
parameter names make sense and are documented appropriately.
For example:
Kernel.execute(xRange, iterCount);
Kernel.execute(xRange, yRange, iterCount);
Kernel.execute(xRange, yRange, zRange, iterCount);
Original comment by ryan.lam...@gmail.com
on 17 Nov 2011 at 8:18
Also, based some code we're investigating, we would also like to request
getLocalId() accept a range of ints as well.
Please see:
http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/get_local_id.html
Original comment by ryan.lam...@gmail.com
on 17 Nov 2011 at 10:32
After further review of some algorithms we're exploring, it appears we need the
all of the following methods to support 'uint dimindx':
http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/get_global_id.html
http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/get_global_size.html
http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/get_local_id.html
http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/get_local_size.html
Original comment by ryan.lam...@gmail.com
on 25 Nov 2011 at 6:11
I propose that this is fixed as part of the LocalMemory and MultiDim branch
merge (r#258)
Ryan can you validate.
Original comment by frost.g...@gmail.com
on 14 Feb 2012 at 5:41
Original comment by frost.g...@gmail.com
on 14 Feb 2012 at 5:46
Thanks Gary!
Original comment by ryan.lam...@gmail.com
on 14 Feb 2012 at 9:49
Original issue reported on code.google.com by
ryan.lam...@gmail.com
on 8 Nov 2011 at 5:15