blob: 9c206d46bd3b31eef1786e0d243e0355c5d302d5 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>mxnet: /work/mxnet/3rdparty/dmlc-core/include/dmlc/data.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/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></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">mxnet
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></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_8cab8f464681f7cc51cee77e79a434cd.html">3rdparty</a></li><li class="navelem"><a class="el" href="dir_82e31a22178767beedddc7597fd1ecb6.html">dmlc-core</a></li><li class="navelem"><a class="el" href="dir_7dd5b88db83ff474628c03c453739a90.html">include</a></li><li class="navelem"><a class="el" href="dir_e30967e3ab51f65ad4b50dd298ccf4e7.html">dmlc</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> </div>
<div class="headertitle">
<div class="title">data.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>defines common input data structure, and interface for handling the input data
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;string&gt;</code><br />
<code>#include &lt;vector&gt;</code><br />
<code>#include &lt;map&gt;</code><br />
<code>#include &quot;<a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2base_8h_source.html">./base.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2io_8h_source.html">./io.h</a>&quot;</code><br />
<code>#include &quot;./logging.h&quot;</code><br />
<code>#include &quot;<a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h_source.html">./registry.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for data.h:</div>
<div class="dyncontent">
<div class="center"><img src="data_8h__incl.png" border="0" usemap="#_2work_2mxnet_23rdparty_2dmlc-core_2include_2dmlc_2data_8h" alt=""/></div>
<!-- MAP 0 -->
</div>
</div><div class="textblock"><div class="dynheader">
This graph shows which files directly or indirectly include this file:</div>
<div class="dyncontent">
<div class="center"><img src="data_8h__dep__incl.png" border="0" usemap="#_2work_2mxnet_23rdparty_2dmlc-core_2include_2dmlc_2data_8hdep" alt=""/></div>
<!-- MAP 1 -->
</div>
</div>
<p><a href="data_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="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1DataIter.html">dmlc::DataIter&lt; DType &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">data iterator interface this is not a C++ style iterator, but nice for data pulling:) This interface is used to pull in the data The system can do some useful tricks for you like pre-fetching from disk and pre-computation. <a href="classdmlc_1_1DataIter.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1Row.html">dmlc::Row&lt; IndexType, DType &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">one row of training instance <a href="classdmlc_1_1Row.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdmlc_1_1RowBlock.html">dmlc::RowBlock&lt; IndexType, DType &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">a block of data, containing several rows in sparse matrix This is useful for (streaming-sxtyle) algorithms that scans through rows of data examples include: SGD, GD, L-BFGS, kmeans <a href="structdmlc_1_1RowBlock.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1RowBlockIter.html">dmlc::RowBlockIter&lt; IndexType, DType &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data structure that holds the data <a class="el" href="classdmlc_1_1Row.html" title="one row of training instance">Row</a> block iterator interface that gets RowBlocks Difference between <a class="el" href="classdmlc_1_1RowBlockIter.html" title="Data structure that holds the data Row block iterator interface that gets RowBlocks Difference betwee...">RowBlockIter</a> and <a class="el" href="classdmlc_1_1Parser.html" title="parser interface that parses input data used to load dmlc data format into your own data format Diffe...">Parser</a>: <a class="el" href="classdmlc_1_1RowBlockIter.html" title="Data structure that holds the data Row block iterator interface that gets RowBlocks Difference betwee...">RowBlockIter</a> caches the data internally that can be used to iterate the dataset multiple times, <a class="el" href="classdmlc_1_1Parser.html" title="parser interface that parses input data used to load dmlc data format into your own data format Diffe...">Parser</a> holds very limited internal state and was usually used to read data only once. <a href="classdmlc_1_1RowBlockIter.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1Parser.html">dmlc::Parser&lt; IndexType, DType &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">parser interface that parses input data used to load dmlc data format into your own data format Difference between <a class="el" href="classdmlc_1_1RowBlockIter.html" title="Data structure that holds the data Row block iterator interface that gets RowBlocks Difference betwee...">RowBlockIter</a> and <a class="el" href="classdmlc_1_1Parser.html" title="parser interface that parses input data used to load dmlc data format into your own data format Diffe...">Parser</a>: <a class="el" href="classdmlc_1_1RowBlockIter.html" title="Data structure that holds the data Row block iterator interface that gets RowBlocks Difference betwee...">RowBlockIter</a> caches the data internally that can be used to iterate the dataset multiple times, <a class="el" href="classdmlc_1_1Parser.html" title="parser interface that parses input data used to load dmlc data format into your own data format Diffe...">Parser</a> holds very limited internal state and was usually used to read data only once <a href="classdmlc_1_1Parser.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structdmlc_1_1ParserFactoryReg.html">dmlc::ParserFactoryReg&lt; IndexType, DType &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">registry entry of parser factory <a href="structdmlc_1_1ParserFactoryReg.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr class="memitem:namespacedmlc"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacedmlc.html">dmlc</a></td></tr>
<tr class="memdesc:namespacedmlc"><td class="mdescLeft">&#160;</td><td class="mdescRight">namespace for dmlc <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a5b1cc6161f39c0f11f6a871eed6b018b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="data_8h.html#a5b1cc6161f39c0f11f6a871eed6b018b">__DMLC_COMMA</a>&#160;&#160;&#160;,</td></tr>
<tr class="separator:a5b1cc6161f39c0f11f6a871eed6b018b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a817ab5e00a100e40e3bf9dba7d23ddd2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="data_8h.html#a817ab5e00a100e40e3bf9dba7d23ddd2">DMLC_REGISTER_DATA_PARSER</a>(IndexType, DataType, TypeName, FactoryFunction)</td></tr>
<tr class="memdesc:a817ab5e00a100e40e3bf9dba7d23ddd2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register a new distributed parser to dmlc-core. <a href="data_8h.html#a817ab5e00a100e40e3bf9dba7d23ddd2">More...</a><br /></td></tr>
<tr class="separator:a817ab5e00a100e40e3bf9dba7d23ddd2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ab23d78846b42ebd3a436e3bc295b73f4"><td class="memItemLeft" align="right" valign="top">typedef float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacedmlc.html#ab23d78846b42ebd3a436e3bc295b73f4">dmlc::real_t</a></td></tr>
<tr class="memdesc:ab23d78846b42ebd3a436e3bc295b73f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">this defines the float point that will be used to store feature values <a href="namespacedmlc.html#ab23d78846b42ebd3a436e3bc295b73f4">More...</a><br /></td></tr>
<tr class="separator:ab23d78846b42ebd3a436e3bc295b73f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a89c6e0909617034aa818dafe83a361"><td class="memItemLeft" align="right" valign="top">typedef unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacedmlc.html#a7a89c6e0909617034aa818dafe83a361">dmlc::index_t</a></td></tr>
<tr class="memdesc:a7a89c6e0909617034aa818dafe83a361"><td class="mdescLeft">&#160;</td><td class="mdescRight">this defines the unsigned integer type that can normally be used to store feature index <a href="namespacedmlc.html#a7a89c6e0909617034aa818dafe83a361">More...</a><br /></td></tr>
<tr class="separator:a7a89c6e0909617034aa818dafe83a361"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>defines common input data structure, and interface for handling the input data </p>
<p>Copyright (c) 2015 by Contributors </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a5b1cc6161f39c0f11f6a871eed6b018b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b1cc6161f39c0f11f6a871eed6b018b">&#9670;&nbsp;</a></span>__DMLC_COMMA</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define __DMLC_COMMA&#160;&#160;&#160;,</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a817ab5e00a100e40e3bf9dba7d23ddd2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a817ab5e00a100e40e3bf9dba7d23ddd2">&#9670;&nbsp;</a></span>DMLC_REGISTER_DATA_PARSER</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define DMLC_REGISTER_DATA_PARSER</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">IndexType, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">DataType, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">TypeName, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">FactoryFunction&#160;</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"> <a class="code" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#af6870c3bce5b56d427a4d225b1194816">DMLC_REGISTRY_REGISTER</a>(ParserFactoryReg&lt;IndexType __DMLC_COMMA DataType&gt;, \</div>
<div class="line"> ParserFactoryReg ## _ ## IndexType ## _ ## DataType, TypeName) \</div>
<div class="line"> .set_body(FactoryFunction)</div>
</div><!-- fragment -->
<p>Register a new distributed parser to dmlc-core. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">IndexType</td><td>The type of Batch index, can be uint32_t or uint64_t </td></tr>
<tr><td class="paramname">DataType</td><td>The type of Batch label and value, can be real_t or int </td></tr>
<tr><td class="paramname">TypeName</td><td>The typename of of the data. </td></tr>
<tr><td class="paramname">FactoryFunction</td><td>The factory function that creates the parser.</td></tr>
</table>
</dd>
</dl>
<p>\begincode</p>
<p>// define the factory function template&lt;typename IndexType, typename DType = real_t&gt; Parser&lt;IndexType, DType&gt;* CreateLibSVMParser(const char* uri, unsigned part_index, unsigned num_parts) { return new LibSVMParser(uri, part_index, num_parts); }</p>
<p>// Register it to DMLC // Then we can use Parser&lt;uint32_t&gt;::Create(uri, part_index, num_parts, "libsvm"); // to create the parser</p>
<p><a class="el" href="data_8h.html#a817ab5e00a100e40e3bf9dba7d23ddd2" title="Register a new distributed parser to dmlc-core.">DMLC_REGISTER_DATA_PARSER(uint32_t, real_t, libsvm, CreateLibSVMParser&lt;uint32_t&gt;)</a>; <a class="el" href="data_8h.html#a817ab5e00a100e40e3bf9dba7d23ddd2" title="Register a new distributed parser to dmlc-core.">DMLC_REGISTER_DATA_PARSER(uint64_t, real_t, libsvm, CreateLibSVMParser&lt;uint64_t&gt;)</a>;</p>
</div>
</div>
</div><!-- contents -->
<div class="ttc" id="a3rdparty_2dmlc-core_2include_2dmlc_2registry_8h_html_af6870c3bce5b56d427a4d225b1194816"><div class="ttname"><a href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#af6870c3bce5b56d427a4d225b1194816">DMLC_REGISTRY_REGISTER</a></div><div class="ttdeci">#define DMLC_REGISTRY_REGISTER(EntryType, EntryTypeName, Name)</div><div class="ttdoc">Generic macro to register an EntryType There is a complete example in FactoryRegistryEntryBase.</div><div class="ttdef"><b>Definition:</b> registry.h:250</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jan 5 2023 03:47:40 for mxnet by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>