On Jun 9, 2010, at 12:53 PM, Sergey Bochkanov wrote:

Hello,

thanks to all who've replied to this discussion!

Taking into account what was said above, I've decided to  target
pure
ANSI C, i.e. C without newer  constructs like //  comments  and
other
stuff from newer standards. I don't want to use C99 because it
isn't
supported by MSVC (de facto standard under Windows).

I  think  that I'll make exception for static inlines because they can
be  easily  turned on/off with just one #define. Another exception - I
want to make use of SSE intrinsics (if they are provided by compiler),
but slower ANSI C equivalent will be provided so  one  #define  -  and
everything will be ANSI.


On 9 июн, 00:14, Robert Bradshaw wrote:
Back to your original question, you're talking about using/creating a
Python C interface generator. In this case, you may want to just
consider using Cython?

Ctypes gives me better control over situation. Arrays and records with
complex fields (which are records/arrays too) are hard to represent in
Cython, I think.

By records, are you talking about C structs? Cython can handle (nested) structs and arrays just fine, and easier (in my opinion) than ctypes can. Actually, I can't think of anything control that ctypes gives that Cython doesn't (though I'd be glad to be corrected).

Cython is a good general purpose tool which speeds up
computations and may be used to generate wrappers. But I think that it
is better to develop specialized solution for ALGLIB.

Furhtermore, I want to pass multiple precision types between Python
and ALGLIB - it is hard to implement efficiently with general purpose
tools. I just have no other chouice :)

I'd be glad to know exactly what is special about writing ALGLIB that's more difficult to do with using Cython. Either Cython would work for you (in which case you're still free to not use it) or that'll be good food for thought on something we need to make better.

- Robert

--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to