diff options
Diffstat (limited to 'doc/ref/core/html/useful_8h.html')
-rw-r--r-- | doc/ref/core/html/useful_8h.html | 450 |
1 files changed, 450 insertions, 0 deletions
diff --git a/doc/ref/core/html/useful_8h.html b/doc/ref/core/html/useful_8h.html new file mode 100644 index 0000000000..039ce1a645 --- /dev/null +++ b/doc/ref/core/html/useful_8h.html @@ -0,0 +1,450 @@ +<!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.6"/> +<title>GRPC Core: include/grpc/support/useful.h File Reference</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/search.js"></script> +<script type="text/javascript"> + $(document).ready(function() { searchBox.OnSelectItem(0); }); +</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 style="padding-left: 0.5em;"> + <div id="projectname">GRPC Core +  <span id="projectnumber">0.10.0.0</span> + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.6 --> +<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="annotated.html"><span>Data Structures</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> + <li><a href="globals.html"><span>Globals</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)"> +<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> + +<!-- 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_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> +</div> +</div><!-- top --> +<div class="header"> + <div class="summary"> +<a href="#define-members">Macros</a> </div> + <div class="headertitle"> +<div class="title">useful.h File Reference</div> </div> +</div><!--header--> +<div class="contents"> + +<p><a href="useful_8h_source.html">Go to the source code of this file.</a></p> +<table class="memberdecls"> +<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> +Macros</h2></td></tr> +<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> +<tr class="separator:a298322c952526928cf8dbc7aaba7b84d"><td class="memSeparator" colspan="2"> </td></tr> +<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> +<tr class="separator:af50c518bb1183da84adb7d8a86cd568a"><td class="memSeparator" colspan="2"> </td></tr> +<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> +<tr class="separator:ac974b8c13ee716193e0ee30d9513672c"><td class="memSeparator" colspan="2"> </td></tr> +<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> +<tr class="separator:a6f7a8aba8e044f6b20fc8a7560f28f85"><td class="memSeparator" colspan="2"> </td></tr> +<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> +<tr class="separator:a5ff4b278972e799dc134963a0249f316"><td class="memSeparator" colspan="2"> </td></tr> +<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> +<tr class="separator:a0e411d4f81a169c97c319d4e84df5747"><td class="memSeparator" colspan="2"> </td></tr> +<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> +<tr class="separator:a9f884f8218a97ed9739e2dac467f0719"><td class="memSeparator" colspan="2"> </td></tr> +<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> +<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> +<tr class="separator:a28de4ed955bfc2bff309061b7820a37a"><td class="memSeparator" colspan="2"> </td></tr> +<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> +<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> +<tr class="separator:af797bf1803f9809b3ccceaa619078c89"><td class="memSeparator" colspan="2"> </td></tr> +<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> +<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> +<tr class="separator:a7c54bb2fffdaae24ba38ca5e5c53ab41"><td class="memSeparator" colspan="2"> </td></tr> +<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> +<tr class="separator:a601e1be692fe7922b52991a5d410b945"><td class="memSeparator" colspan="2"> </td></tr> +<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> +<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> +<tr class="separator:a8f51444fe97eb3f83184b98035e3357f"><td class="memSeparator" colspan="2"> </td></tr> +</table> +<h2 class="groupheader">Macro Definition Documentation</h2> +<a class="anchor" id="a0e411d4f81a169c97c319d4e84df5747"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define GPR_ARRAY_SIZE</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">array</td><td>)</td> + <td>   (sizeof(array) / sizeof(*(array)))</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="af797bf1803f9809b3ccceaa619078c89"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define GPR_BITCLEAR</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">i, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">n </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   ((*(i)) &= ~(1u << (n)))</td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Clear the <em>n-th</em> bit of <em>i</em> (a mutable pointer). </p> + +</div> +</div> +<a class="anchor" id="a8f51444fe97eb3f83184b98035e3357f"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define GPR_BITCOUNT</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">i</td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> +<b>Value:</b><div class="fragment"><div class="line">(((<a class="code" href="useful_8h.html#a601e1be692fe7922b52991a5d410b945">GPR_INTERNAL_HEXDIGIT_BITCOUNT</a>(i) + \</div> +<div class="line"> (<a class="code" href="useful_8h.html#a601e1be692fe7922b52991a5d410b945">GPR_INTERNAL_HEXDIGIT_BITCOUNT</a>(i) >> 4)) & \</div> +<div class="line"> 0x0f0f0f0f) % \</div> +<div class="line"> 255)</div> +<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> +</div><!-- fragment --> +<p>Returns number of bits set in bitset <em>i</em>. </p> + +</div> +</div> +<a class="anchor" id="a7c54bb2fffdaae24ba38ca5e5c53ab41"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define GPR_BITGET</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">i, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">n </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   (((i) & (1u << (n))) != 0)</td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Get the <em>n-th</em> bit of <em>i</em>. </p> + +</div> +</div> +<a class="anchor" id="a28de4ed955bfc2bff309061b7820a37a"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define GPR_BITSET</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">i, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">n </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   ((*(i)) |= (1u << (n)))</td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Set the <em>n-th</em> bit of <em>i</em> (a mutable pointer). </p> + +</div> +</div> +<a class="anchor" id="ac974b8c13ee716193e0ee30d9513672c"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define GPR_CLAMP</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">a, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">min, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">max </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   ((a) < (min) ? (min) : (a) > (max) ? (max) : (a))</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a601e1be692fe7922b52991a5d410b945"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define GPR_INTERNAL_HEXDIGIT_BITCOUNT</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">x</td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> +<b>Value:</b><div class="fragment"><div class="line">((x) - (((x) >> 1) & 0x77777777) - (((x) >> 2) & 0x33333333) - \</div> +<div class="line"> (((x) >> 3) & 0x11111111))</div> +</div><!-- fragment --> +</div> +</div> +<a class="anchor" id="af50c518bb1183da84adb7d8a86cd568a"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define GPR_MAX</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">a, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">b </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   ((a) > (b) ? (a) : (b))</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a298322c952526928cf8dbc7aaba7b84d"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define GPR_MIN</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">a, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">b </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   ((a) < (b) ? (a) : (b))</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a6f7a8aba8e044f6b20fc8a7560f28f85"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define GPR_ROTL</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">x, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">n </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   (((x) << (n)) | ((x) >> (sizeof(x) * 8 - (n))))</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a5ff4b278972e799dc134963a0249f316"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define GPR_ROTR</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">x, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">n </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td>   (((x) >> (n)) | ((x) << (sizeof(x) * 8 - (n))))</td> + </tr> + </table> +</div><div class="memdoc"> + +</div> +</div> +<a class="anchor" id="a9f884f8218a97ed9739e2dac467f0719"></a> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define GPR_SWAP</td> + <td>(</td> + <td class="paramtype"> </td> + <td class="paramname">type, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">a, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype"> </td> + <td class="paramname">b </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> +<b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">do</span> { \</div> +<div class="line"> type x = a; \</div> +<div class="line"> a = b; \</div> +<div class="line"> b = x; \</div> +<div class="line"> } <span class="keywordflow">while</span> (0)</div> +</div><!-- fragment --> +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated on Wed Aug 5 2015 08:17:05 for GRPC Core by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.6 +</small></address> +</body> +</html> |