1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 9<title>OSInitFastCast</title> 10</head> 11 12<body> 13 14<h1>OSInitFastCast</h1> 15 16 17<h2>C Specification</h2> 18<BLOCKQUOTE> 19<pre><CODE> 20#include <revolution/OSFastCast.h> 21 22void OSInitFastCast (void); 23</CODE></pre> 24</BLOCKQUOTE> 25<h2>Arguments</h2> 26 27<p>None.</p> 28 29<h2>Return Values</h2> 30 31<p>None.</p> 32<H2>Description</H2> 33<P>Sets up the fast floating point number/integer casting feature. This function must be called before invoking any of the fast cast routines.</P> 34<P>The <CODE>OSInitFastCast</CODE> function must be invoked before any fast cast routines (in <CODE>OSFastCast.h</CODE>) 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).</P> 35<P>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). </P> 36<P>The GQRs are set to the following values:</P> 37<DIV align="left"> 38<TABLE border="1" cellpadding="3" cellspacing="0.1"> 39 <TBODY> 40 <TR> 41<TD width="120">GQR 2</TD> 42<TD width="300">Load u8 / Store u8. No scaling.</TD> 43 </TR> 44 <TR> 45<TD width="120">GQR 3</TD> 46<TD width="300">Load u16 / Store u16. No scaling.</TD> 47 </TR> 48 <TR> 49<TD width="120">GQR 4</TD> 50<TD width="300">Load s8 / Store s8. No scaling.</TD> 51 </TR> 52 <TR> 53<TD width="120">GQR 5</TD> 54<TD width="300">Load s16 / Store s16. No scaling.</TD> 55 </TR> 56 </TBODY> 57</TABLE> 58</DIV> 59 60 61 62<h2>See Also</h2> 63 64<p><code><a href="OSInitFastCast.html">OSInitFastCast</a>, <a href="OSf32tos16.html">OSf32tos16</a>, <a href="OSf32tos8.html">OSf32tos8</a>, <a href="OSf32tou16.html">OSf32tou16</a>, <a href="OSf32tou8.html">OSf32tou8</a>, <a href="OSs16tof32.html">OSs16tof32</a>, <a href="OSs8tof32.html">OSs8tof32</a>, <a href="OSu16tof32.html">OSu16tof32</a>, <a href="OSu8tof32.html">OSu8tof32</a></code></p> 65<H2>Revision History</H2> 66<P>03/01/2006 Initial version.</P> 67</body> 68</html>