[sage-devel] Re: Cygwin(64) port status

2014-12-29 Thread Jean-Pierre Flori
Thanks to Travis, only the ATLAS patch needs review! http://trac.sagemath.org/ticket/17365 http://www.google.com/url?q=http%3A%2F%2Ftrac.sagemath.org%2Fticket%2F17365sa=Dsntz=1usg=AFQjCNHvTmGm10lUGkMxeJuWeXDU1cA2Hg -- You received this message because you are subscribed to the Google Groups

[sage-devel] Re: Cython: passing a Python data structure as a void pointer

2014-12-29 Thread Volker Braun
On Monday, December 29, 2014 2:27:49 AM UTC+1, Simon King wrote: In fact, a year or two ago, I had experimental code where I did follow the aproach to use Python objects (of course cythoned). It tought me much (about theory), but it wasn't really competitive. Competitive relative to what?

[sage-devel] Cython: declaring a typedefed enum

2014-12-29 Thread Jernej Azarija
Dear sage-devel, I have another question related to Cython. I like to post them here instead of cython-users as it seems to me that the former is a much slower group. That said The definition of the Graph class in one of the libraries is : === class Graph :

[sage-devel] Re: Cython: passing a Python data structure as a void pointer

2014-12-29 Thread Simon King
Hi Volker, first of all, to the OP, sorry that the original topic of the thread has changed. On 2014-12-29, Volker Braun vbraun.n...@gmail.com wrote: On Monday, December 29, 2014 2:27:49 AM UTC+1, Simon King wrote: In fact, a year or two ago, I had experimental code where I did follow the

[sage-devel] Re: Cython: declaring a typedefed enum

2014-12-29 Thread Volker Braun
Don't redeclare the enum values. cdef cppclass Graph(AbstractGraph): ctypedef enum SplittingHeuristic: shs_f foo bar On Monday, December 29, 2014 3:27:16 PM UTC+1, Jernej Azarija wrote: Dear sage-devel, I have another question related to Cython. I

[sage-devel] Re: Cython: passing a Python data structure as a void pointer

2014-12-29 Thread Volker Braun
On Monday, December 29, 2014 5:08:23 PM UTC+1, Simon King wrote: What do you mean by doubling the number of Python objects? Do you mean: The coefficients are Python objects anyway, so, what's the problem if the terms become Python objects, too? Yes, that is what I meant. My reference is

[sage-devel] Re: Cython: declaring a typedefed enum

2014-12-29 Thread Volker Braun
Also, Cython doesn't support class-level typedefs so you'll probably need a version of the literal trick: ctypedef enum Graph_SplittingHeuristic Graph::SplittingHeuristic: shs_f foo bar -- You received this message because you are subscribed to the Google Groups sage-devel group.

[sage-devel] Re: Cython: passing a Python data structure as a void pointer

2014-12-29 Thread Simon King
Hi Volker, On 2014-12-29, Volker Braun vbraun.n...@gmail.com wrote: My reference is The Geobucket Data Structure for Polynomials of Thomas Yan. His buckets are decreasingly sorted lists of terms. He doesn't mention arrays. Do you have a different reference in mind? Or do you think I

Re: [sage-devel] Re: Cython: declaring a typedefed enum

2014-12-29 Thread Jernej Azarija
Volker, this gives me the exact same error: cdef cppclass Graph(AbstractGraph): ctypedef enum Graph_SplittingHeuristic Graph::SplittingHeuristic: ^ sage/graphs/bliss.pyx:36:22: Syntax error in

[sage-devel] Re: Cython: passing a Python data structure as a void pointer

2014-12-29 Thread Volker Braun
On Monday, December 29, 2014 7:47:18 PM UTC+1, Simon King wrote: [...] I suppose I should first read more on typed memoryviews, right? To me, it looks like the right Cython tool to create arrays of objects (assuming that I will also turn my C struct terms into objects). I haven't used

Re: [sage-devel] Re: Cython: declaring a typedefed enum

2014-12-29 Thread Volker Braun
You need to move the typedef outside of the class scope, see my second post. On Monday, December 29, 2014 7:57:02 PM UTC+1, Jernej Azarija wrote: Volker, this gives me the exact same error: cdef cppclass Graph(AbstractGraph): ctypedef enum Graph_SplittingHeuristic

Re: [sage-devel] Re: Cython: declaring a typedefed enum

2014-12-29 Thread Jernej Azarija
Looks like we're on the right track - though it now seems to not recognize the scope of this enum within the library? = build/cythonized/sage/graphs/bliss.cpp: In function 'bliss::Graph* __pyx_f_4sage_6graphs_5bliss_bliss_graph(PyObject*, PyObject*, PyObject*, PyObject*)':