[Cython] gsoc: array expressions

Robert Bradshaw robertwb at gmail.com
Wed May 30 00:29:07 CEST 2012

On Tue, May 29, 2012 at 3:22 PM, mark florisson
<markflorisson88 at gmail.com> wrote:
>>>>> I started a new project, https://github.com/markflorisson88/minivect ,
>>>>> which currently features a simple C code generator. The specializer
>>>>> and astbuilder do most of the work of creating the right AST, so the
>>>>> code generator only has to implement code generation functions for
>>>>> simple expressions. Depending on how it progresses I will look at
>>>>> incorporating Theano's optimizations into it and having Theano use it
>>>>> as a C backend for compatible expressions.
>>>> I forgot to mention, it's still pretty basic, but it works for simple
>>>> arithmetic expressions with non-overlapping (shifted) memory from
>>>> Cython: https://github.com/markflorisson88/cython/commit/2c316abdbc1228597bbdf480f737a59213ee9532#L4R1
>>> So basically, this project is to be used as a git submodule in Cython,
>>> and to be shipped directly in the source distribution. Is there any
>>> objection to that?
>> I'm not sure this is the best long-term solution (the alternative
>> would be making it part of Cython or adding a dependency) but I think
>> that's fine for now. I'm assuming there that the end user doesn't
>> explicitly reference it, right? It's just an optimization if present.
>> - Robert
> The only gotcha is that when you checkout Cython from github you will
> need to update the submodule.

Manually, right? How badly do things go wrong if you forget to?

> It's not really an optimization, it's an
> implementation, that is the Cython AST needs to be mapped onto the new
> AST, and then it generates the C code from that.

I meant in the sense that the user never refers to this code
explicitly, so we have the flexibility of merging it in/splitting it
off/moving it around internally without breaking users, right?

- Robert

More information about the cython-devel mailing list