Sun, 13 Nov 2022 13:29:15 +0100
more custom data for array re-allocator
universe@390 | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
universe@390 | 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
universe@390 | 3 | <head> |
universe@390 | 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
universe@390 | 5 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
universe@390 | 6 | <meta name="generator" content="Doxygen 1.8.13"/> |
universe@390 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
universe@390 | 8 | <title>ucx: /home/mike/workspace/c/ucx/src/ucx/ucx.h File Reference</title> |
universe@390 | 9 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
universe@390 | 10 | <script type="text/javascript" src="jquery.js"></script> |
universe@390 | 11 | <script type="text/javascript" src="dynsections.js"></script> |
universe@390 | 12 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
universe@390 | 13 | <script type="text/javascript" src="search/searchdata.js"></script> |
universe@390 | 14 | <script type="text/javascript" src="search/search.js"></script> |
universe@390 | 15 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
universe@390 | 16 | </head> |
universe@390 | 17 | <body> |
universe@390 | 18 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
universe@390 | 19 | <div id="titlearea"> |
universe@390 | 20 | <table cellspacing="0" cellpadding="0"> |
universe@390 | 21 | <tbody> |
universe@390 | 22 | <tr style="height: 56px;"> |
universe@390 | 23 | <td id="projectlogo"><img alt="Logo" src="uaplogo.png"/></td> |
universe@390 | 24 | <td id="projectalign" style="padding-left: 0.5em;"> |
universe@390 | 25 | <div id="projectname">ucx |
universe@390 | 26 | </div> |
universe@390 | 27 | <div id="projectbrief">UAP Common Extensions</div> |
universe@390 | 28 | </td> |
universe@390 | 29 | </tr> |
universe@390 | 30 | </tbody> |
universe@390 | 31 | </table> |
universe@390 | 32 | </div> |
universe@390 | 33 | <!-- end header part --> |
universe@390 | 34 | <!-- Generated by Doxygen 1.8.13 --> |
universe@390 | 35 | <script type="text/javascript"> |
universe@390 | 36 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
universe@390 | 37 | </script> |
universe@390 | 38 | <script type="text/javascript" src="menudata.js"></script> |
universe@390 | 39 | <script type="text/javascript" src="menu.js"></script> |
universe@390 | 40 | <script type="text/javascript"> |
universe@390 | 41 | $(function() { |
universe@390 | 42 | initMenu('',true,false,'search.php','Search'); |
universe@390 | 43 | $(document).ready(function() { init_search(); }); |
universe@390 | 44 | }); |
universe@390 | 45 | </script> |
universe@390 | 46 | <div id="main-nav"></div> |
universe@390 | 47 | <!-- window showing the filter options --> |
universe@390 | 48 | <div id="MSearchSelectWindow" |
universe@390 | 49 | onmouseover="return searchBox.OnSearchSelectShow()" |
universe@390 | 50 | onmouseout="return searchBox.OnSearchSelectHide()" |
universe@390 | 51 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
universe@390 | 52 | </div> |
universe@390 | 53 | |
universe@390 | 54 | <!-- iframe showing the search results (closed by default) --> |
universe@390 | 55 | <div id="MSearchResultsWindow"> |
universe@390 | 56 | <iframe src="javascript:void(0)" frameborder="0" |
universe@390 | 57 | name="MSearchResults" id="MSearchResults"> |
universe@390 | 58 | </iframe> |
universe@390 | 59 | </div> |
universe@390 | 60 | |
universe@390 | 61 | <div id="nav-path" class="navpath"> |
universe@390 | 62 | <ul> |
universe@390 | 63 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_69f4ea29401808fe6229564976cde3ce.html">ucx</a></li> </ul> |
universe@390 | 64 | </div> |
universe@390 | 65 | </div><!-- top --> |
universe@390 | 66 | <div class="header"> |
universe@390 | 67 | <div class="summary"> |
universe@390 | 68 | <a href="#define-members">Macros</a> | |
universe@390 | 69 | <a href="#typedef-members">Typedefs</a> | |
universe@390 | 70 | <a href="#func-members">Functions</a> </div> |
universe@390 | 71 | <div class="headertitle"> |
universe@390 | 72 | <div class="title">ucx.h File Reference</div> </div> |
universe@390 | 73 | </div><!--header--> |
universe@390 | 74 | <div class="contents"> |
universe@390 | 75 | |
universe@390 | 76 | <p>Main UCX Header providing most common definitions. |
universe@390 | 77 | <a href="#details">More...</a></p> |
universe@390 | 78 | <div class="textblock"><code>#include <stdlib.h></code><br /> |
universe@390 | 79 | <code>#include <stdint.h></code><br /> |
universe@390 | 80 | <code>#include <sys/types.h></code><br /> |
universe@390 | 81 | </div> |
universe@390 | 82 | <p><a href="ucx_8h_source.html">Go to the source code of this file.</a></p> |
universe@390 | 83 | <table class="memberdecls"> |
universe@390 | 84 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> |
universe@390 | 85 | Macros</h2></td></tr> |
universe@390 | 86 | <tr class="memitem:aa57e5dd22d42387d748cc16777df1383"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="ucx_8h.html#aa57e5dd22d42387d748cc16777df1383">UCX_VERSION_MAJOR</a>   2</td></tr> |
universe@390 | 87 | <tr class="memdesc:aa57e5dd22d42387d748cc16777df1383"><td class="mdescLeft"> </td><td class="mdescRight">Major UCX version as integer constant. <a href="#aa57e5dd22d42387d748cc16777df1383">More...</a><br /></td></tr> |
universe@390 | 88 | <tr class="separator:aa57e5dd22d42387d748cc16777df1383"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 89 | <tr class="memitem:a9ac10d6353e23d4615a87fc737c65eb0"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="ucx_8h.html#a9ac10d6353e23d4615a87fc737c65eb0">UCX_VERSION_MINOR</a>   1</td></tr> |
universe@390 | 90 | <tr class="memdesc:a9ac10d6353e23d4615a87fc737c65eb0"><td class="mdescLeft"> </td><td class="mdescRight">Minor UCX version as integer constant. <a href="#a9ac10d6353e23d4615a87fc737c65eb0">More...</a><br /></td></tr> |
universe@390 | 91 | <tr class="separator:a9ac10d6353e23d4615a87fc737c65eb0"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 92 | <tr class="memitem:af12001920ca2fc1405615684e4dea284"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="ucx_8h.html#af12001920ca2fc1405615684e4dea284">UCX_VERSION</a>   (((<a class="el" href="ucx_8h.html#aa57e5dd22d42387d748cc16777df1383">UCX_VERSION_MAJOR</a>)<<16)|<a class="el" href="ucx_8h.html#a9ac10d6353e23d4615a87fc737c65eb0">UCX_VERSION_MINOR</a>)</td></tr> |
universe@390 | 93 | <tr class="memdesc:af12001920ca2fc1405615684e4dea284"><td class="mdescLeft"> </td><td class="mdescRight">Version constant which ensures to increase monotonically. <a href="#af12001920ca2fc1405615684e4dea284">More...</a><br /></td></tr> |
universe@390 | 94 | <tr class="separator:af12001920ca2fc1405615684e4dea284"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 95 | <tr class="memitem:a0b5ed6c1a0b15356f4f948acfd32a4cc"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="ucx_8h.html#a0b5ed6c1a0b15356f4f948acfd32a4cc">ucx_szmul</a>(a, b, result)   <a class="el" href="ucx_8h.html#a6637171cc0ec097b297f731a3036dd3b">ucx_szmul_impl</a>(a, b, result)</td></tr> |
universe@390 | 96 | <tr class="memdesc:a0b5ed6c1a0b15356f4f948acfd32a4cc"><td class="mdescLeft"> </td><td class="mdescRight">Performs a multiplication of size_t values and checks for overflow. <a href="#a0b5ed6c1a0b15356f4f948acfd32a4cc">More...</a><br /></td></tr> |
universe@390 | 97 | <tr class="separator:a0b5ed6c1a0b15356f4f948acfd32a4cc"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 98 | </table><table class="memberdecls"> |
universe@390 | 99 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> |
universe@390 | 100 | Typedefs</h2></td></tr> |
universe@390 | 101 | <tr class="memitem:ad2b370c2809914c8b7fedab163c266b3"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="ucx_8h.html#ad2b370c2809914c8b7fedab163c266b3">ucx_destructor</a>) (void *)</td></tr> |
universe@390 | 102 | <tr class="memdesc:ad2b370c2809914c8b7fedab163c266b3"><td class="mdescLeft"> </td><td class="mdescRight">A function pointer to a destructor function. <a href="#ad2b370c2809914c8b7fedab163c266b3">More...</a><br /></td></tr> |
universe@390 | 103 | <tr class="separator:ad2b370c2809914c8b7fedab163c266b3"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 104 | <tr class="memitem:afe5e2d5dbf34778e0e97852051570791"><td class="memItemLeft" align="right" valign="top">typedef int(* </td><td class="memItemRight" valign="bottom"><a class="el" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a>) (const void *, const void *, void *)</td></tr> |
universe@390 | 105 | <tr class="memdesc:afe5e2d5dbf34778e0e97852051570791"><td class="mdescLeft"> </td><td class="mdescRight">Function pointer to a compare function. <a href="#afe5e2d5dbf34778e0e97852051570791">More...</a><br /></td></tr> |
universe@390 | 106 | <tr class="separator:afe5e2d5dbf34778e0e97852051570791"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 107 | <tr class="memitem:a0bc5bf89e556c1d45d10863d52728ac9"><td class="memItemLeft" align="right" valign="top">typedef intmax_t(* </td><td class="memItemRight" valign="bottom"><a class="el" href="ucx_8h.html#a0bc5bf89e556c1d45d10863d52728ac9">distance_func</a>) (const void *, const void *, void *)</td></tr> |
universe@390 | 108 | <tr class="memdesc:a0bc5bf89e556c1d45d10863d52728ac9"><td class="mdescLeft"> </td><td class="mdescRight">Function pointer to a distance function. <a href="#a0bc5bf89e556c1d45d10863d52728ac9">More...</a><br /></td></tr> |
universe@390 | 109 | <tr class="separator:a0bc5bf89e556c1d45d10863d52728ac9"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 110 | <tr class="memitem:aab917a5fe0965673c73e8ebd0a1fc967"><td class="memItemLeft" align="right" valign="top">typedef void *(* </td><td class="memItemRight" valign="bottom"><a class="el" href="ucx_8h.html#aab917a5fe0965673c73e8ebd0a1fc967">copy_func</a>) (const void *, void *)</td></tr> |
universe@390 | 111 | <tr class="memdesc:aab917a5fe0965673c73e8ebd0a1fc967"><td class="mdescLeft"> </td><td class="mdescRight">Function pointer to a copy function. <a href="#aab917a5fe0965673c73e8ebd0a1fc967">More...</a><br /></td></tr> |
universe@390 | 112 | <tr class="separator:aab917a5fe0965673c73e8ebd0a1fc967"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 113 | <tr class="memitem:a989b3f0fa4d307d278378fde435641ed"><td class="memItemLeft" align="right" valign="top">typedef size_t(* </td><td class="memItemRight" valign="bottom"><a class="el" href="ucx_8h.html#a989b3f0fa4d307d278378fde435641ed">write_func</a>) (const void *, size_t, size_t, void *)</td></tr> |
universe@390 | 114 | <tr class="memdesc:a989b3f0fa4d307d278378fde435641ed"><td class="mdescLeft"> </td><td class="mdescRight">Function pointer to a write function. <a href="#a989b3f0fa4d307d278378fde435641ed">More...</a><br /></td></tr> |
universe@390 | 115 | <tr class="separator:a989b3f0fa4d307d278378fde435641ed"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 116 | <tr class="memitem:a6a67e255e460acb58f802067b3ff5fd5"><td class="memItemLeft" align="right" valign="top">typedef size_t(* </td><td class="memItemRight" valign="bottom"><a class="el" href="ucx_8h.html#a6a67e255e460acb58f802067b3ff5fd5">read_func</a>) (void *, size_t, size_t, void *)</td></tr> |
universe@390 | 117 | <tr class="memdesc:a6a67e255e460acb58f802067b3ff5fd5"><td class="mdescLeft"> </td><td class="mdescRight">Function pointer to a read function. <a href="#a6a67e255e460acb58f802067b3ff5fd5">More...</a><br /></td></tr> |
universe@390 | 118 | <tr class="separator:a6a67e255e460acb58f802067b3ff5fd5"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 119 | </table><table class="memberdecls"> |
universe@390 | 120 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
universe@390 | 121 | Functions</h2></td></tr> |
universe@390 | 122 | <tr class="memitem:a6637171cc0ec097b297f731a3036dd3b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="ucx_8h.html#a6637171cc0ec097b297f731a3036dd3b">ucx_szmul_impl</a> (size_t a, size_t b, size_t *result)</td></tr> |
universe@390 | 123 | <tr class="memdesc:a6637171cc0ec097b297f731a3036dd3b"><td class="mdescLeft"> </td><td class="mdescRight">Performs a multiplication of size_t values and checks for overflow. <a href="#a6637171cc0ec097b297f731a3036dd3b">More...</a><br /></td></tr> |
universe@390 | 124 | <tr class="separator:a6637171cc0ec097b297f731a3036dd3b"><td class="memSeparator" colspan="2"> </td></tr> |
universe@390 | 125 | </table> |
universe@390 | 126 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
universe@390 | 127 | <div class="textblock"><p>Main UCX Header providing most common definitions. </p> |
universe@390 | 128 | <dl class="section author"><dt>Author</dt><dd>Mike Becker </dd> |
universe@390 | 129 | <dd> |
universe@390 | 130 | Olaf Wintermann </dd></dl> |
universe@390 | 131 | </div><h2 class="groupheader">Macro Definition Documentation</h2> |
universe@390 | 132 | <a id="a0b5ed6c1a0b15356f4f948acfd32a4cc"></a> |
universe@390 | 133 | <h2 class="memtitle"><span class="permalink"><a href="#a0b5ed6c1a0b15356f4f948acfd32a4cc">◆ </a></span>ucx_szmul</h2> |
universe@390 | 134 | |
universe@390 | 135 | <div class="memitem"> |
universe@390 | 136 | <div class="memproto"> |
universe@390 | 137 | <table class="memname"> |
universe@390 | 138 | <tr> |
universe@390 | 139 | <td class="memname">#define ucx_szmul</td> |
universe@390 | 140 | <td>(</td> |
universe@390 | 141 | <td class="paramtype"> </td> |
universe@390 | 142 | <td class="paramname">a, </td> |
universe@390 | 143 | </tr> |
universe@390 | 144 | <tr> |
universe@390 | 145 | <td class="paramkey"></td> |
universe@390 | 146 | <td></td> |
universe@390 | 147 | <td class="paramtype"> </td> |
universe@390 | 148 | <td class="paramname">b, </td> |
universe@390 | 149 | </tr> |
universe@390 | 150 | <tr> |
universe@390 | 151 | <td class="paramkey"></td> |
universe@390 | 152 | <td></td> |
universe@390 | 153 | <td class="paramtype"> </td> |
universe@390 | 154 | <td class="paramname">result </td> |
universe@390 | 155 | </tr> |
universe@390 | 156 | <tr> |
universe@390 | 157 | <td></td> |
universe@390 | 158 | <td>)</td> |
universe@390 | 159 | <td></td><td>   <a class="el" href="ucx_8h.html#a6637171cc0ec097b297f731a3036dd3b">ucx_szmul_impl</a>(a, b, result)</td> |
universe@390 | 160 | </tr> |
universe@390 | 161 | </table> |
universe@390 | 162 | </div><div class="memdoc"> |
universe@390 | 163 | |
universe@390 | 164 | <p>Performs a multiplication of size_t values and checks for overflow. </p> |
universe@390 | 165 | <dl class="params"><dt>Parameters</dt><dd> |
universe@390 | 166 | <table class="params"> |
universe@390 | 167 | <tr><td class="paramname">a</td><td>first operand </td></tr> |
universe@390 | 168 | <tr><td class="paramname">b</td><td>second operand </td></tr> |
universe@390 | 169 | <tr><td class="paramname">result</td><td>a pointer to a size_t, where the result should be stored </td></tr> |
universe@390 | 170 | </table> |
universe@390 | 171 | </dd> |
universe@390 | 172 | </dl> |
universe@390 | 173 | <dl class="section return"><dt>Returns</dt><dd>zero, if no overflow occurred and the result is correct, non-zero otherwise </dd></dl> |
universe@390 | 174 | |
universe@390 | 175 | </div> |
universe@390 | 176 | </div> |
universe@390 | 177 | <a id="af12001920ca2fc1405615684e4dea284"></a> |
universe@390 | 178 | <h2 class="memtitle"><span class="permalink"><a href="#af12001920ca2fc1405615684e4dea284">◆ </a></span>UCX_VERSION</h2> |
universe@390 | 179 | |
universe@390 | 180 | <div class="memitem"> |
universe@390 | 181 | <div class="memproto"> |
universe@390 | 182 | <table class="memname"> |
universe@390 | 183 | <tr> |
universe@390 | 184 | <td class="memname">#define UCX_VERSION   (((<a class="el" href="ucx_8h.html#aa57e5dd22d42387d748cc16777df1383">UCX_VERSION_MAJOR</a>)<<16)|<a class="el" href="ucx_8h.html#a9ac10d6353e23d4615a87fc737c65eb0">UCX_VERSION_MINOR</a>)</td> |
universe@390 | 185 | </tr> |
universe@390 | 186 | </table> |
universe@390 | 187 | </div><div class="memdoc"> |
universe@390 | 188 | |
universe@390 | 189 | <p>Version constant which ensures to increase monotonically. </p> |
universe@390 | 190 | |
universe@390 | 191 | </div> |
universe@390 | 192 | </div> |
universe@390 | 193 | <a id="aa57e5dd22d42387d748cc16777df1383"></a> |
universe@390 | 194 | <h2 class="memtitle"><span class="permalink"><a href="#aa57e5dd22d42387d748cc16777df1383">◆ </a></span>UCX_VERSION_MAJOR</h2> |
universe@390 | 195 | |
universe@390 | 196 | <div class="memitem"> |
universe@390 | 197 | <div class="memproto"> |
universe@390 | 198 | <table class="memname"> |
universe@390 | 199 | <tr> |
universe@390 | 200 | <td class="memname">#define UCX_VERSION_MAJOR   2</td> |
universe@390 | 201 | </tr> |
universe@390 | 202 | </table> |
universe@390 | 203 | </div><div class="memdoc"> |
universe@390 | 204 | |
universe@390 | 205 | <p>Major UCX version as integer constant. </p> |
universe@390 | 206 | |
universe@390 | 207 | </div> |
universe@390 | 208 | </div> |
universe@390 | 209 | <a id="a9ac10d6353e23d4615a87fc737c65eb0"></a> |
universe@390 | 210 | <h2 class="memtitle"><span class="permalink"><a href="#a9ac10d6353e23d4615a87fc737c65eb0">◆ </a></span>UCX_VERSION_MINOR</h2> |
universe@390 | 211 | |
universe@390 | 212 | <div class="memitem"> |
universe@390 | 213 | <div class="memproto"> |
universe@390 | 214 | <table class="memname"> |
universe@390 | 215 | <tr> |
universe@390 | 216 | <td class="memname">#define UCX_VERSION_MINOR   1</td> |
universe@390 | 217 | </tr> |
universe@390 | 218 | </table> |
universe@390 | 219 | </div><div class="memdoc"> |
universe@390 | 220 | |
universe@390 | 221 | <p>Minor UCX version as integer constant. </p> |
universe@390 | 222 | |
universe@390 | 223 | </div> |
universe@390 | 224 | </div> |
universe@390 | 225 | <h2 class="groupheader">Typedef Documentation</h2> |
universe@390 | 226 | <a id="afe5e2d5dbf34778e0e97852051570791"></a> |
universe@390 | 227 | <h2 class="memtitle"><span class="permalink"><a href="#afe5e2d5dbf34778e0e97852051570791">◆ </a></span>cmp_func</h2> |
universe@390 | 228 | |
universe@390 | 229 | <div class="memitem"> |
universe@390 | 230 | <div class="memproto"> |
universe@390 | 231 | <table class="memname"> |
universe@390 | 232 | <tr> |
universe@390 | 233 | <td class="memname">typedef int(* cmp_func) (const void *, const void *, void *)</td> |
universe@390 | 234 | </tr> |
universe@390 | 235 | </table> |
universe@390 | 236 | </div><div class="memdoc"> |
universe@390 | 237 | |
universe@390 | 238 | <p>Function pointer to a compare function. </p> |
universe@390 | 239 | <p>The compare function shall take three arguments: the two values that shall be compared and optional additional data. The function shall then return -1 if the first argument is less than the second argument, 1 if the first argument is greater than the second argument and 0 if both arguments are equal. If the third argument is <code>NULL</code>, it shall be ignored. </p> |
universe@390 | 240 | |
universe@390 | 241 | </div> |
universe@390 | 242 | </div> |
universe@390 | 243 | <a id="aab917a5fe0965673c73e8ebd0a1fc967"></a> |
universe@390 | 244 | <h2 class="memtitle"><span class="permalink"><a href="#aab917a5fe0965673c73e8ebd0a1fc967">◆ </a></span>copy_func</h2> |
universe@390 | 245 | |
universe@390 | 246 | <div class="memitem"> |
universe@390 | 247 | <div class="memproto"> |
universe@390 | 248 | <table class="memname"> |
universe@390 | 249 | <tr> |
universe@390 | 250 | <td class="memname">typedef void*(* copy_func) (const void *, void *)</td> |
universe@390 | 251 | </tr> |
universe@390 | 252 | </table> |
universe@390 | 253 | </div><div class="memdoc"> |
universe@390 | 254 | |
universe@390 | 255 | <p>Function pointer to a copy function. </p> |
universe@390 | 256 | <p>The copy function shall create a copy of the first argument and may use additional data provided by the second argument. If the second argument is <code>NULL</code>, it shall be ignored.</p> |
universe@390 | 257 | <p><b>Attention:</b> if pointers returned by functions of this type may be passed to <code>free()</code> depends on the implementation of the respective <code>copy_func</code>. </p> |
universe@390 | 258 | |
universe@390 | 259 | </div> |
universe@390 | 260 | </div> |
universe@390 | 261 | <a id="a0bc5bf89e556c1d45d10863d52728ac9"></a> |
universe@390 | 262 | <h2 class="memtitle"><span class="permalink"><a href="#a0bc5bf89e556c1d45d10863d52728ac9">◆ </a></span>distance_func</h2> |
universe@390 | 263 | |
universe@390 | 264 | <div class="memitem"> |
universe@390 | 265 | <div class="memproto"> |
universe@390 | 266 | <table class="memname"> |
universe@390 | 267 | <tr> |
universe@390 | 268 | <td class="memname">typedef intmax_t(* distance_func) (const void *, const void *, void *)</td> |
universe@390 | 269 | </tr> |
universe@390 | 270 | </table> |
universe@390 | 271 | </div><div class="memdoc"> |
universe@390 | 272 | |
universe@390 | 273 | <p>Function pointer to a distance function. </p> |
universe@390 | 274 | <p>The distance function shall take three arguments: the two values for which the distance shall be computed and optional additional data. The function shall then return the signed distance as integer value. </p> |
universe@390 | 275 | |
universe@390 | 276 | </div> |
universe@390 | 277 | </div> |
universe@390 | 278 | <a id="a6a67e255e460acb58f802067b3ff5fd5"></a> |
universe@390 | 279 | <h2 class="memtitle"><span class="permalink"><a href="#a6a67e255e460acb58f802067b3ff5fd5">◆ </a></span>read_func</h2> |
universe@390 | 280 | |
universe@390 | 281 | <div class="memitem"> |
universe@390 | 282 | <div class="memproto"> |
universe@390 | 283 | <table class="memname"> |
universe@390 | 284 | <tr> |
universe@390 | 285 | <td class="memname">typedef size_t(* read_func) (void *, size_t, size_t, void *)</td> |
universe@390 | 286 | </tr> |
universe@390 | 287 | </table> |
universe@390 | 288 | </div><div class="memdoc"> |
universe@390 | 289 | |
universe@390 | 290 | <p>Function pointer to a read function. </p> |
universe@390 | 291 | <p>The signature of the read function shall be compatible to the signature of standard <code>fread</code>, though it may use arbitrary data types for source and destination.</p> |
universe@390 | 292 | <p>The arguments shall contain (in ascending order): a pointer to the destination, the length of one element, the element count and a pointer to the source. </p> |
universe@390 | 293 | |
universe@390 | 294 | </div> |
universe@390 | 295 | </div> |
universe@390 | 296 | <a id="ad2b370c2809914c8b7fedab163c266b3"></a> |
universe@390 | 297 | <h2 class="memtitle"><span class="permalink"><a href="#ad2b370c2809914c8b7fedab163c266b3">◆ </a></span>ucx_destructor</h2> |
universe@390 | 298 | |
universe@390 | 299 | <div class="memitem"> |
universe@390 | 300 | <div class="memproto"> |
universe@390 | 301 | <table class="memname"> |
universe@390 | 302 | <tr> |
universe@390 | 303 | <td class="memname">typedef void(* ucx_destructor) (void *)</td> |
universe@390 | 304 | </tr> |
universe@390 | 305 | </table> |
universe@390 | 306 | </div><div class="memdoc"> |
universe@390 | 307 | |
universe@390 | 308 | <p>A function pointer to a destructor function. </p> |
universe@390 | 309 | <dl class="section see"><dt>See also</dt><dd>ucx_mempool_setdestr() </dd> |
universe@390 | 310 | <dd> |
universe@390 | 311 | ucx_mempool_regdestr() </dd></dl> |
universe@390 | 312 | |
universe@390 | 313 | </div> |
universe@390 | 314 | </div> |
universe@390 | 315 | <a id="a989b3f0fa4d307d278378fde435641ed"></a> |
universe@390 | 316 | <h2 class="memtitle"><span class="permalink"><a href="#a989b3f0fa4d307d278378fde435641ed">◆ </a></span>write_func</h2> |
universe@390 | 317 | |
universe@390 | 318 | <div class="memitem"> |
universe@390 | 319 | <div class="memproto"> |
universe@390 | 320 | <table class="memname"> |
universe@390 | 321 | <tr> |
universe@390 | 322 | <td class="memname">typedef size_t(* write_func) (const void *, size_t, size_t, void *)</td> |
universe@390 | 323 | </tr> |
universe@390 | 324 | </table> |
universe@390 | 325 | </div><div class="memdoc"> |
universe@390 | 326 | |
universe@390 | 327 | <p>Function pointer to a write function. </p> |
universe@390 | 328 | <p>The signature of the write function shall be compatible to the signature of standard <code>fwrite</code>, though it may use arbitrary data types for source and destination.</p> |
universe@390 | 329 | <p>The arguments shall contain (in ascending order): a pointer to the source, the length of one element, the element count and a pointer to the destination. </p> |
universe@390 | 330 | |
universe@390 | 331 | </div> |
universe@390 | 332 | </div> |
universe@390 | 333 | <h2 class="groupheader">Function Documentation</h2> |
universe@390 | 334 | <a id="a6637171cc0ec097b297f731a3036dd3b"></a> |
universe@390 | 335 | <h2 class="memtitle"><span class="permalink"><a href="#a6637171cc0ec097b297f731a3036dd3b">◆ </a></span>ucx_szmul_impl()</h2> |
universe@390 | 336 | |
universe@390 | 337 | <div class="memitem"> |
universe@390 | 338 | <div class="memproto"> |
universe@390 | 339 | <table class="memname"> |
universe@390 | 340 | <tr> |
universe@390 | 341 | <td class="memname">int ucx_szmul_impl </td> |
universe@390 | 342 | <td>(</td> |
universe@390 | 343 | <td class="paramtype">size_t </td> |
universe@390 | 344 | <td class="paramname"><em>a</em>, </td> |
universe@390 | 345 | </tr> |
universe@390 | 346 | <tr> |
universe@390 | 347 | <td class="paramkey"></td> |
universe@390 | 348 | <td></td> |
universe@390 | 349 | <td class="paramtype">size_t </td> |
universe@390 | 350 | <td class="paramname"><em>b</em>, </td> |
universe@390 | 351 | </tr> |
universe@390 | 352 | <tr> |
universe@390 | 353 | <td class="paramkey"></td> |
universe@390 | 354 | <td></td> |
universe@390 | 355 | <td class="paramtype">size_t * </td> |
universe@390 | 356 | <td class="paramname"><em>result</em> </td> |
universe@390 | 357 | </tr> |
universe@390 | 358 | <tr> |
universe@390 | 359 | <td></td> |
universe@390 | 360 | <td>)</td> |
universe@390 | 361 | <td></td><td></td> |
universe@390 | 362 | </tr> |
universe@390 | 363 | </table> |
universe@390 | 364 | </div><div class="memdoc"> |
universe@390 | 365 | |
universe@390 | 366 | <p>Performs a multiplication of size_t values and checks for overflow. </p> |
universe@390 | 367 | <p>This is a custom implementation in case there is no compiler builtin available.</p> |
universe@390 | 368 | <dl class="params"><dt>Parameters</dt><dd> |
universe@390 | 369 | <table class="params"> |
universe@390 | 370 | <tr><td class="paramname">a</td><td>first operand </td></tr> |
universe@390 | 371 | <tr><td class="paramname">b</td><td>second operand </td></tr> |
universe@390 | 372 | <tr><td class="paramname">result</td><td>a pointer to a size_t where the result should be stored </td></tr> |
universe@390 | 373 | </table> |
universe@390 | 374 | </dd> |
universe@390 | 375 | </dl> |
universe@390 | 376 | <dl class="section return"><dt>Returns</dt><dd>zero, if no overflow occurred and the result is correct, non-zero otherwise </dd></dl> |
universe@390 | 377 | |
universe@390 | 378 | </div> |
universe@390 | 379 | </div> |
universe@390 | 380 | </div><!-- contents --> |
universe@390 | 381 | <!-- start footer part --> |
universe@390 | 382 | <hr class="footer"/><address class="footer"><small> |
universe@390 | 383 | Generated on Thu Dec 19 2019 19:58:24 for ucx by  <a href="http://www.doxygen.org/index.html"> |
universe@390 | 384 | <img class="footer" src="doxygen.png" alt="doxygen"/> |
universe@390 | 385 | </a> 1.8.13 |
universe@390 | 386 | </small></address> |
universe@390 | 387 | </body> |
universe@390 | 388 | </html> |