On Wed, 4 Oct 2006 10:23:25 -0700 Sebastian Haase <[EMAIL PROTECTED]> wrote:
> On Wednesday 04 October 2006 10:13, Tim Hochberg wrote: > > Sebastian Haase wrote: > > > Quick question hopefully somewhat related to this: > > > Does numexpr fully support float32 arrays ? > > > > I don't recall. At one point there was a tentative plan to support > > float32 by casting them a block at a time to float64, operating on them > > and them casting them back. That's to limit the number of bytecodes that > > we need to support and keep the switch statement at a manageable size. > > However, it doesn't look like that ever got implemented, so the answer > > is probably no. > > > > -tim > > Does that mean its considered "impratical" to ever add native float32 > support ? Is the switch-statement you mention written by hand or is that > automatically generated ? > -Sebastian > Currently by hand. I've got a rewrite lying around that generates the C code for it using a description in Python, but I haven't finished it yet. It should make it much easier to add different types, along with different methods of calculating and switching (switch vs. gcc's label pointers, for instance). Probably, if float32 is added, there will be two (internal) implementations: one that uses float64 mainly, and coerces float32 to float64, and one that does the reverse (this would be invisible to the user, of course). The same would handle int32 and int64. -- |>|\/|< /--------------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |[EMAIL PROTECTED] ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion