mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 12:41:54 +00:00
188 lines
21 KiB
HTML
188 lines
21 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.10"/>
|
|
<title>0.9.9 API documenation: func_integer.hpp Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { init_search(); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">0.9.9 API documenation
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.10 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_934f46a345653ef2b3014a1b37a162c1.html">G:</a></li><li class="navelem"><a class="el" href="dir_98f7f9d41f9d3029bd68cf237526a774.html">Source</a></li><li class="navelem"><a class="el" href="dir_9344afb825aed5e2f5be1d2015dde43c.html">G-Truc</a></li><li class="navelem"><a class="el" href="dir_45973f864e07b2505003ae343b7c8af7.html">glm</a></li><li class="navelem"><a class="el" href="dir_304be5dfae1339a7705426c0b536faf2.html">glm</a></li><li class="navelem"><a class="el" href="dir_da256b9dd32ba43e2eaa8a2832c37f1b.html">detail</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">func_integer.hpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="a00035.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> </div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#pragma once</span></div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> </div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include "<a class="code" href="a00102.html">setup.hpp</a>"</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include "<a class="code" href="a00090.html">qualifier.hpp</a>"</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include "<a class="code" href="a00032.html">func_common.hpp</a>"</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "<a class="code" href="a00039.html">func_vector_relational.hpp</a>"</span></div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> </div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="keyword">namespace </span><a class="code" href="a00143.html">glm</a></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> {</div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span> </div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keyword">template</span><length_t L, qualifier P></div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  GLM_FUNC_DECL vec<L, uint, P> <a class="code" href="a00151.html#ga2580af497d2105957cc589ffd4a853cd">uaddCarry</a>(</div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  vec<L, uint, P> <span class="keyword">const</span> & x,</div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  vec<L, uint, P> <span class="keyword">const</span> & y,</div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  vec<L, uint, P> & carry);</div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keyword">template</span><length_t L, qualifier P></div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  GLM_FUNC_DECL vec<L, uint, P> <a class="code" href="a00151.html#ga6f98b07ab5cf0d1df97b34c28aafa723">usubBorrow</a>(</div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  vec<L, uint, P> <span class="keyword">const</span> & x,</div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  vec<L, uint, P> <span class="keyword">const</span> & y,</div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  vec<L, uint, P> & borrow);</div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keyword">template</span><length_t L, qualifier P></div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  GLM_FUNC_DECL <span class="keywordtype">void</span> <a class="code" href="a00151.html#gac763612c0295fb7b31bd31f1b56761a8">umulExtended</a>(</div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  vec<L, uint, P> <span class="keyword">const</span> & x,</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  vec<L, uint, P> <span class="keyword">const</span> & y,</div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  vec<L, uint, P> & msb,</div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  vec<L, uint, P> & lsb);</div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  </div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keyword">template</span><length_t L, qualifier P></div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  GLM_FUNC_DECL <span class="keywordtype">void</span> <a class="code" href="a00151.html#gada3cb816d88f9b68fb7a187effb4f974">imulExtended</a>(</div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  vec<L, int, P> <span class="keyword">const</span> & x,</div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  vec<L, int, P> <span class="keyword">const</span> & y,</div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  vec<L, int, P> & msb,</div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  vec<L, int, P> & lsb);</div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div>
|
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keyword">template</span><length_t L, <span class="keyword">typename</span> T, qualifier P></div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  GLM_FUNC_DECL vec<L, T, P> <a class="code" href="a00151.html#ga2ab9ea1a1079e80a82191edee14c06c8">bitfieldExtract</a>(</div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  vec<L, T, P> <span class="keyword">const</span>& Value,</div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keywordtype">int</span> Offset,</div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keywordtype">int</span> Bits);</div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span> </div>
|
|
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keyword">template</span><length_t L, <span class="keyword">typename</span> T, qualifier P></div>
|
|
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  GLM_FUNC_DECL vec<L, T, P> <a class="code" href="a00151.html#ga1136d17630ecbecb9f4a63d9749f5ee7">bitfieldInsert</a>(</div>
|
|
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  vec<L, T, P> <span class="keyword">const</span>& Base,</div>
|
|
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  vec<L, T, P> <span class="keyword">const</span>& Insert,</div>
|
|
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordtype">int</span> Offset,</div>
|
|
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordtype">int</span> Bits);</div>
|
|
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> </div>
|
|
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keyword">template</span><length_t L, <span class="keyword">typename</span> T, qualifier P></div>
|
|
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  GLM_FUNC_DECL vec<L, T, P> <a class="code" href="a00151.html#ga524fde34694a91d2066162ab0bf17859">bitfieldReverse</a>(vec<L, T, P> <span class="keyword">const</span> & v);</div>
|
|
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span> </div>
|
|
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keyword">template</span><<span class="keyword">typename</span> genType></div>
|
|
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  GLM_FUNC_DECL <span class="keywordtype">int</span> <a class="code" href="a00151.html#gace2dbfa083773466715be25947dc4518">bitCount</a>(genType v);</div>
|
|
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span> </div>
|
|
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="keyword">template</span><length_t L, <span class="keyword">typename</span> T, qualifier P></div>
|
|
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  GLM_FUNC_DECL vec<L, int, P> <a class="code" href="a00151.html#gace2dbfa083773466715be25947dc4518">bitCount</a>(vec<L, T, P> <span class="keyword">const</span> & v);</div>
|
|
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> </div>
|
|
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="keyword">template</span><<span class="keyword">typename</span> genIUType></div>
|
|
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  GLM_FUNC_DECL <span class="keywordtype">int</span> <a class="code" href="a00151.html#ga29a63a1a0b5bcad9288e731204cd717e">findLSB</a>(genIUType x);</div>
|
|
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span> </div>
|
|
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keyword">template</span><length_t L, <span class="keyword">typename</span> T, qualifier P></div>
|
|
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  GLM_FUNC_DECL vec<L, int, P> <a class="code" href="a00151.html#ga29a63a1a0b5bcad9288e731204cd717e">findLSB</a>(vec<L, T, P> <span class="keyword">const</span> & v);</div>
|
|
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span> </div>
|
|
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="keyword">template</span><<span class="keyword">typename</span> genIUType></div>
|
|
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  GLM_FUNC_DECL <span class="keywordtype">int</span> <a class="code" href="a00151.html#ga23a934e033f663a4e7173f98af1e0f73">findMSB</a>(genIUType x);</div>
|
|
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span> </div>
|
|
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="keyword">template</span><length_t L, <span class="keyword">typename</span> T, qualifier P></div>
|
|
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  GLM_FUNC_DECL vec<L, int, P> <a class="code" href="a00151.html#ga23a934e033f663a4e7173f98af1e0f73">findMSB</a>(vec<L, T, P> <span class="keyword">const</span> & v);</div>
|
|
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span> </div>
|
|
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span> }<span class="comment">//namespace glm</span></div>
|
|
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span> </div>
|
|
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span> <span class="preprocessor">#include "func_integer.inl"</span></div>
|
|
<div class="ttc" id="a00151_html_ga23a934e033f663a4e7173f98af1e0f73"><div class="ttname"><a href="a00151.html#ga23a934e033f663a4e7173f98af1e0f73">glm::findMSB</a></div><div class="ttdeci">GLM_FUNC_DECL vec< L, int, P > findMSB(vec< L, T, P > const &v)</div><div class="ttdoc">Returns the bit number of the most significant bit in the binary representation of value...</div></div>
|
|
<div class="ttc" id="a00039_html"><div class="ttname"><a href="a00039.html">func_vector_relational.hpp</a></div><div class="ttdoc">GLM Core </div></div>
|
|
<div class="ttc" id="a00151_html_gace2dbfa083773466715be25947dc4518"><div class="ttname"><a href="a00151.html#gace2dbfa083773466715be25947dc4518">glm::bitCount</a></div><div class="ttdeci">GLM_FUNC_DECL vec< L, int, P > bitCount(vec< L, T, P > const &v)</div><div class="ttdoc">Returns the number of bits set to 1 in the binary representation of value. </div></div>
|
|
<div class="ttc" id="a00151_html_ga2580af497d2105957cc589ffd4a853cd"><div class="ttname"><a href="a00151.html#ga2580af497d2105957cc589ffd4a853cd">glm::uaddCarry</a></div><div class="ttdeci">GLM_FUNC_DECL vec< L, uint, P > uaddCarry(vec< L, uint, P > const &x, vec< L, uint, P > const &y, vec< L, uint, P > &carry)</div><div class="ttdoc">Adds 32-bit unsigned integer x and y, returning the sum modulo pow(2, 32). </div></div>
|
|
<div class="ttc" id="a00151_html_ga2ab9ea1a1079e80a82191edee14c06c8"><div class="ttname"><a href="a00151.html#ga2ab9ea1a1079e80a82191edee14c06c8">glm::bitfieldExtract</a></div><div class="ttdeci">GLM_FUNC_DECL vec< L, T, P > bitfieldExtract(vec< L, T, P > const &Value, int Offset, int Bits)</div><div class="ttdoc">Extracts bits [offset, offset + bits - 1] from value, returning them in the least significant bits of...</div></div>
|
|
<div class="ttc" id="a00151_html_ga6f98b07ab5cf0d1df97b34c28aafa723"><div class="ttname"><a href="a00151.html#ga6f98b07ab5cf0d1df97b34c28aafa723">glm::usubBorrow</a></div><div class="ttdeci">GLM_FUNC_DECL vec< L, uint, P > usubBorrow(vec< L, uint, P > const &x, vec< L, uint, P > const &y, vec< L, uint, P > &borrow)</div><div class="ttdoc">Subtracts the 32-bit unsigned integer y from x, returning the difference if non-negative, or pow(2, 32) plus the difference otherwise. </div></div>
|
|
<div class="ttc" id="a00143_html"><div class="ttname"><a href="a00143.html">glm</a></div><div class="ttdef"><b>Definition:</b> <a href="a00003_source.html#l00011">_noise.hpp:11</a></div></div>
|
|
<div class="ttc" id="a00090_html"><div class="ttname"><a href="a00090.html">qualifier.hpp</a></div><div class="ttdoc">GLM Core </div></div>
|
|
<div class="ttc" id="a00032_html"><div class="ttname"><a href="a00032.html">func_common.hpp</a></div><div class="ttdoc">GLM Core </div></div>
|
|
<div class="ttc" id="a00151_html_ga524fde34694a91d2066162ab0bf17859"><div class="ttname"><a href="a00151.html#ga524fde34694a91d2066162ab0bf17859">glm::bitfieldReverse</a></div><div class="ttdeci">GLM_FUNC_DECL vec< L, T, P > bitfieldReverse(vec< L, T, P > const &v)</div><div class="ttdoc">Returns the reversal of the bits of value. </div></div>
|
|
<div class="ttc" id="a00151_html_ga1136d17630ecbecb9f4a63d9749f5ee7"><div class="ttname"><a href="a00151.html#ga1136d17630ecbecb9f4a63d9749f5ee7">glm::bitfieldInsert</a></div><div class="ttdeci">GLM_FUNC_DECL vec< L, T, P > bitfieldInsert(vec< L, T, P > const &Base, vec< L, T, P > const &Insert, int Offset, int Bits)</div><div class="ttdoc">Returns the insertion the bits least-significant bits of insert into base. </div></div>
|
|
<div class="ttc" id="a00151_html_gac763612c0295fb7b31bd31f1b56761a8"><div class="ttname"><a href="a00151.html#gac763612c0295fb7b31bd31f1b56761a8">glm::umulExtended</a></div><div class="ttdeci">GLM_FUNC_DECL void umulExtended(vec< L, uint, P > const &x, vec< L, uint, P > const &y, vec< L, uint, P > &msb, vec< L, uint, P > &lsb)</div><div class="ttdoc">Multiplies 32-bit integers x and y, producing a 64-bit result. </div></div>
|
|
<div class="ttc" id="a00151_html_ga29a63a1a0b5bcad9288e731204cd717e"><div class="ttname"><a href="a00151.html#ga29a63a1a0b5bcad9288e731204cd717e">glm::findLSB</a></div><div class="ttdeci">GLM_FUNC_DECL vec< L, int, P > findLSB(vec< L, T, P > const &v)</div><div class="ttdoc">Returns the bit number of the least significant bit set to 1 in the binary representation of value...</div></div>
|
|
<div class="ttc" id="a00151_html_gada3cb816d88f9b68fb7a187effb4f974"><div class="ttname"><a href="a00151.html#gada3cb816d88f9b68fb7a187effb4f974">glm::imulExtended</a></div><div class="ttdeci">GLM_FUNC_DECL void imulExtended(vec< L, int, P > const &x, vec< L, int, P > const &y, vec< L, int, P > &msb, vec< L, int, P > &lsb)</div><div class="ttdoc">Multiplies 32-bit integers x and y, producing a 64-bit result. </div></div>
|
|
<div class="ttc" id="a00102_html"><div class="ttname"><a href="a00102.html">setup.hpp</a></div><div class="ttdoc">GLM Core </div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.10
|
|
</small></address>
|
|
</body>
|
|
</html>
|