On Thu, Dec 11, 2008 at 4:11 AM, Dag Sverre Seljebotn
<[EMAIL PROTECTED]> wrote:
> Great!
>
> I already wrote some descriptions along those lines at 
> http://wiki.cython.org/smallprojects (#2 IIRC).

The required steps you mention would be a really good guideline.

> What I suggest there would work for all C compilers, but using C99 complex 
> instead shouldn't be much different (but not much less work either...)

I'm particularly interested on C99/C++ complex because I need them to
support  in petsc4py a PETSc build with complex scalars. If you build
PETSc using a C compiler, the it used the C99 complex type, if you
build with C++, it uses std::complex.

In general, if you want to wrap or access from Cython any kind of
"external" code that uses native C/C++ complex numbers, then we need
this.

Of course, in the future, via appropriate compiler directives, we
could support non-native complex (I mean, what you are proposing),
probably re-using the Py_complex struct and some Py_XXX macros related
to it?


> -----Original Message-----
> From: "Lisandro Dalcin" <[EMAIL PROTECTED]>
> Date: Thursday, Dec 11, 2008 2:27 am
> Subject: [Cython] want to implement support for C99/C++ complex
> To: cython-dev <[email protected]>Reply-To: [email protected]
>
> Could any of you (Greg?) give me a executive summary about should I
>>change/add to Cython/Pyrex scanner/parser/generator to make this
>>possible? I believe the scanner does not need much (if any) work, but
>>up to now I cannot get Cython properly recognize something like "cdef
>>float complex z" or "cdef double complex z".
>>
>>--
>>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
>
>



-- 
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

Reply via email to