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 &lt;revolution/OSFastCast.h&gt;
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 floating point number/integer fast cast feature.&nbsp;This function must be called before invoking any of the fast cast routines. Furthermore, the effect of <FONT face="Courier New">OSInitFastCast</FONT> is limited to threads that call this function.</P>
34<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 touch Broadway GQRs (quantization registers) 2 through 5 (GCR0 is already reserved for basic single floats, and GCR1 is reserved by the compiler).</P>
35<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>
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.&nbsp;No scaling.</TD>
43    </TR>
44    <TR>
45<TD width="120">GQR 3</TD>
46<TD width="300">Load u16 / Store u16.&nbsp;No scaling.</TD>
47    </TR>
48    <TR>
49<TD width="120">GQR 4</TD>
50<TD width="300">Load s8 / Store s8.&nbsp;No scaling.</TD>
51    </TR>
52    <TR>
53<TD width="120">GQR 5</TD>
54<TD width="300">Load s16 / Store s16.&nbsp;No scaling.</TD>
55    </TR>
56  </TBODY>
57</TABLE>
58</DIV>
59
60<h2>See Also</h2>
61<p>
62<code><a href="OSf32tos16.html">OSf32tos16</a><BR> <a href="OSf32tos8.html">OSf32tos8</a><BR> <a href="OSf32tou16.html">OSf32tou16</a><BR> <a href="OSf32tou8.html">OSf32tou8</a><BR> <a href="OSs16tof32.html">OSs16tof32</a><BR> <a href="OSs8tof32.html">OSs8tof32</a><BR> <a href="OSu16tof32.html">OSu16tof32</a><BR> <a href="OSu8tof32.html">OSu8tof32</a></code>
63</p>
64
65<H2>Revision History</H2>
66<P>
672007/01/10 Added information about the effect of this function and its scope.<BR> 2006/03/01 Initial version. <BR>
68</P>
69<hr>
70<P>CONFIDENTIAL</p>
71</BODY>
72</HTML>
73