Tutorial for C op

Work in progress.

This is the first version of the tutorial on extending theano with C ops. I'm looking for feedback from people with experience with it to help check for factual errors as well as from people with little experience extending theano to ensure that the concepts are explained clearly enough for new contributors to Theano. Thanks.
"""
it contains only the object’s reference count and a pointer to the
corresponding type object. It corresponds to the fields defined by the
expansion of the PyObject_HEAD macro.
"""
It contain a pointer tot he TYPE of this object, not a pointer to the
object itself. I agree the diff in the text is very small and easy to
overlook.

On Fri, Sep 26, 2014 at 11:33 AM, carriepl <notifications@github.com> wrote:

> In doc/tutorial/extending_theano_c.txt:
>
> > +introduce both and highlight their features which are most relevant to the
> > +task of implementing a C op. This tutorial then introduces the most important
> > +methods that the op needs to implement in order to provide a usable C
> > +implementation. Finally, it shows how to combine these elements to write a
> > +simple C op for performing the simple task of multiplying every element in a
> > +vector by a scalar.
> > +
> > +Python C-API
> > +============
> > +
> > +Python provides a C-API to allow the manipulation of python objects from
> > +C code. In this API, all classes that represent Python objects are descendants
> > +of the class PyObject. This class is essentially a wrapper; an instance of
> > +PyObject contains a pointer to another object as well as a reference count
> > +for that object. Thus, an instance of PyObject allows to treat a pointer to an
> > +object as an object itself.
>
> I got the information from
> https://docs.python.org/2/c-api/structures.html#c
> Did I misunderstand?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Theano/Theano/pull/2121/files#r18095634>.
>