blob: 889d1f052d6121247f53aa40c56c8e799711df14 [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: dmlc::Parser&lt; IndexType, DType &gt; Class Template 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="namespacedmlc.html">dmlc</a></li><li class="navelem"><a class="el" href="classdmlc_1_1Parser.html">Parser</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classdmlc_1_1Parser-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">dmlc::Parser&lt; IndexType, DType &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>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></p>
<p><code>#include &lt;<a class="el" href="data_8h_source.html">data.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for dmlc::Parser&lt; IndexType, DType &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="classdmlc_1_1Parser__inherit__graph.png" border="0" usemap="#dmlc_1_1Parser_3_01IndexType_00_01DType_01_4_inherit__map" alt="Inheritance graph"/></div>
<!-- MAP 0 -->
</div>
<div class="dynheader">
Collaboration diagram for dmlc::Parser&lt; IndexType, DType &gt;:</div>
<div class="dyncontent">
<div class="center"><img src="classdmlc_1_1Parser__coll__graph.png" border="0" usemap="#dmlc_1_1Parser_3_01IndexType_00_01DType_01_4_coll__map" alt="Collaboration graph"/></div>
<!-- MAP 1 -->
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aacf539079f2aab0d75c6dad286d7653e"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="classdmlc_1_1Parser.html">Parser</a>&lt; IndexType, DType &gt; *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1Parser.html#aacf539079f2aab0d75c6dad286d7653e">Factory</a>) (const std::string &amp;path, const std::map&lt; std::string, std::string &gt; &amp;args, unsigned part_index, unsigned num_parts)</td></tr>
<tr class="memdesc:aacf539079f2aab0d75c6dad286d7653e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Factory type of the parser. <a href="classdmlc_1_1Parser.html#aacf539079f2aab0d75c6dad286d7653e">More...</a><br /></td></tr>
<tr class="separator:aacf539079f2aab0d75c6dad286d7653e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab1502841c20f75244aa21618c01112ee"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1Parser.html#ab1502841c20f75244aa21618c01112ee">BytesRead</a> (void) const =0</td></tr>
<tr class="separator:ab1502841c20f75244aa21618c01112ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classdmlc_1_1DataIter"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classdmlc_1_1DataIter')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classdmlc_1_1DataIter.html">dmlc::DataIter&lt; RowBlock&lt; IndexType, real_t &gt; &gt;</a></td></tr>
<tr class="memitem:aef4acbc5a49dd71edb360149a2b19ee2 inherit pub_methods_classdmlc_1_1DataIter"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1DataIter.html#aef4acbc5a49dd71edb360149a2b19ee2">~DataIter</a> (void) <a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2base_8h.html#a80bde16113dc79e7adb7953e006d6b60">DMLC_THROW_EXCEPTION</a></td></tr>
<tr class="memdesc:aef4acbc5a49dd71edb360149a2b19ee2 inherit pub_methods_classdmlc_1_1DataIter"><td class="mdescLeft">&#160;</td><td class="mdescRight">destructor <a href="classdmlc_1_1DataIter.html#aef4acbc5a49dd71edb360149a2b19ee2">More...</a><br /></td></tr>
<tr class="separator:aef4acbc5a49dd71edb360149a2b19ee2 inherit pub_methods_classdmlc_1_1DataIter"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77735f53af4bb7490009315607ab9135 inherit pub_methods_classdmlc_1_1DataIter"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1DataIter.html#a77735f53af4bb7490009315607ab9135">BeforeFirst</a> (void)=0</td></tr>
<tr class="memdesc:a77735f53af4bb7490009315607ab9135 inherit pub_methods_classdmlc_1_1DataIter"><td class="mdescLeft">&#160;</td><td class="mdescRight">set before first of the item <a href="classdmlc_1_1DataIter.html#a77735f53af4bb7490009315607ab9135">More...</a><br /></td></tr>
<tr class="separator:a77735f53af4bb7490009315607ab9135 inherit pub_methods_classdmlc_1_1DataIter"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f07f4d4f87485d1de4b6ba1af4d7b5b inherit pub_methods_classdmlc_1_1DataIter"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1DataIter.html#a1f07f4d4f87485d1de4b6ba1af4d7b5b">Next</a> (void)=0</td></tr>
<tr class="memdesc:a1f07f4d4f87485d1de4b6ba1af4d7b5b inherit pub_methods_classdmlc_1_1DataIter"><td class="mdescLeft">&#160;</td><td class="mdescRight">move to next item <a href="classdmlc_1_1DataIter.html#a1f07f4d4f87485d1de4b6ba1af4d7b5b">More...</a><br /></td></tr>
<tr class="separator:a1f07f4d4f87485d1de4b6ba1af4d7b5b inherit pub_methods_classdmlc_1_1DataIter"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2695f02f824a515b60d4fb0af6c4e6d6 inherit pub_methods_classdmlc_1_1DataIter"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="structdmlc_1_1RowBlock.html">RowBlock</a>&lt; IndexType, <a class="el" href="namespacedmlc.html#ab23d78846b42ebd3a436e3bc295b73f4">real_t</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1DataIter.html#a2695f02f824a515b60d4fb0af6c4e6d6">Value</a> (void) const=0</td></tr>
<tr class="memdesc:a2695f02f824a515b60d4fb0af6c4e6d6 inherit pub_methods_classdmlc_1_1DataIter"><td class="mdescLeft">&#160;</td><td class="mdescRight">get current data <a href="classdmlc_1_1DataIter.html#a2695f02f824a515b60d4fb0af6c4e6d6">More...</a><br /></td></tr>
<tr class="separator:a2695f02f824a515b60d4fb0af6c4e6d6 inherit pub_methods_classdmlc_1_1DataIter"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a795cd4f65273bd4612a32bd4a2797a34"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classdmlc_1_1Parser.html">Parser</a>&lt; IndexType, DType &gt; *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1Parser.html#a795cd4f65273bd4612a32bd4a2797a34">Create</a> (const char *uri_, unsigned part_index, unsigned num_parts, const char *type)</td></tr>
<tr class="memdesc:a795cd4f65273bd4612a32bd4a2797a34"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a new instance of parser based on the "type" <a href="classdmlc_1_1Parser.html#a795cd4f65273bd4612a32bd4a2797a34">More...</a><br /></td></tr>
<tr class="separator:a795cd4f65273bd4612a32bd4a2797a34"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename IndexType, typename DType = real_t&gt;<br />
class dmlc::Parser&lt; IndexType, DType &gt;</h3>
<p>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 </p>
<dl class="section see"><dt>See also</dt><dd><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> </dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">IndexType</td><td>type of index in <a class="el" href="structdmlc_1_1RowBlock.html" title="a block of data, containing several rows in sparse matrix This is useful for (streaming-sxtyle) algor...">RowBlock</a> </td></tr>
<tr><td class="paramname">DType</td><td>type of label and value in <a class="el" href="structdmlc_1_1RowBlock.html" title="a block of data, containing several rows in sparse matrix This is useful for (streaming-sxtyle) algor...">RowBlock</a> Create function was only implemented for IndexType uint64_t and uint32_t and DType real_t and int </td></tr>
</table>
</dd>
</dl>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="aacf539079f2aab0d75c6dad286d7653e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aacf539079f2aab0d75c6dad286d7653e">&#9670;&nbsp;</a></span>Factory</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename IndexType , typename DType = real_t&gt; </div>
<table class="memname">
<tr>
<td class="memname">typedef <a class="el" href="classdmlc_1_1Parser.html">Parser</a>&lt;IndexType, DType&gt;*(* <a class="el" href="classdmlc_1_1Parser.html">dmlc::Parser</a>&lt; IndexType, DType &gt;::Factory) (const std::string &amp;path, const std::map&lt; std::string, std::string &gt; &amp;args, unsigned part_index, unsigned num_parts)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Factory type of the parser. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ab1502841c20f75244aa21618c01112ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1502841c20f75244aa21618c01112ee">&#9670;&nbsp;</a></span>BytesRead()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename IndexType , typename DType = real_t&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual size_t <a class="el" href="classdmlc_1_1Parser.html">dmlc::Parser</a>&lt; IndexType, DType &gt;::BytesRead </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>size of bytes read so far </dd></dl>
</div>
</div>
<a id="a795cd4f65273bd4612a32bd4a2797a34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a795cd4f65273bd4612a32bd4a2797a34">&#9670;&nbsp;</a></span>Create()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename IndexType , typename DType = real_t&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classdmlc_1_1Parser.html">Parser</a>&lt;IndexType, DType&gt;* <a class="el" href="classdmlc_1_1Parser.html">dmlc::Parser</a>&lt; IndexType, DType &gt;::Create </td>
<td>(</td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>uri_</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&#160;</td>
<td class="paramname"><em>part_index</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&#160;</td>
<td class="paramname"><em>num_parts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>type</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>create a new instance of parser based on the "type" </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">uri_</td><td>the uri of the input, can contain hdfs prefix </td></tr>
<tr><td class="paramname">part_index</td><td>the part id of current input </td></tr>
<tr><td class="paramname">num_parts</td><td>total number of splits </td></tr>
<tr><td class="paramname">type</td><td>type of dataset can be: "libsvm", "auto", ...</td></tr>
</table>
</dd>
</dl>
<p>When "auto" is passed, the type is decided by format argument string in URI.</p>
<dl class="section return"><dt>Returns</dt><dd>the created parser </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/work/mxnet/3rdparty/dmlc-core/include/dmlc/<a class="el" href="data_8h_source.html">data.h</a></li>
</ul>
</div><!-- contents -->
<!-- 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>