#include <revolution/os.h> void OSInitFastCast(void);
None.
None.
Sets up the floating point number/integer cast feature. This function must be called before invoking any of the fast cast routines. Furthermore, the effect of the OSInitFastCast function is limited to threads that call this function.
The OSInitFastCast function must be invoked before any fast cast routines (in OSFastCast.h) are called. In addition, the fast cast functions require that applications not change Broadway GQRs (quantization registers) 2 through 5 (GQR0 is already reserved for basic single floats, and GQR1 is reserved by the compiler).
The fast cast functions use Broadway's paired-single load/store instructions, including quantization, to convert floats to ints and vice versa using just two instructions (load and store).
The GQRs are set to the following values:
| GQR 2 | Load u8 / Store u8. No scaling. |
|---|---|
| GQR 3 | Load u16 / Store u16. No scaling. |
| GQR 4 | Load s8 / Store s8. No scaling. |
| GQR 5 | Load s16 / Store s16. No scaling. |
OSf32tos16, OSf32tos8, OSf32tou16, OSf32tou8, OSs16tof32, OSs8tof32, OSu16tof32, OSu8tof32
2007/01/10 Added information about the effect of this function and its scope.
2006/03/01 Initial version.
CONFIDENTIAL