Craig Tiller | 68f4e0f | 2015-08-05 08:18:21 -0700 | [diff] [blame^] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 6 | <meta name="generator" content="Doxygen 1.8.6"/> |
| 7 | <title>GRPC Core: include/grpc/support/useful.h File Reference</title> |
| 8 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 9 | <script type="text/javascript" src="jquery.js"></script> |
| 10 | <script type="text/javascript" src="dynsections.js"></script> |
| 11 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 12 | <script type="text/javascript" src="search/search.js"></script> |
| 13 | <script type="text/javascript"> |
| 14 | $(document).ready(function() { searchBox.OnSelectItem(0); }); |
| 15 | </script> |
| 16 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 17 | </head> |
| 18 | <body> |
| 19 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 20 | <div id="titlearea"> |
| 21 | <table cellspacing="0" cellpadding="0"> |
| 22 | <tbody> |
| 23 | <tr style="height: 56px;"> |
| 24 | <td style="padding-left: 0.5em;"> |
| 25 | <div id="projectname">GRPC Core |
| 26 |  <span id="projectnumber">0.10.0.0</span> |
| 27 | </div> |
| 28 | </td> |
| 29 | </tr> |
| 30 | </tbody> |
| 31 | </table> |
| 32 | </div> |
| 33 | <!-- end header part --> |
| 34 | <!-- Generated by Doxygen 1.8.6 --> |
| 35 | <script type="text/javascript"> |
| 36 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 37 | </script> |
| 38 | <div id="navrow1" class="tabs"> |
| 39 | <ul class="tablist"> |
| 40 | <li><a href="index.html"><span>Main Page</span></a></li> |
| 41 | <li><a href="annotated.html"><span>Data Structures</span></a></li> |
| 42 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
| 43 | <li> |
| 44 | <div id="MSearchBox" class="MSearchBoxInactive"> |
| 45 | <span class="left"> |
| 46 | <img id="MSearchSelect" src="search/mag_sel.png" |
| 47 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 48 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 49 | alt=""/> |
| 50 | <input type="text" id="MSearchField" value="Search" accesskey="S" |
| 51 | onfocus="searchBox.OnSearchFieldFocus(true)" |
| 52 | onblur="searchBox.OnSearchFieldFocus(false)" |
| 53 | onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| 54 | </span><span class="right"> |
| 55 | <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| 56 | </span> |
| 57 | </div> |
| 58 | </li> |
| 59 | </ul> |
| 60 | </div> |
| 61 | <div id="navrow2" class="tabs2"> |
| 62 | <ul class="tablist"> |
| 63 | <li><a href="files.html"><span>File List</span></a></li> |
| 64 | <li><a href="globals.html"><span>Globals</span></a></li> |
| 65 | </ul> |
| 66 | </div> |
| 67 | <!-- window showing the filter options --> |
| 68 | <div id="MSearchSelectWindow" |
| 69 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 70 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 71 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 72 | <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Pages</a></div> |
| 73 | |
| 74 | <!-- iframe showing the search results (closed by default) --> |
| 75 | <div id="MSearchResultsWindow"> |
| 76 | <iframe src="javascript:void(0)" frameborder="0" |
| 77 | name="MSearchResults" id="MSearchResults"> |
| 78 | </iframe> |
| 79 | </div> |
| 80 | |
| 81 | <div id="nav-path" class="navpath"> |
| 82 | <ul> |
| 83 | <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_9d7a14d6d9adcbe4c35dbdb88d867e2e.html">grpc</a></li><li class="navelem"><a class="el" href="dir_cad3142e04109052413f2d2a2d1813b0.html">support</a></li> </ul> |
| 84 | </div> |
| 85 | </div><!-- top --> |
| 86 | <div class="header"> |
| 87 | <div class="summary"> |
| 88 | <a href="#define-members">Macros</a> </div> |
| 89 | <div class="headertitle"> |
| 90 | <div class="title">useful.h File Reference</div> </div> |
| 91 | </div><!--header--> |
| 92 | <div class="contents"> |
| 93 | |
| 94 | <p><a href="useful_8h_source.html">Go to the source code of this file.</a></p> |
| 95 | <table class="memberdecls"> |
| 96 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> |
| 97 | Macros</h2></td></tr> |
| 98 | <tr class="memitem:a298322c952526928cf8dbc7aaba7b84d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="useful_8h.html#a298322c952526928cf8dbc7aaba7b84d">GPR_MIN</a>(a, b)   ((a) < (b) ? (a) : (b))</td></tr> |
| 99 | <tr class="separator:a298322c952526928cf8dbc7aaba7b84d"><td class="memSeparator" colspan="2"> </td></tr> |
| 100 | <tr class="memitem:af50c518bb1183da84adb7d8a86cd568a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="useful_8h.html#af50c518bb1183da84adb7d8a86cd568a">GPR_MAX</a>(a, b)   ((a) > (b) ? (a) : (b))</td></tr> |
| 101 | <tr class="separator:af50c518bb1183da84adb7d8a86cd568a"><td class="memSeparator" colspan="2"> </td></tr> |
| 102 | <tr class="memitem:ac974b8c13ee716193e0ee30d9513672c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="useful_8h.html#ac974b8c13ee716193e0ee30d9513672c">GPR_CLAMP</a>(a, min, max)   ((a) < (min) ? (min) : (a) > (max) ? (max) : (a))</td></tr> |
| 103 | <tr class="separator:ac974b8c13ee716193e0ee30d9513672c"><td class="memSeparator" colspan="2"> </td></tr> |
| 104 | <tr class="memitem:a6f7a8aba8e044f6b20fc8a7560f28f85"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="useful_8h.html#a6f7a8aba8e044f6b20fc8a7560f28f85">GPR_ROTL</a>(x, n)   (((x) << (n)) | ((x) >> (sizeof(x) * 8 - (n))))</td></tr> |
| 105 | <tr class="separator:a6f7a8aba8e044f6b20fc8a7560f28f85"><td class="memSeparator" colspan="2"> </td></tr> |
| 106 | <tr class="memitem:a5ff4b278972e799dc134963a0249f316"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="useful_8h.html#a5ff4b278972e799dc134963a0249f316">GPR_ROTR</a>(x, n)   (((x) >> (n)) | ((x) << (sizeof(x) * 8 - (n))))</td></tr> |
| 107 | <tr class="separator:a5ff4b278972e799dc134963a0249f316"><td class="memSeparator" colspan="2"> </td></tr> |
| 108 | <tr class="memitem:a0e411d4f81a169c97c319d4e84df5747"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="useful_8h.html#a0e411d4f81a169c97c319d4e84df5747">GPR_ARRAY_SIZE</a>(array)   (sizeof(array) / sizeof(*(array)))</td></tr> |
| 109 | <tr class="separator:a0e411d4f81a169c97c319d4e84df5747"><td class="memSeparator" colspan="2"> </td></tr> |
| 110 | <tr class="memitem:a9f884f8218a97ed9739e2dac467f0719"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="useful_8h.html#a9f884f8218a97ed9739e2dac467f0719">GPR_SWAP</a>(type, a, b)</td></tr> |
| 111 | <tr class="separator:a9f884f8218a97ed9739e2dac467f0719"><td class="memSeparator" colspan="2"> </td></tr> |
| 112 | <tr class="memitem:a28de4ed955bfc2bff309061b7820a37a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="useful_8h.html#a28de4ed955bfc2bff309061b7820a37a">GPR_BITSET</a>(i, n)   ((*(i)) |= (1u << (n)))</td></tr> |
| 113 | <tr class="memdesc:a28de4ed955bfc2bff309061b7820a37a"><td class="mdescLeft"> </td><td class="mdescRight">Set the <em>n-th</em> bit of <em>i</em> (a mutable pointer). <a href="#a28de4ed955bfc2bff309061b7820a37a">More...</a><br/></td></tr> |
| 114 | <tr class="separator:a28de4ed955bfc2bff309061b7820a37a"><td class="memSeparator" colspan="2"> </td></tr> |
| 115 | <tr class="memitem:af797bf1803f9809b3ccceaa619078c89"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="useful_8h.html#af797bf1803f9809b3ccceaa619078c89">GPR_BITCLEAR</a>(i, n)   ((*(i)) &= ~(1u << (n)))</td></tr> |
| 116 | <tr class="memdesc:af797bf1803f9809b3ccceaa619078c89"><td class="mdescLeft"> </td><td class="mdescRight">Clear the <em>n-th</em> bit of <em>i</em> (a mutable pointer). <a href="#af797bf1803f9809b3ccceaa619078c89">More...</a><br/></td></tr> |
| 117 | <tr class="separator:af797bf1803f9809b3ccceaa619078c89"><td class="memSeparator" colspan="2"> </td></tr> |
| 118 | <tr class="memitem:a7c54bb2fffdaae24ba38ca5e5c53ab41"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="useful_8h.html#a7c54bb2fffdaae24ba38ca5e5c53ab41">GPR_BITGET</a>(i, n)   (((i) & (1u << (n))) != 0)</td></tr> |
| 119 | <tr class="memdesc:a7c54bb2fffdaae24ba38ca5e5c53ab41"><td class="mdescLeft"> </td><td class="mdescRight">Get the <em>n-th</em> bit of <em>i</em>. <a href="#a7c54bb2fffdaae24ba38ca5e5c53ab41">More...</a><br/></td></tr> |
| 120 | <tr class="separator:a7c54bb2fffdaae24ba38ca5e5c53ab41"><td class="memSeparator" colspan="2"> </td></tr> |
| 121 | <tr class="memitem:a601e1be692fe7922b52991a5d410b945"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="useful_8h.html#a601e1be692fe7922b52991a5d410b945">GPR_INTERNAL_HEXDIGIT_BITCOUNT</a>(x)</td></tr> |
| 122 | <tr class="separator:a601e1be692fe7922b52991a5d410b945"><td class="memSeparator" colspan="2"> </td></tr> |
| 123 | <tr class="memitem:a8f51444fe97eb3f83184b98035e3357f"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="useful_8h.html#a8f51444fe97eb3f83184b98035e3357f">GPR_BITCOUNT</a>(i)</td></tr> |
| 124 | <tr class="memdesc:a8f51444fe97eb3f83184b98035e3357f"><td class="mdescLeft"> </td><td class="mdescRight">Returns number of bits set in bitset <em>i</em>. <a href="#a8f51444fe97eb3f83184b98035e3357f">More...</a><br/></td></tr> |
| 125 | <tr class="separator:a8f51444fe97eb3f83184b98035e3357f"><td class="memSeparator" colspan="2"> </td></tr> |
| 126 | </table> |
| 127 | <h2 class="groupheader">Macro Definition Documentation</h2> |
| 128 | <a class="anchor" id="a0e411d4f81a169c97c319d4e84df5747"></a> |
| 129 | <div class="memitem"> |
| 130 | <div class="memproto"> |
| 131 | <table class="memname"> |
| 132 | <tr> |
| 133 | <td class="memname">#define GPR_ARRAY_SIZE</td> |
| 134 | <td>(</td> |
| 135 | <td class="paramtype"> </td> |
| 136 | <td class="paramname">array</td><td>)</td> |
| 137 | <td>   (sizeof(array) / sizeof(*(array)))</td> |
| 138 | </tr> |
| 139 | </table> |
| 140 | </div><div class="memdoc"> |
| 141 | |
| 142 | </div> |
| 143 | </div> |
| 144 | <a class="anchor" id="af797bf1803f9809b3ccceaa619078c89"></a> |
| 145 | <div class="memitem"> |
| 146 | <div class="memproto"> |
| 147 | <table class="memname"> |
| 148 | <tr> |
| 149 | <td class="memname">#define GPR_BITCLEAR</td> |
| 150 | <td>(</td> |
| 151 | <td class="paramtype"> </td> |
| 152 | <td class="paramname">i, </td> |
| 153 | </tr> |
| 154 | <tr> |
| 155 | <td class="paramkey"></td> |
| 156 | <td></td> |
| 157 | <td class="paramtype"> </td> |
| 158 | <td class="paramname">n </td> |
| 159 | </tr> |
| 160 | <tr> |
| 161 | <td></td> |
| 162 | <td>)</td> |
| 163 | <td></td><td>   ((*(i)) &= ~(1u << (n)))</td> |
| 164 | </tr> |
| 165 | </table> |
| 166 | </div><div class="memdoc"> |
| 167 | |
| 168 | <p>Clear the <em>n-th</em> bit of <em>i</em> (a mutable pointer). </p> |
| 169 | |
| 170 | </div> |
| 171 | </div> |
| 172 | <a class="anchor" id="a8f51444fe97eb3f83184b98035e3357f"></a> |
| 173 | <div class="memitem"> |
| 174 | <div class="memproto"> |
| 175 | <table class="memname"> |
| 176 | <tr> |
| 177 | <td class="memname">#define GPR_BITCOUNT</td> |
| 178 | <td>(</td> |
| 179 | <td class="paramtype"> </td> |
| 180 | <td class="paramname">i</td><td>)</td> |
| 181 | <td></td> |
| 182 | </tr> |
| 183 | </table> |
| 184 | </div><div class="memdoc"> |
| 185 | <b>Value:</b><div class="fragment"><div class="line">(((<a class="code" href="useful_8h.html#a601e1be692fe7922b52991a5d410b945">GPR_INTERNAL_HEXDIGIT_BITCOUNT</a>(i) + \</div> |
| 186 | <div class="line"> (<a class="code" href="useful_8h.html#a601e1be692fe7922b52991a5d410b945">GPR_INTERNAL_HEXDIGIT_BITCOUNT</a>(i) >> 4)) & \</div> |
| 187 | <div class="line"> 0x0f0f0f0f) % \</div> |
| 188 | <div class="line"> 255)</div> |
| 189 | <div class="ttc" id="useful_8h_html_a601e1be692fe7922b52991a5d410b945"><div class="ttname"><a href="useful_8h.html#a601e1be692fe7922b52991a5d410b945">GPR_INTERNAL_HEXDIGIT_BITCOUNT</a></div><div class="ttdeci">#define GPR_INTERNAL_HEXDIGIT_BITCOUNT(x)</div><div class="ttdef"><b>Definition:</b> useful.h:64</div></div> |
| 190 | </div><!-- fragment --> |
| 191 | <p>Returns number of bits set in bitset <em>i</em>. </p> |
| 192 | |
| 193 | </div> |
| 194 | </div> |
| 195 | <a class="anchor" id="a7c54bb2fffdaae24ba38ca5e5c53ab41"></a> |
| 196 | <div class="memitem"> |
| 197 | <div class="memproto"> |
| 198 | <table class="memname"> |
| 199 | <tr> |
| 200 | <td class="memname">#define GPR_BITGET</td> |
| 201 | <td>(</td> |
| 202 | <td class="paramtype"> </td> |
| 203 | <td class="paramname">i, </td> |
| 204 | </tr> |
| 205 | <tr> |
| 206 | <td class="paramkey"></td> |
| 207 | <td></td> |
| 208 | <td class="paramtype"> </td> |
| 209 | <td class="paramname">n </td> |
| 210 | </tr> |
| 211 | <tr> |
| 212 | <td></td> |
| 213 | <td>)</td> |
| 214 | <td></td><td>   (((i) & (1u << (n))) != 0)</td> |
| 215 | </tr> |
| 216 | </table> |
| 217 | </div><div class="memdoc"> |
| 218 | |
| 219 | <p>Get the <em>n-th</em> bit of <em>i</em>. </p> |
| 220 | |
| 221 | </div> |
| 222 | </div> |
| 223 | <a class="anchor" id="a28de4ed955bfc2bff309061b7820a37a"></a> |
| 224 | <div class="memitem"> |
| 225 | <div class="memproto"> |
| 226 | <table class="memname"> |
| 227 | <tr> |
| 228 | <td class="memname">#define GPR_BITSET</td> |
| 229 | <td>(</td> |
| 230 | <td class="paramtype"> </td> |
| 231 | <td class="paramname">i, </td> |
| 232 | </tr> |
| 233 | <tr> |
| 234 | <td class="paramkey"></td> |
| 235 | <td></td> |
| 236 | <td class="paramtype"> </td> |
| 237 | <td class="paramname">n </td> |
| 238 | </tr> |
| 239 | <tr> |
| 240 | <td></td> |
| 241 | <td>)</td> |
| 242 | <td></td><td>   ((*(i)) |= (1u << (n)))</td> |
| 243 | </tr> |
| 244 | </table> |
| 245 | </div><div class="memdoc"> |
| 246 | |
| 247 | <p>Set the <em>n-th</em> bit of <em>i</em> (a mutable pointer). </p> |
| 248 | |
| 249 | </div> |
| 250 | </div> |
| 251 | <a class="anchor" id="ac974b8c13ee716193e0ee30d9513672c"></a> |
| 252 | <div class="memitem"> |
| 253 | <div class="memproto"> |
| 254 | <table class="memname"> |
| 255 | <tr> |
| 256 | <td class="memname">#define GPR_CLAMP</td> |
| 257 | <td>(</td> |
| 258 | <td class="paramtype"> </td> |
| 259 | <td class="paramname">a, </td> |
| 260 | </tr> |
| 261 | <tr> |
| 262 | <td class="paramkey"></td> |
| 263 | <td></td> |
| 264 | <td class="paramtype"> </td> |
| 265 | <td class="paramname">min, </td> |
| 266 | </tr> |
| 267 | <tr> |
| 268 | <td class="paramkey"></td> |
| 269 | <td></td> |
| 270 | <td class="paramtype"> </td> |
| 271 | <td class="paramname">max </td> |
| 272 | </tr> |
| 273 | <tr> |
| 274 | <td></td> |
| 275 | <td>)</td> |
| 276 | <td></td><td>   ((a) < (min) ? (min) : (a) > (max) ? (max) : (a))</td> |
| 277 | </tr> |
| 278 | </table> |
| 279 | </div><div class="memdoc"> |
| 280 | |
| 281 | </div> |
| 282 | </div> |
| 283 | <a class="anchor" id="a601e1be692fe7922b52991a5d410b945"></a> |
| 284 | <div class="memitem"> |
| 285 | <div class="memproto"> |
| 286 | <table class="memname"> |
| 287 | <tr> |
| 288 | <td class="memname">#define GPR_INTERNAL_HEXDIGIT_BITCOUNT</td> |
| 289 | <td>(</td> |
| 290 | <td class="paramtype"> </td> |
| 291 | <td class="paramname">x</td><td>)</td> |
| 292 | <td></td> |
| 293 | </tr> |
| 294 | </table> |
| 295 | </div><div class="memdoc"> |
| 296 | <b>Value:</b><div class="fragment"><div class="line">((x) - (((x) >> 1) & 0x77777777) - (((x) >> 2) & 0x33333333) - \</div> |
| 297 | <div class="line"> (((x) >> 3) & 0x11111111))</div> |
| 298 | </div><!-- fragment --> |
| 299 | </div> |
| 300 | </div> |
| 301 | <a class="anchor" id="af50c518bb1183da84adb7d8a86cd568a"></a> |
| 302 | <div class="memitem"> |
| 303 | <div class="memproto"> |
| 304 | <table class="memname"> |
| 305 | <tr> |
| 306 | <td class="memname">#define GPR_MAX</td> |
| 307 | <td>(</td> |
| 308 | <td class="paramtype"> </td> |
| 309 | <td class="paramname">a, </td> |
| 310 | </tr> |
| 311 | <tr> |
| 312 | <td class="paramkey"></td> |
| 313 | <td></td> |
| 314 | <td class="paramtype"> </td> |
| 315 | <td class="paramname">b </td> |
| 316 | </tr> |
| 317 | <tr> |
| 318 | <td></td> |
| 319 | <td>)</td> |
| 320 | <td></td><td>   ((a) > (b) ? (a) : (b))</td> |
| 321 | </tr> |
| 322 | </table> |
| 323 | </div><div class="memdoc"> |
| 324 | |
| 325 | </div> |
| 326 | </div> |
| 327 | <a class="anchor" id="a298322c952526928cf8dbc7aaba7b84d"></a> |
| 328 | <div class="memitem"> |
| 329 | <div class="memproto"> |
| 330 | <table class="memname"> |
| 331 | <tr> |
| 332 | <td class="memname">#define GPR_MIN</td> |
| 333 | <td>(</td> |
| 334 | <td class="paramtype"> </td> |
| 335 | <td class="paramname">a, </td> |
| 336 | </tr> |
| 337 | <tr> |
| 338 | <td class="paramkey"></td> |
| 339 | <td></td> |
| 340 | <td class="paramtype"> </td> |
| 341 | <td class="paramname">b </td> |
| 342 | </tr> |
| 343 | <tr> |
| 344 | <td></td> |
| 345 | <td>)</td> |
| 346 | <td></td><td>   ((a) < (b) ? (a) : (b))</td> |
| 347 | </tr> |
| 348 | </table> |
| 349 | </div><div class="memdoc"> |
| 350 | |
| 351 | </div> |
| 352 | </div> |
| 353 | <a class="anchor" id="a6f7a8aba8e044f6b20fc8a7560f28f85"></a> |
| 354 | <div class="memitem"> |
| 355 | <div class="memproto"> |
| 356 | <table class="memname"> |
| 357 | <tr> |
| 358 | <td class="memname">#define GPR_ROTL</td> |
| 359 | <td>(</td> |
| 360 | <td class="paramtype"> </td> |
| 361 | <td class="paramname">x, </td> |
| 362 | </tr> |
| 363 | <tr> |
| 364 | <td class="paramkey"></td> |
| 365 | <td></td> |
| 366 | <td class="paramtype"> </td> |
| 367 | <td class="paramname">n </td> |
| 368 | </tr> |
| 369 | <tr> |
| 370 | <td></td> |
| 371 | <td>)</td> |
| 372 | <td></td><td>   (((x) << (n)) | ((x) >> (sizeof(x) * 8 - (n))))</td> |
| 373 | </tr> |
| 374 | </table> |
| 375 | </div><div class="memdoc"> |
| 376 | |
| 377 | </div> |
| 378 | </div> |
| 379 | <a class="anchor" id="a5ff4b278972e799dc134963a0249f316"></a> |
| 380 | <div class="memitem"> |
| 381 | <div class="memproto"> |
| 382 | <table class="memname"> |
| 383 | <tr> |
| 384 | <td class="memname">#define GPR_ROTR</td> |
| 385 | <td>(</td> |
| 386 | <td class="paramtype"> </td> |
| 387 | <td class="paramname">x, </td> |
| 388 | </tr> |
| 389 | <tr> |
| 390 | <td class="paramkey"></td> |
| 391 | <td></td> |
| 392 | <td class="paramtype"> </td> |
| 393 | <td class="paramname">n </td> |
| 394 | </tr> |
| 395 | <tr> |
| 396 | <td></td> |
| 397 | <td>)</td> |
| 398 | <td></td><td>   (((x) >> (n)) | ((x) << (sizeof(x) * 8 - (n))))</td> |
| 399 | </tr> |
| 400 | </table> |
| 401 | </div><div class="memdoc"> |
| 402 | |
| 403 | </div> |
| 404 | </div> |
| 405 | <a class="anchor" id="a9f884f8218a97ed9739e2dac467f0719"></a> |
| 406 | <div class="memitem"> |
| 407 | <div class="memproto"> |
| 408 | <table class="memname"> |
| 409 | <tr> |
| 410 | <td class="memname">#define GPR_SWAP</td> |
| 411 | <td>(</td> |
| 412 | <td class="paramtype"> </td> |
| 413 | <td class="paramname">type, </td> |
| 414 | </tr> |
| 415 | <tr> |
| 416 | <td class="paramkey"></td> |
| 417 | <td></td> |
| 418 | <td class="paramtype"> </td> |
| 419 | <td class="paramname">a, </td> |
| 420 | </tr> |
| 421 | <tr> |
| 422 | <td class="paramkey"></td> |
| 423 | <td></td> |
| 424 | <td class="paramtype"> </td> |
| 425 | <td class="paramname">b </td> |
| 426 | </tr> |
| 427 | <tr> |
| 428 | <td></td> |
| 429 | <td>)</td> |
| 430 | <td></td><td></td> |
| 431 | </tr> |
| 432 | </table> |
| 433 | </div><div class="memdoc"> |
| 434 | <b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">do</span> { \</div> |
| 435 | <div class="line"> type x = a; \</div> |
| 436 | <div class="line"> a = b; \</div> |
| 437 | <div class="line"> b = x; \</div> |
| 438 | <div class="line"> } <span class="keywordflow">while</span> (0)</div> |
| 439 | </div><!-- fragment --> |
| 440 | </div> |
| 441 | </div> |
| 442 | </div><!-- contents --> |
| 443 | <!-- start footer part --> |
| 444 | <hr class="footer"/><address class="footer"><small> |
| 445 | Generated on Wed Aug 5 2015 08:17:07 for GRPC Core by  <a href="http://www.doxygen.org/index.html"> |
| 446 | <img class="footer" src="doxygen.png" alt="doxygen"/> |
| 447 | </a> 1.8.6 |
| 448 | </small></address> |
| 449 | </body> |
| 450 | </html> |