I've created the PR here: https://gitlab.tiker.net/inducer/pycuda/merge_requests/1
Regarding the regex, I have two versions: one that's simpler and uses the standard `re` module but has issues handling nested array access, and a more robust one that uses the `regex` module that correctly handles nested accesses. The following kernel fails with the former, but succeeds with the latter: z[i] = y[x[i]] I didn't see any kernels in pycuda that use this kind of nested access, so the first regex is sufficient for all of the examples in there, but the second is necessary to support arbitrary kernels. It's possible that there are other situations in which the regex(es) fail, but I haven't run into them yet. Keegan On Sun, Dec 4, 2016 at 3:30 PM, Andreas Kloeckner <li...@informa.tiker.net> wrote: > Keegan Owsley <keeg...@gmail.com> writes: > > Something that I don't think I made clear before: the kernels generated > by > > get_elwise_module_noncontig are modified using regular expressions, so > that > > you don't need to change your code downstream to get strided array > support. > > I'm not convinced yet that this is the best approach, but it works okay > so > > far. > > To make it easier to see your changes and comment on them (such as > exactly how robust the Regex stuff is), could you put this up as a pull > request here? > > https://gitlab.tiker.net/inducer/pycuda > > This will automatically run tests, so it's easier for me to handle. > > Thanks! > Andreas >
_______________________________________________ PyCUDA mailing list PyCUDA@tiker.net https://lists.tiker.net/listinfo/pycuda