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<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/os.h&gt;
19
20void OSInitFastCast(void);
21</pre></dd></dl>
22
23<h2>Arguments</h2>
24<p>None.</p>
25
26<h2>Return Values</h2>
27<p>None.</p>
28
29<H2>Description</H2>
30<P>Sets up the floating point number/integer cast feature.&nbsp;This function must be called before invoking any of the fast cast routines. Furthermore, the effect of the <CODE>OSInitFastCast</CODE> function is limited to threads that call this function.</P>
31<P>The <CODE>OSInitFastCast</CODE> function must be invoked before&nbsp;any fast cast routines (in <CODE>OSFastCast.h</CODE>) 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).</P>
32<P>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).</P>
33<P>The GQRs are set to the following values:</P>
34<DIV align="left">
35<TABLE class="arguments" border="1" >
36  <TBODY>
37    <TR>
38<TH>GQR 2</TH>
39<TD>Load u8 / Store u8.&nbsp;No scaling.</TD>
40    </TR>
41    <TR>
42<TH>GQR 3</TH>
43<TD>Load u16 / Store u16.&nbsp;No scaling.</TD>
44    </TR>
45    <TR>
46<TH>GQR 4</TH>
47<TD>Load s8 / Store s8.&nbsp;No scaling.</TD>
48    </TR>
49    <TR>
50<TH>GQR 5</TH>
51<TD>Load s16 / Store s16.&nbsp;No scaling.</TD>
52    </TR>
53  </TBODY>
54</TABLE>
55</DIV>
56
57<h2>See Also</h2>
58<P class="reference">
59<a href="OSf32tos16.html">OSf32tos16</a>,
60<a href="OSf32tos8.html">OSf32tos8</a>,
61<a href="OSf32tou16.html">OSf32tou16</a>,
62<a href="OSf32tou8.html">OSf32tou8</a>,
63<a href="OSs16tof32.html">OSs16tof32</a>,
64<a href="OSs8tof32.html">OSs8tof32</a>,
65<a href="OSu16tof32.html">OSu16tof32</a>,
66<a href="OSu8tof32.html">OSu8tof32</a>
67</p>
68
69<H2>Revision History</H2>
70<P>
712007/01/10 Added information about the effect of this function and its scope.<BR>2006/03/01 Initial version.<BR>
72</P>
73
74<hr><p>CONFIDENTIAL</p></body>
75</html>
76