Re: [Cython] [cython-users] Re: callback function pointer problem

2011-09-30 Thread mark florisson
ilding a dict manually or whatever (and by casting like mystruct.my_last_overallocated_field). > mark florisson wrote: >> >> On 29 September 2011 22:48, Robert Bradshaw >> wrote: > On Thu, Sep 29, 2011 at 5:29 AM, mark florisson > >> wrote: >> On 29

Re: [Cython] [cython-users] Re: callback function pointer problem

2011-09-30 Thread mark florisson
On 30 September 2011 22:42, mark florisson wrote: > On 30 September 2011 22:14, Dag Sverre Seljebotn > wrote: >> Are you saying that when coercing a struct to an object, one would copy >> scalar fields by value but reference array fields? -1, that would be >> confusing.

[Cython] buffer bug

2011-10-02 Thread mark florisson
Hey, I'm unable to login in trac, but I found a bug in the buffer support: cimport cython cimport numpy as np @cython.boundscheck(False) @cython.wraparound(False) cdef void func(np.ndarray[np.float32_t, ndim=2] a) nogil: pass This calls __Pyx_GetBufferAndValidate, which needs the GIL. When

Re: [Cython] buffer bug

2011-10-02 Thread mark florisson
On 2 October 2011 12:04, Dag Sverre Seljebotn wrote: > On 10/02/2011 12:38 PM, mark florisson wrote: >> >> Hey, >> >> I'm unable to login in trac, but I found a bug in the buffer support: >> >> cimport cython >> cimport numpy as np >> &

Re: [Cython] CyFunction refactoring plan

2011-10-02 Thread mark florisson
On 2 October 2011 18:52, Vitja Makarov wrote: > 2011/9/30 mark florisson : >> On 30 September 2011 07:47, Vitja Makarov wrote: >>> 2011/9/30 Vitja Makarov : >>>> 2011/9/30 Robert Bradshaw : >>>>> On Thu, Sep 29, 2011 at 10:43 PM, Stefan Behnel >

Re: [Cython] CyFunction refactoring plan

2011-10-02 Thread mark florisson
On 2 October 2011 19:44, Vitja Makarov wrote: > 2011/10/2 mark florisson : >> On 2 October 2011 18:52, Vitja Makarov wrote: >>> 2011/9/30 mark florisson : >>>> On 30 September 2011 07:47, Vitja Makarov wrote: >>>>> 2011/9/30 Vitja Makarov : >>&

Re: [Cython] CyFunction refactoring plan

2011-10-02 Thread mark florisson
On 2 October 2011 19:44, Vitja Makarov wrote: > 2011/10/2 mark florisson : >> On 2 October 2011 18:52, Vitja Makarov wrote: >>> 2011/9/30 mark florisson : >>>> On 30 September 2011 07:47, Vitja Makarov wrote: >>>>> 2011/9/30 Vitja Makarov : >>&

[Cython] Utilities, cython.h, libcython

