#include <cafe/os.h> static inline void OSInitFastCast(void)
Cafe OS initializes the fast floating-point number/integer casting feature for the main program and all threads.
Threads that use Espresso GQRs (quantization registers) 2 through 5 must call
OSInitFastCast to reinitialize the GQRs before any fast cast routines (in
OSFastCast.h) are called.
GQRs are managed per thread.
GQR0 is reserved in advance to have the value
0 for loading and storing single-precision floating-point values.
GQR1 is reserved for the compiler.
The fast cast API group uses Espresso's single load/store instructions, which include a quantization instruction that converts a floating-point number to an integer in only two instructions (load and store).
The GQRs are set to the following values:
|Multiple threads||This function is not thread-safe.|
2013/05/08 Automated cleanup pass.
2010/08/30 Initial version.