[Numpy-discussion] Does float16 exist?

Matthieu Brucher matthieu.brucher@gmail....
Wed Jan 9 00:50:19 CST 2008

> > This can also be true of C code unless you use compilers in the same
> > family.
> There are also issues, but they are much simpler.
> > The C++ name mangling can be worked around.
> name mangling is just the top of the iceberg. There are problems wrt to
> static initialization, exception, etc...; ABI compatibility is much
> easier to break in C++ than in C. And then, there is the problem of C++
> ability of compilers.

This is no longer the case, sincerely. I use C++ compilers from different
vendors for some time, and I had almost no problem safe from some template
depth issues.


This is... well... outdated. I'm sorry, but the issues mentionned there are
pre- 2003 standard and since then, the C++ compilers follow the  standard.


KDE wants to maintain binary compatibility across versions. I don't know if
Numpy wants to stay compatible this way, but even there, I don't think Numpy
will use many virtual functions (too slow), and for the change of the
signature of a function, it is logical that it should not work.

I am not saying it is not possible, or that we should not do it: just
> that it has a high cost. IMHO, the benefits would have to be high.

I agree.

> I'm just thinking out loud about these things. Note that numpy already
> > uses what are essentially templates to generate C code using a Python
> > preprocessor, although perhaps the design could be a bit cleaner and
> > maybe a bit more general so as not to be limited to the C builtin types.
> I agree on this point (custom code generators use). Note that there are
> standard tools to generate simple templates in C (autogen).
> If what you want to do is to be able to use simple templates (by simple,
> I mean template function parametrized with the numerical type), C++ is
> overkill IMHO.

There are some other stuff that are interesting, but I don't think it would
be easy to use, like expression templates, but some operator overloading are
very simple to use (like specializing a template multplication to use CBLAS
if available).

French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080109/243faf64/attachment.html 

More information about the Numpy-discussion mailing list