[Numpy-discussion] Generalized ufuncs?
Charles R Harris
Fri Aug 15 02:28:52 CDT 2008
On Fri, Aug 15, 2008 at 1:18 AM, Andrew Dalke <email@example.com>wrote:
> Andrew Dalke:
> > For reference, a page on using inline and doing so portably:
> > http://www.greenend.org.uk/rjk/2003/03/inline.html
> On Aug 15, 2008, at 9:02 AM, Charles R Harris wrote:
> > Doesn't do the trick for compilers that aren't C99 compliant. And
> > there are many of them. For gcc there are other options.
> Pardon? It seems to list several ways to handle compilers that don't
> implement C99. Mostly by having a single INLINE define in one form
> or another to trigger the correct support.
> For example:
> You can support legacy compilers (i.e. anything without "inline")
> via -Dinline="", although this wastes space.
I missed that on a quick scan. ISTR reading the article before...
> The gcc options like -finline-functions and -finline-functions-called-
> once don't affect the grammar and don't seem relevant here.
They are flags, so can be made part of your local CFLAGS or part of the
compiler specific options. I use the first option to get inlining of the
string comparisons in the sort functions. It would be nice if MSVC, the main
offender against C99, could be relied on, and maybe the newest versions are
an improvement. But until then it is best to be conservative.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion