Re: [GD-General] Feedback wanted on POSH
Brought to you by:
vexxed72
From: Brian H. <ho...@py...> - 2003-11-19 11:43:23
|
> int - is fastest performing integer type for the platform. So, > Opteron, G5/PPC970, and Itanium may likely nudge int from 32bits up > to 64bits. This isn't really a platform thing as much as it is a compiler thing. Many, if not most, C compilers on DEC Alpha made "int" 32-bits simply for compatibility reasons. > float - fastest IEEE floating point arithmetic mode. > So most everything was 32bits.. now we're migrating to 64bit, so > this could change as well. Very few CPUs implement 64-bit floating point as fast as 32-bit. One thing that POSH doesn't try to do is abstract between IEEE and non-IEEE floating point formats. That just gets too complicated. > void* - most appropriate pointer type. > So dos's void* was 16bit for tiny and small real mode, 32bit for > medium and large mode, then protected mode/flat mode rolled around > and 32bit (31bit) became norm, now we've been warned not to use the > 32nd bit for house keeping because that'll get busted when > migrating to 64bit. This is one reason I'm specifically not supporting segmented architectures =3D) And technically DOS had 32-bit sized pointers, but they were actually only 20-bit addresses, much like early Amiga had 32-bit pointers but only 24-bit addresses (the good old days of shoving extra data in the high 8-bits...) > As far as I know, the only truly standard types are: > short - 16bit signed integer > long - 32bit signed integer nope The only guarantee is: sizeof(char)<=3Dsizeof(short)<=3Dsizeof(int)<=3Dsizeof(long) For example, on the Cray T8, ALL types are 64-bits except for char I believe. > Eventually we'll have to gracefully move C/C++ into the new world > of SIMD capabilities. I just hope there is also a plan to employ a > much better set of type definitions to go with it. Until the SIMD world can figure out how to refactor itself cleanly, I probably won't touch this, but it's something at the back of my mind. Right now "portable SIMD code" seems a bit like an oxymoron. Brian |