Hi Massimo,

Massimo DiPierro <[email protected]> writes:
> I have tried to understand Clyther. I have failed because the code is
> quite complex. But I have some understanding of the AST, so I was able
> to implement my own python -> C compiler which makes OpenCL friendly
> code and works with pyOpenCL.
>
> The idea is that of writing kernels in Python, not C, and adding a
> decorator to compile them to C99.
>
> The code can be found at https://github.com/mdipierro/mdpcl and it is very 
> short (all in one file, device.py and one example file).
> It requires pyopencl, https://github.com/srossross/Meta, matplotlib and 
> https://github.com/mdipierro/canvas
>
> Here for example is a 2D laplace solver in pure python (with pyopencl of 
> course)

That looks nice enough, but just as in the case of Clyther, I think it
tackles the wrong problem. Your Python thing--IMO--is *not* friendly
code at all. Why? Well, it feels like you now have to know three
languages instead of two. There's enough of the C showing through on the
Python level that you have to know it to understand the restrictions and
extra syntactic goop that's sprinkled over the Python code. And then you
have to learn the Python-ish syntax on top of that. Not a fan, I'm sorry
to say...

Andreas


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

Reply via email to