Hi all,

I've made a (compatible) change to a fairly central pyopencl interface,
in the hopes of making everybody's life easier--but this also means that
nearly every pyopencl program in existence now contains code that is
considered deprecated and will result in warnings from pyopencl 0.92
onward and will stop working in 0.94.

The change involves Kernel.__call__, where I've moved 'local_size' from
keyword argument to third positional argument. Luckily, old and new
usage can be safely disambiguated.

Before:
kernel(queue, h_c.shape, d_c_buf, d_a_buf, d_b_buf,
            local_size=(block_size, block_size))   
After:
kernel(queue, h_c.shape, (block_size, block_size),
            d_c_buf, d_a_buf, d_b_buf)

I find the new interface better, because a) it groups related arguments
together and b) it more easily deals with *args-style argument passing
(At least as long as we're targeting Python 2.x.).

The reason for the change is that local_size will be passed to nearly
every call to this interface, so the keyword-arg position was
inconvenient. This change is painful now, but keeping this annoying
interface around would have continued to be painful forever. That's why
I decided to change.

The change just landed in git. Verbose warnings are given for each case
of deprecated use. All code in pyopencl itself was updated to the new
usage.

If you have comments, questions, or suggestions, please do speak up now,
*before* this change becomes part of a release.

Andreas

Attachment: pgp7kP9INwva6.pgp
Description: PGP signature

_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to