2011-10-04 Thread mark florisson
Hey, I briefly mentioned something about this in a pull request, but maybe it deserves some actual discussion on the ML. So I propose that after fused types gets merged we try to move as many utility codes as possible to their utility code files (unless they are used in pending pull requests or o

Re: [Cython] Utilities, cython.h, libcython

2011-10-05 Thread mark florisson
On 5 October 2011 08:16, Stefan Behnel wrote: > mark florisson, 04.10.2011 23:19: >> >> So I propose that after fused types gets merged we try to move as many >> utility codes as possible to their utility code files (unless they are >> used in pending pull requests or

Re: [Cython] Utilities, cython.h, libcython

2011-10-05 Thread mark florisson
On 5 October 2011 08:38, Robert Bradshaw wrote: > On Wed, Oct 5, 2011 at 12:16 AM, Stefan Behnel wrote: >> mark florisson, 04.10.2011 23:19: >>> >>> So I propose that after fused types gets merged we try to move as many >>> utility codes as possible to their

Re: [Cython] Utilities, cython.h, libcython

2011-10-05 Thread mark florisson
On 5 October 2011 01:46, Robert Bradshaw wrote: > On Tue, Oct 4, 2011 at 2:19 PM, mark florisson > wrote: >> Hey, >> >> I briefly mentioned something about this in a pull request, but maybe >> it deserves some actual discussion on the ML. >> >> So I pro

Re: [Cython] Utilities, cython.h, libcython

2011-10-05 Thread mark florisson
On 5 October 2011 14:54, mark florisson wrote: > On 5 October 2011 08:38, Robert Bradshaw wrote: >> On Wed, Oct 5, 2011 at 12:16 AM, Stefan Behnel wrote: >>> mark florisson, 04.10.2011 23:19: >>>> >>>> So I propose that after fused types gets merged we

Re: [Cython] Utilities, cython.h, libcython

2011-10-06 Thread mark florisson
On 6 October 2011 01:05, Robert Bradshaw wrote: > On Wednesday, October 5, 2011, mark florisson wrote: >> >> On 5 October 2011 01:46, Robert Bradshaw >> wrote: >> > On Tue, Oct 4, 2011 at 2:19 PM, mark florisson >> > wrote: >> >> Hey, >&g

Re: [Cython] Utilities, cython.h, libcython

2011-10-06 Thread mark florisson
On 6 October 2011 07:46, Stefan Behnel wrote: > mark florisson, 05.10.2011 15:53: >> >> On 5 October 2011 08:16, Stefan Behnel wrote: >>> >>> mark florisson, 04.10.2011 23:19: >>>> >>>> Another issue is that Cython compile time is inc

Re: [Cython] Utilities, cython.h, libcython

2011-10-06 Thread mark florisson
On 6 October 2011 21:56, Vitja Makarov wrote: > 2011/10/6 mark florisson : >> On 6 October 2011 07:46, Stefan Behnel wrote: >>> mark florisson, 05.10.2011 15:53: >>>> >>>> On 5 October 2011 08:16, Stefan Behnel wrote: >>>>> >>>&

Re: [Cython] compiler performance issue for extended utility code

2011-10-08 Thread mark florisson
On 8 October 2011 08:03, Stefan Behnel wrote: > Vitja Makarov, 07.10.2011 18:01: >>> >>> 2011/10/7 Stefan Behnel: Vitja Makarov, 06.10.2011 23:12: > > Here is small comparison on compiling urllib.py with cython: > > ((e8527c5...)) vitja@mchome:~/work/cython-vitek-git/zzz$

Re: [Cython] compiler performance issue for extended utility code

2011-10-08 Thread mark florisson
On 8 October 2011 13:10, Vitja Makarov wrote: > 2011/10/8 mark florisson : >> On 8 October 2011 08:03, Stefan Behnel wrote: >>> Vitja Makarov, 07.10.2011 18:01: >>>>> >>>>> 2011/10/7 Stefan Behnel: >>>>>> >>>>&

Re: [Cython] compiler performance issue for extended utility code

2011-10-09 Thread mark florisson
On 8 October 2011 10:22, mark florisson wrote: > On 8 October 2011 08:03, Stefan Behnel wrote: > > Vitja Makarov, 07.10.2011 18:01: > >>> > >>> 2011/10/7 Stefan Behnel: > >>>> > >>>> Vitja Makarov, 06.10.2011 23:12: > >>

[Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-09 Thread mark florisson
Hey, So far people have been enthusiastic about the cython.parallel features, I think we should introduce some new features. I propose the following, assume parallel has been imported from cython: with parallel.master(): this is executed in the master thread in a parallel (non-prange) section

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-09 Thread mark florisson
On 9 October 2011 13:18, Dag Sverre Seljebotn wrote: > > On 10/09/2011 02:11 PM, mark florisson wrote: >> >> Hey, >> >> So far people have been enthusiastic about the cython.parallel features, >> I think we should introduce some new features. I propose the fo

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-09 Thread mark florisson
On 9 October 2011 13:57, Dag Sverre Seljebotn wrote: > On 10/09/2011 02:18 PM, Dag Sverre Seljebotn wrote: >> >> On 10/09/2011 02:11 PM, mark florisson wrote: >>> >>> Hey, >>> >>> So far people have been enthusiastic about the cython.parallel

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-09 Thread mark florisson
On 9 October 2011 14:30, mark florisson wrote: > On 9 October 2011 13:57, Dag Sverre Seljebotn > wrote: >> On 10/09/2011 02:18 PM, Dag Sverre Seljebotn wrote: >>> >>> On 10/09/2011 02:11 PM, mark florisson wrote: >>>> >>>> Hey, &g

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-09 Thread mark florisson
On 9 October 2011 14:39, mark florisson wrote: > On 9 October 2011 14:30, mark florisson wrote: >> On 9 October 2011 13:57, Dag Sverre Seljebotn >> wrote: >>> On 10/09/2011 02:18 PM, Dag Sverre Seljebotn wrote: >>>> >>>> On 10/09/2011

Re: [Cython] PyCon-DE wrap-up by Kay Hayen

2011-10-09 Thread mark florisson
On 9 October 2011 18:35, Stefan Behnel wrote: > Hi, > > Kay Hayen wrote a blog post about his view of the first PyCon-DE, including > a bit on the discussions I had with him about Nuitka. > > http://www.nuitka.net/blog/2011/10/pycon-de-2011-my-report/ > > It was interesting to see that Nuitka actu

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-09 Thread mark florisson
On 9 October 2011 19:54, Jon Olav Vik wrote: > On Sun, Oct 9, 2011 at 2:57 PM, Dag Sverre Seljebotn > wrote: with parallel.single(): same as master, except any thread may do the execution An optional keyword argument 'nowait' specifies whether there will be a barrier at t

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-09 Thread mark florisson
On 9 October 2011 21:48, Jon Olav Vik wrote: > On Sun, Oct 9, 2011 at 9:01 PM, mark florisson > wrote: >> On 9 October 2011 19:54, Jon Olav Vik wrote: >>> Personally, I think I'd prefer context managers as a very >>> readable way to deal with parallelism >

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-10 Thread mark florisson
On 9 October 2011 22:27, mark florisson wrote: > > On 9 October 2011 21:48, Jon Olav Vik wrote: > > On Sun, Oct 9, 2011 at 9:01 PM, mark florisson > > wrote: > >> On 9 October 2011 19:54, Jon Olav Vik wrote: > >>> Personally, I think I'd prefer cont

Re: [Cython] PyCon-DE wrap-up by Kay Hayen

2011-10-10 Thread mark florisson
On 10 October 2011 09:38, Stefan Behnel wrote: > mark florisson, 09.10.2011 19:57: >> >> On 9 October 2011 18:35, Stefan Behnel wrote: >>> >>> One of the impressions I took out of the technical discussions with Kay >>> is >>> that there isn

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-12 Thread mark florisson
; On Sun, Oct 9, 2011 at 5:57 AM, Dag Sverre Seljebotn >>>> wrote: >>>>> >>>>> On 10/09/2011 02:18 PM, Dag Sverre Seljebotn wrote: >>>>>> >>>>>> On 10/09/2011 02:11 PM, mark florisson wrote: >>>>>>> >>

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-12 Thread mark florisson
On 12 October 2011 09:36, Dag Sverre Seljebotn wrote: > On 10/12/2011 09:55 AM, Robert Bradshaw wrote: >> >> On Sun, Oct 9, 2011 at 5:57 AM, Dag Sverre Seljebotn >>  wrote: >>> >>> On 10/09/2011 02:18 PM, Dag Sverre Seljebotn wrote: >>>>

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-12 Thread mark florisson
On 12 October 2011 10:08, Robert Bradshaw wrote: > On Wed, Oct 12, 2011 at 1:36 AM, Dag Sverre Seljebotn > wrote: >> On 10/12/2011 09:55 AM, Robert Bradshaw wrote: I'm less sure about single, since making it a function indicates one could use it in other contexts and the whole thin

Re: [Cython] test failure for cython-devel in Py2.4

2011-10-13 Thread mark florisson
On 13 October 2011 06:10, Stefan Behnel wrote: > > mark florisson, 12.10.2011 23:46: >>>>> >>>>> On 10 October 2011 16:17, Stefan Behnel wrote: >>>>>> >>>>>> Jenkins currently reports several failures, and thi

Re: [Cython] test failure for cython-devel in Py2.4

2011-10-13 Thread mark florisson
On 13 October 2011 09:53, Stefan Behnel wrote: > Stefan Behnel, 13.10.2011 07:10: >> >> mark florisson, 12.10.2011 23:46: >>>> >>>> Is it me or are other builds broken as well? >>>> >>>> I pushed a fix for the tempit

Re: [Cython] test failure for cython-devel in Py2.4

2011-10-13 Thread mark florisson
On 13 October 2011 10:53, Vitja Makarov wrote: > 2011/10/13 Stefan Behnel : >> Vitja Makarov, 13.10.2011 08:03: >>> >>> I found that tempita bug goes away if you change language_level to 2. >> >> There's no language level configured in Py2.4, which fails. >> >> https://sage.math.washington.edu:809

Re: [Cython] test failure for cython-devel in Py2.4

2011-10-13 Thread mark florisson
On 13 October 2011 10:56, mark florisson wrote: > On 13 October 2011 10:53, Vitja Makarov wrote: >> 2011/10/13 Stefan Behnel : >>> Vitja Makarov, 13.10.2011 08:03: >>>> >>>> I found that tempita bug goes away if you change language_level to 2. >&

Re: [Cython] test failure for cython-devel in Py2.4

2011-10-13 Thread mark florisson
On 13 October 2011 12:44, Stefan Behnel wrote: > mark florisson, 13.10.2011 12:18: >> >> On 13 October 2011 10:56, mark florisson wrote: >>> >>> On 13 October 2011 10:53, Vitja Makarov wrote: >>>> >>>> 2011/10/13 Stefan Behnel: >>&

Re: [Cython] test failure for cython-devel in Py2.4

2011-10-13 Thread mark florisson
On 13 October 2011 12:52, mark florisson wrote: > On 13 October 2011 12:44, Stefan Behnel wrote: >> mark florisson, 13.10.2011 12:18: >>> >>> On 13 October 2011 10:56, mark florisson wrote: >>>> >>>> On 13 October 2011 10:53, Vitja

Re: [Cython] test failure for cython-devel in Py2.4

2011-10-13 Thread mark florisson
On 13 October 2011 20:22, Stefan Behnel wrote: > Vitja Makarov, 13.10.2011 20:33: >> >> But py3k pyregr is no red due to SIGSEGV, is that python problem: >> >> >> https://sage.math.washington.edu:8091/hudson/job/cython-devel-tests-pyregr/BACKEND=c,PYVERSION=py3k/26/console > > Not sure, but rather

Re: [Cython] unexpected side-effect in cython utility code

2011-10-14 Thread mark florisson
On 14 October 2011 14:02, Stefan Behnel wrote: > Hi, > > I started working on better malloc() support and wrote this code as a test > to get going: > > """ > cimport cython > > def test_malloc(int n): >    with cython.malloc(n*sizeof(int)) as m: >        for i in range(n): >            m[i] = i >

Re: [Cython] unexpected side-effect in cython utility code

2011-10-14 Thread mark florisson
On 14 October 2011 16:18, mark florisson wrote: > On 14 October 2011 14:02, Stefan Behnel wrote: >> Hi, >> >> I started working on better malloc() support and wrote this code as a test >> to get going: >> >> """ >> cimport cython >

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-14 Thread mark florisson
On 14 October 2011 19:31, Robert Bradshaw wrote: > On Wed, Oct 12, 2011 at 7:55 AM, mark florisson > wrote: >>>> I ultimately feel things like that is more important than 100% coverage of >>>> the OpenMP standard. Of course, OpenMP is a lot lower-hanging fruit.

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-14 Thread mark florisson
On 14 October 2011 21:07, mark florisson wrote: > On 14 October 2011 19:31, Robert Bradshaw > wrote: >> On Wed, Oct 12, 2011 at 7:55 AM, mark florisson >> wrote: >>>>> I ultimately feel things like that is more important than 100% coverage of >>>>

Re: [Cython] compiler performance issue for extended utility code

2011-10-16 Thread mark florisson
Tempita uses re.sub to do the parsing. Most utilities are loaded at module-level, so perhaps we should use lazy loading like Vitja suggested. Are the cythonscope utilities loaded? On 16 October 2011 19:46, Stefan Behnel wrote: > mark florisson, 08.10.2011 15:18: >> >> On 8 Oct

Re: [Cython] compiler performance issue for extended utility code

2011-10-16 Thread mark florisson
On 16 October 2011 19:51, mark florisson wrote: > Tempita uses re.sub to do the parsing. Most utilities are loaded at > module-level, so perhaps we should use lazy loading like Vitja > suggested. Are the cythonscope utilities loaded? > > On 16 October 2011 19:46, Stefan Behnel

Re: [Cython] Cython-ctypes branch

2011-10-18 Thread mark florisson
On 18 October 2011 09:06, Stefan Behnel wrote: > Hi Romain, > > I know your branch isn't "ready" in the sense that it's useful for the real > world, but I'd like to find a way to get it merged, and to find a time frame > for that. Otherwise, it will just bit-rot, which is certainly not what > anyo

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-18 Thread mark florisson
On 12 October 2011 10:24, Dag Sverre Seljebotn wrote: > On 10/12/2011 11:08 AM, Robert Bradshaw wrote: >> >> On Wed, Oct 12, 2011 at 1:36 AM, Dag Sverre Seljebotn >>> >>> I wouldn't resist a builtin "channel" type in Cython (since we don't have >>> full templating/generics, it would be the only wa

[Cython] SIMD

2011-10-18 Thread mark florisson
I'm copy/pasting this message to the ML with regard to previous discussion on cython-users and auto-vectorization (apparently my forwarded mail got rejected). Perhaps an approach as listed below would be easier than to generate Fortran (and deal with the pain of linking with it, distutils compatib

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-19 Thread mark florisson
On 19 October 2011 06:01, Robert Bradshaw wrote: > On Fri, Oct 14, 2011 at 1:07 PM, mark florisson > wrote: >> On 14 October 2011 19:31, Robert Bradshaw >> wrote: >>> On Wed, Oct 12, 2011 at 7:55 AM, mark florisson >>> wrote: >>>>>> I u

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-19 Thread mark florisson
On 19 October 2011 19:19, mark florisson wrote: > On 19 October 2011 06:01, Robert Bradshaw > wrote: >> On Fri, Oct 14, 2011 at 1:07 PM, mark florisson >> wrote: >>> On 14 October 2011 19:31, Robert Bradshaw >>> wrote: >>>> On Wed, Oct

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-19 Thread mark florisson
On 19 October 2011 06:01, Robert Bradshaw wrote: > On Fri, Oct 14, 2011 at 1:07 PM, mark florisson > wrote: >> On 14 October 2011 19:31, Robert Bradshaw >> wrote: >>> On Wed, Oct 12, 2011 at 7:55 AM, mark florisson >>> wrote: >>>>>> I u

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-20 Thread mark florisson
sks (and OpenMP constructs in general) is that usually if your compiler ignores all your pragmas, your code just runs serially in the same way. The same would be true for the tasks in with blocks. > Dag Sverre > > On 10/19/2011 09:53 PM, mark florisson wrote: >> >> On 19 Octobe

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-20 Thread mark florisson
On 20 October 2011 10:35, Dag Sverre Seljebotn wrote: > On 10/20/2011 11:13 AM, mark florisson wrote: >> >> On 20 October 2011 09:42, Dag Sverre Seljebotn >>  wrote: >>> >>> Meta: I've been meaning to respond to this thread, but can't find the >

Re: [Cython] cython.parallel tasks, single, master, critical, barriers

2011-10-21 Thread mark florisson
On 21 October 2011 18:43, Dag Sverre Seljebotn wrote: > On 10/20/2011 02:51 PM, mark florisson wrote: >> >> On 20 October 2011 10:35, Dag Sverre Seljebotn >>  wrote: >>> >>> On 10/20/2011 11:13 AM, mark florisson wrote: >>>> >>>>

Re: [Cython] ImportError: DLL load failed: The specified module could not be found.

2011-10-21 Thread mark florisson
Sorry, most of us don't use Windows. In any case, this is something that belongs on the cython-users list, please continue the discussion there. On 21 October 2011 20:51, Adrian Martínez Vargas wrote: > I'm 90% sure that the problem is that the pyd file is not registered (it > works if I put the

[Cython] Acquisition counted cdef classes

2011-10-24 Thread mark florisson
Hey, This is in response to http://groups.google.com/group/cython-users/browse_thread/thread/bcbc5fe0e329224f and http://trac.cython.org/cython_trac/ticket/498 , and some of the previous discussion on cython.parallel. Basically I think we should have something more powerful than 'cdef borrowed Cd

Re: [Cython] Acquisition counted cdef classes

2011-10-24 Thread mark florisson
On 24 October 2011 22:03, Greg Ewing wrote: > mark florisson wrote: >> >> These will by default not lock for operations to allow >> e.g. one thread to iterate over the list and another thread to index >> it without lock contention and other general overhead. > &g

Re: [Cython] Acquisition counted cdef classes

2011-10-24 Thread mark florisson
On 24 October 2011 22:03, Greg Ewing wrote: > mark florisson wrote: >> >> These will by default not lock for operations to allow >> e.g. one thread to iterate over the list and another thread to index >> it without lock contention and other general overhead. > &g

Re: [Cython] Acquisition counted cdef classes

2011-10-25 Thread mark florisson
On 25 October 2011 05:47, Robert Bradshaw wrote: > On Mon, Oct 24, 2011 at 2:52 PM, mark florisson > wrote: >> On 24 October 2011 22:03, Greg Ewing wrote: >>> mark florisson wrote: >>>> >>>> These will by default not lock for operations to allow >

Re: [Cython] Acquisition counted cdef classes

2011-10-25 Thread mark florisson
On 25 October 2011 08:33, Stefan Behnel wrote: > mark florisson, 24.10.2011 21:50: >> >> This is in response to >> >> http://groups.google.com/group/cython-users/browse_thread/thread/bcbc5fe0e329224f >> and http://trac.cython.org/cython_trac/ticket/498 , and some

Re: [Cython] Acquisition counted cdef classes

2011-10-25 Thread mark florisson
On 25 October 2011 12:22, Stefan Behnel wrote: > mark florisson, 25.10.2011 11:11: >> >> On 25 October 2011 08:33, Stefan Behnel wrote: >>> >>> mark florisson, 24.10.2011 21:50: >>>> >>>> This is in response to >>>> >&

Re: [Cython] Acquisition counted cdef classes

2011-10-25 Thread mark florisson
On 25 October 2011 19:10, Stefan Behnel wrote: > mark florisson, 25.10.2011 18:58: >> >> On 25 October 2011 12:22, Stefan Behnel wrote: >>> >>> mark florisson, 25.10.2011 11:11: >>>> >>>> On 25 October 2011 08:33, Stefan B

Re: [Cython] Acquisition counted cdef classes

2011-10-25 Thread mark florisson
On 25 October 2011 20:01, Dag Sverre Seljebotn wrote: > On 10/25/2011 06:58 PM, mark florisson wrote: >> >> On 25 October 2011 12:22, Stefan Behnel  wrote: >>> >>> The problem is not so much the INCREF (which is just an indirect add), >>> it's &g

Re: [Cython] Acquisition counted cdef classes

2011-10-25 Thread mark florisson
On 25 October 2011 20:15, Dag Sverre Seljebotn wrote: > On 10/25/2011 08:45 PM, mark florisson wrote: >> >> On 25 October 2011 19:10, Stefan Behnel  wrote: >>> >>> See? That's what I mean with language complexity. These things quickly >>> turn &

Re: [Cython] Acquisition counted cdef classes

2011-10-26 Thread mark florisson
On 26 October 2011 08:56, Stefan Behnel wrote: > Greg Ewing, 26.10.2011 00:27: >> >> Dag Sverre Seljebotn wrote: >> >>> I'd gladly take a factor two (or even four) slowdown of CPython code any >>> day to get rid of the GIL :-). The thing is, sometimes one has 48 cores >>> and consider a 10x speedu

Re: [Cython] Acquisition counted cdef classes

2011-10-26 Thread mark florisson
On 26 October 2011 11:23, Dag Sverre Seljebotn wrote: > On 10/26/2011 11:45 AM, mark florisson wrote: >> >> On 26 October 2011 08:56, Stefan Behnel  wrote: >>> >>> Greg Ewing, 26.10.2011 00:27: >>>> >>>> Dag Sverre Seljebotn wrote: >&g

Re: [Cython] Cython 0.16

2011-10-28 Thread mark florisson
On 28 October 2011 21:55, Robert Bradshaw wrote: > With Mark's fused types and memory views going in, I think it's about > time for a new release. Thoughts? Anyone want to volunteer to take up > the process? > > - Robert > ___ > cython-devel mailing list

Re: [Cython] Cython 0.16

2011-10-29 Thread mark florisson
revity. > > Robert Bradshaw wrote: >> >> On Fri, Oct 28, 2011 at 1:59 PM, mark florisson >> wrote: > On 28 October 2011 21:55, Robert >> Bradshaw wrote: >> With Mark's fused types >> and memory views going in, I think it's about >

Re: [Cython] Cython 0.16

2011-10-29 Thread mark florisson
Before we do a release, would anyone be opposed to a 'chunksize' keyword argument to prange()? That may have significant performance impacts. On 29 October 2011 12:41, mark florisson wrote: > Hm ok I'll disable them then. Pointers and some other dtypes are also > not supp

Re: [Cython] Cython 0.16

2011-10-29 Thread mark florisson
ent idea! > > El 29/10/2011 15:14, "mark florisson" va > escriure: >> >> Before we do a release, would anyone be opposed to a 'chunksize' >> keyword argument to prange()? That may have significant performance >> impacts. >> >> On 29 O

Re: [Cython] Cython 0.16

2011-10-29 Thread mark florisson
On 29 October 2011 15:50, Nathaniel Smith wrote: > On Oct 29, 2011 4:41 AM, "mark florisson" wrote: >> " >> Typed memoryviews can be used for efficient access to buffers. It is >> similar to the current buffer support, but has more features and >> clean

Re: [Cython] Cython 0.16

2011-10-29 Thread mark florisson
On 29 October 2011 15:50, Stefan Behnel wrote: > mark florisson, 28.10.2011 22:59: >> >> On 28 October 2011 21:55, Robert Bradshaw wrote: >>> >>> With Mark's fused types and memory views going in, I think it's about >>> time for a new releas

Re: [Cython] Cython 0.16

2011-10-29 Thread mark florisson
hould mention that in the documentation. This may be a problem especially for people who write libraries. Are NumPy, Scipy or Sage linked with any libraries that use OpenMP? On 29 October 2011 14:14, mark florisson wrote: > Before we do a release, would anyone be opposed to a 'chunksize' &g

Re: [Cython] Cython 0.16

2011-10-29 Thread mark florisson
On 29 October 2011 18:05, Robert Bradshaw wrote: > On Sat, Oct 29, 2011 at 4:41 AM, mark florisson > wrote: >> Hm ok I'll disable them then. Pointers and some other dtypes are also >> not supported yet. As for the documentation, have you guys reviewed >> the docu

Re: [Cython] Cython 0.16

2011-10-29 Thread mark florisson
On 29 October 2011 18:44, mark florisson wrote: > On 29 October 2011 18:05, Robert Bradshaw > wrote: >> On Sat, Oct 29, 2011 at 4:41 AM, mark florisson >> wrote: >>> Hm ok I'll disable them then. Pointers and some other dtypes are also >>> not supporte

Re: [Cython] Cython 0.16

2011-10-29 Thread mark florisson
On 29 October 2011 18:47, mark florisson wrote: > On 29 October 2011 18:44, mark florisson wrote: >> On 29 October 2011 18:05, Robert Bradshaw >> wrote: >>> On Sat, Oct 29, 2011 at 4:41 AM, mark florisson >>> wrote: >>>> Hm ok I'll disable

Re: [Cython] Cython 0.16

2011-10-29 Thread mark florisson
On 29 October 2011 18:59, Robert Bradshaw wrote: > On Sat, Oct 29, 2011 at 10:44 AM, mark florisson > wrote: >> On 29 October 2011 18:05, Robert Bradshaw >> wrote: >>> On Sat, Oct 29, 2011 at 4:41 AM, mark florisson >>> wrote: >>>> Hm ok I'

Re: [Cython] Cython 0.16

2011-10-30 Thread mark florisson
On 28 October 2011 21:59, mark florisson wrote: > On 28 October 2011 21:55, Robert Bradshaw > wrote: >> With Mark's fused types and memory views going in, I think it's about >> time for a new release. Thoughts? Anyone want to volunteer to take up &g

Re: [Cython] Cython 0.16

2011-10-31 Thread mark florisson
We can now pass a chunksize argument into prange: https://github.com/cython/cython/commit/5c3e77d3c70686fedd5619d7267728fc819b4c60 On 29 October 2011 14:14, mark florisson wrote: > Before we do a release, would anyone be opposed to a 'chunksize' > keyword argument to prange(

Re: [Cython] Cython 0.16

2011-11-03 Thread mark florisson
On 29 October 2011 17:40, Vitja Makarov wrote: > 2011/10/29 Stefan Behnel : >> mark florisson, 28.10.2011 22:59: >>> >>> On 28 October 2011 21:55, Robert Bradshaw wrote: >>>> >>>> With Mark's fused types and memory views going in, I th

Re: [Cython] Cython 0.16

2011-11-04 Thread mark florisson
On 3 November 2011 20:42, Vitja Makarov wrote: > 2011/11/4 mark florisson : >> On 29 October 2011 17:40, Vitja Makarov wrote: >>> 2011/10/29 Stefan Behnel : >>>> mark florisson, 28.10.2011 22:59: >>>>> >>>>> On 28 October 2011 21:55,

Re: [Cython] Cython 0.16

2011-11-04 Thread mark florisson
On 3 November 2011 21:26, Stefan Behnel wrote: > Vitja Makarov, 03.11.2011 21:42: >> >> 2011/11/4 mark florisson: >>> >>> With Vitja's super() ready and with fused classmethods and >>> staticmethods ready, I think we're almost ready for a rel

Re: [Cython] Cython 0.16

2011-11-04 Thread mark florisson
On 4 November 2011 08:58, Vitja Makarov wrote: > 2011/11/4 mark florisson : >>> >>> That's nice. I've also implemented support for dynamic default args >>> >>> http://trac.cython.org/cython_trac/ticket/674 >>> >>> I think it coul

Re: [Cython] [RFE] cygdb not in entrypoints

2011-11-15 Thread mark florisson
On 15 November 2011 15:19, Devin Bayer wrote: > Hi. Could you add cypdb to the entrypoints so that I can run it after an egg > installation? Yeah that's a good idea, that has never been tested (it's cygdb by the way, as it is an extension of gdb). > Also, it would be great if you mentioned how

[Cython] memoryviews from C arrays

2011-11-23 Thread mark florisson
Hey, Currently when we want to convert C arrays to memoryview slices we have to do this: cdef int array[5][4] cdef int[:, :] slice = array I'd like to be able to write cdef int array[5][4] cdef int[:, :] slice slice = array # and slice = array I think that would be convenient, especially i

Re: [Cython] memoryviews from C arrays

2011-11-23 Thread mark florisson
Yes, but I'm running some tests on hudson. On 23 November 2011 21:46, Robert Bradshaw wrote: > On Wed, Nov 23, 2011 at 12:21 PM, mark florisson > wrote: > > Hey, > > > > Currently when we want to convert C arrays to memoryview slices we have > to > >

[Cython] nested prange

2011-11-25 Thread mark florisson
I think we should allow nested prange()s, although it won't invoke nested OpenMP parallelism now, it still specifies that iterations are independent which can be useful for optimizations now (e.g. collapsing two loops into one) and in the future with other backends. Any thoughts or objections?

Re: [Cython] nested prange

2011-11-28 Thread mark florisson
ough we can't emit > code for it at the C level (due to C compiler bugs, right?) > > - Robert > > On Fri, Nov 25, 2011 at 3:12 AM, mark florisson > wrote: >> I think we should allow nested prange()s, although it won't invoke >> nested OpenMP parallelism now, i

Re: [Cython] [cython-users] malloc vs PyMem_malloc

2011-12-10 Thread mark florisson
On 10 December 2011 22:00, Stefan Behnel wrote: > mark florisson, 10.12.2011 21:44: >> >> On 10 December 2011 20:39, mark florisson wrote: >> >>> On 10 December 2011 19:16, Robert Bradshaw wrote: >>>> >>>> On this note, a useful pattern

Re: [Cython] Distributing Windows binary using OpenMP / cython.parallel

2011-12-12 Thread mark florisson
On 12 December 2011 20:09, Wes McKinney wrote: > I'm interested in using the Cython OpenMP extensions in pandas for > various calculations, but I'm concerned about cross-platform issues, > especially distributing built binaries of the extensions to Windows > users. Is there a clean way to bundle t

Re: [Cython] Bug report: building an extension with --pyrex-gdb fails

2011-12-17 Thread mark florisson
On 17 December 2011 12:40, Lars Buitinck wrote: > 2011/12/17 Lars Buitinck : >> I was trying to build a C++ extension with debugging support as >> described in http://docs.cython.org/src/userguide/debugging.html, but >> I got an error from the Cython compiler: > > Forgot to mention: I was using th

Re: [Cython] Bug report: building an extension with --pyrex-gdb fails

2011-12-17 Thread mark florisson
On 17 December 2011 12:57, Lars Buitinck wrote: > 2011/12/17 mark florisson : >> Thanks for your report, could you paste/attach the code of your >> extension module? > > The code is online at https://github.com/larsmans/sortedcollection > > -- > Lars Buitinck

Re: [Cython] Merging of the ctypes backend branch

2011-12-18 Thread mark florisson
On 17 December 2011 19:48, Romain Guillebert wrote: > Hi everyone > > I rebased the ctypes backend branch to the last cython commit, and I > wondered how the branch should be merged with the main cython > repository. I see 3 options : a) upload the branch without merging it b) > merge the branch b

Re: [Cython] [cython-users] memoryviews & parameter passing

2011-12-20 Thread mark florisson
On 20 December 2011 18:57, Dirk Rothe wrote: > Hello Cython-Devs, > > I'v thought I check out the memoryview syntax from cython-trunk to > refactor some tight loops on numpy arrays into smaller functions. But > either I'm doing something wrong or the call-overhead (of dostuff() ) > is still very l

Re: [Cython] Cannot assign type 'set &' to 'set'

2012-01-16 Thread mark florisson
Dear Dimitri, Sorry for the delay, many developers are busy with their lives. Thanks for the report, it think that this was broken in 464923673475879fedc103ef2ee0260ba88d1493, the culprit is https://github.com/cython/cython/blob/master/Cython/Compiler/ExprNodes.py#L603 , I think it should read 'if

Re: [Cython] Speedup module-level lookup

2012-01-19 Thread mark florisson
On 19 January 2012 08:00, Robert Bradshaw wrote: > On Wed, Jan 18, 2012 at 11:53 PM, Vitja Makarov > wrote: >> 2012/1/19 Vitja Makarov : >>> 2012/1/19 Robert Bradshaw : I think the right thing to do here is make all module-level globals into "cdef public" attributes, i.e. C globals wit

[Cython] 0.16 release

2012-01-23 Thread mark florisson
Hey, It's been almost three months since we talked about a 0.16 release, I think it's quite ready. It would already be a big release, it would be good to see how people like it, and to catch any issues etc before we pile on more features. Mark ___ cytho

Re: [Cython] Bug in Cython producing incorrect C code

2012-01-24 Thread mark florisson
On 24 January 2012 11:37, Konrad Hinsen wrote: > Compiling the attached Cython file produced the attached C file which > has errors in lines 532-534: > >  __pyx_v_self->xx = None; >  __pyx_v_self->yy = None; >  __pyx_v_self->zz = None; > > There is no C symbol "None", so this doesn't compile. > >

Re: [Cython] Bug in Cython producing incorrect C code

2012-01-24 Thread mark florisson
On 24 January 2012 18:30, Vitja Makarov wrote: > 2012/1/24 Robert Bradshaw : >> On Tue, Jan 24, 2012 at 6:09 AM, Vitja Makarov >> wrote: >>> 2012/1/24 mark florisson : >>>> On 24 January 2012 11:37, Konrad Hinsen wrote: >>>>> Compiling th

Re: [Cython] Bug in Cython producing incorrect C code

2012-01-24 Thread mark florisson
On 24 January 2012 19:18, Dag Sverre Seljebotn wrote: > On 01/24/2012 08:05 PM, Vitja Makarov wrote: >> >> 2012/1/24 mark florisson: >>> >>> On 24 January 2012 18:30, Vitja Makarov  wrote: >>>> >>>> 2012/1/24 Robert Bradshaw: >>>&g

[Cython] inline defnode calls

2012-01-24 Thread mark florisson
I just noticed the inline defnode call code. When I try to compile with 'cython -Xoptimize.inline_defnode_calls=True test.pyx' with the following code: def foo(x): print foo foo(10) I get Error compiling Cython file: ... def foo(x):

<    1   2   3   4   5   6   7   >