#include <revolution/OSFastCast.h> void OSInitFastCast (void);
None.
None.
Sets up the fast floating point number/integer casting feature. This function must be called before invoking any of the fast cast routines.
The OSInitFastCast function must be invoked before any fast cast routines (in OSFastCast.h) are called. In addition, the fast cast APIs require that applications not change Broadway GQRs (quantization registers) 2 through 5 (GCR0 is reserved in advance for single-precision floating points, and GCR1 is reserved for the compiler).
The fast cast API group uses Broadway's single load/store instructions which includes 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:
| 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. |
OSInitFastCast, OSf32tos16, OSf32tos8, OSf32tou16, OSf32tou8, OSs16tof32, OSs8tof32, OSu16tof32, OSu8tof32
03/01/2006 Initial version.