On 04/21/2010 11:47 PM, Adrien Guillon wrote: > Hello all, > > I've recently started to use NumPy to prototype some numerical > algorithms, which will eventually find their way to a GPU (where I > want to limit myself to single-precision operations for performance > reasons). I have recently switched to the use of the "single" type in > NumPy to ensure I use single-precision floating point operations. > > My understanding, however, is that Intel processors may use extended > precision for some operations anyways unless this is explicitly > disabled, which is done with gcc via the -ffloat-store operation. > Since I am prototyping algorithms for a different processor > architecture, where the extended precision registers simply do not > exist, I would really like to force NumPy to limit itself to using > single-precision operations throughout the calculation (no extended > precision in registers).
I don't think it is a good idea - even if you compile numpy itself with -ffloat-store, most runtime capabilities are built without this, so you will have differences wether the computation is done in the C library, in numpy, in the fortran runtime, or by the compiler (when computing constants). This sounds worse than what you can get from numpy by default, cheers, David _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion