Hi Sven,

I ported those sorting functions from c++. You can indeed pad your arrays
with something like MAX_INT to make it fit. I believe the power of 2
limitation is because it simplifies greatly part of both algorithms (the
scan) so if I remember right the radix sort has the same problem.

I may have different example usage here that could help
https://github.com/enjalot/adventures_in_opencl/tree/master/experiments

Ian
On May 14, 2012 2:11 AM, "Sven Schreiber" <[email protected]> wrote:

> Hi Marko,
>
> I was looking at the sorting code port/wrappers that you are using there
> to see if I could "steal" something, and I stumbled over the comment
> "only power-of-two array lengths are supported" in bitonic_sort.py.
> Since I know very little about sorting algorithms on GPUs I'm not sure
> whether that's an inherent limitation or if it could be easily
> generalized. At the very least it seems that it should be possible to
> add dummy elements to the array to get to a power-of-two length. Do you
> have any hints on how it could be made more general? Also, does the
> limitation also apply to the radix sort?
>
> Thanks for any comments,
> Sven
>
> On 05/04/2012 01:36 PM, Marko Bencun wrote:
> > Hello everyone
> >
> > I created a sph fluid simulation with Python and pyopencl. Find it here:
> > https://github.com/benma/pysph.
> >
> > I would appreciate any feedback. Also, since I have an nvidia card, I
> > would be glad if someone using an ATI card could test it and tell me
> > whether it works.
> >
> > Best, Marko
> >
> >
> > _______________________________________________
> > PyOpenCL mailing list
> > [email protected]
> > http://lists.tiker.net/listinfo/pyopencl
>
>
> _______________________________________________
> PyOpenCL mailing list
> [email protected]
> http://lists.tiker.net/listinfo/pyopencl
>
_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to