Great! I might have some time in January, and (better) might need it myself then. It is a chicken and egg problem though: I do not want to say whether I can spend time until I see the nature of the patch and how easy it is to build on to fix the shortcomings you mention :-)
This is all much easier to talk about when one can see the code, so even if the patch isn't applied immediately it is helpful to have to glance on. I recommend uploading a diff to a trac ticket (I think one exists but not sure), or if you do not want to do that just send me a copy. In short, this is in pretty high demand and it looks like either myself or Robert will pick it up if you make the patch available. Dag Sverre Seljebotn -----Original Message----- From: "Lisandro Dalcin" <[email protected]> Date: Monday, Dec 29, 2008 6:46 pm Subject: [Cython] C99/C++ complex type support To: cython-dev <[email protected]>Reply-To: [email protected] I have some working code. If any of you have some time, I can send a >preliminary patch. > >There are a lot of issues that need to be addressed, mainly: > >* This new complex support should be enabled by using a complier >directive. If not, there are backward compatibility issues, now >'complex' means the native C99/C++ type, and not the Python type >object. Furthermore, what would happen if the C compiler does not >fully implement C99 (Sun?). Other way will be to also support an >implementation based on Python's "Py_complex" struct, but I have not >idea how to transform airthmetic operations in appropriate function >calls. > >* Regarding the above issue, I'm not sure if we should use "complex" >or something new, like "ccomplex", I mean, how to specify the C native >type, like "cdef complex z" or "cdef ccomplex z", or something >different. The second will clearly help to dissambiguate and also >solve backward compatibility issues. > >* Up to now, I'm only managing the "double complex" case, supporting >"float complex" or "long double complex" will require the introduction >of a 'precission' concept in the spirit of 'longness' for integers >(What do you think?). > >Unfortunately, I'll not be available on all January to further work on >this. Just let me know if any you want to look at my patch. At least, >it serves to figure out what parts needs to be touched to make Cython >understand "complex" as a native C type. > > >-- >Lisandro Dalcín >--------------- >Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) >Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) >Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) >PTLC - Güemes 3450, (3000) Santa Fe, Argentina >Tel/Fax: +54-(0)342-451.1594 >_______________________________________________ >Cython-dev mailing list >[email protected] >http://codespeak.net/mailman/listinfo/cython-dev >
_______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
