| <!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.13"/> |
| <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.13 --> |
| <script type="text/javascript"> |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| </script> |
| <script type="text/javascript" src="menudata.js"></script> |
| <script type="text/javascript" src="menu.js"></script> |
| <script type="text/javascript"> |
| $(function() { |
| initMenu('',true,false,'search.php','Search'); |
| $(document).ready(function() { init_search(); }); |
| }); |
| </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> | |
| <a href="#namespaces">Namespaces</a> | |
| <a href="#define-members">Macros</a> | |
| <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 <string></code><br /> |
| <code>#include <vector></code><br /> |
| <code>#include <map></code><br /> |
| <code>#include "<a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2base_8h_source.html">./base.h</a>"</code><br /> |
| <code>#include "<a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2io_8h_source.html">./io.h</a>"</code><br /> |
| <code>#include "./logging.h"</code><br /> |
| <code>#include "<a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h_source.html">./registry.h</a>"</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 name="_2work_2mxnet_23rdparty_2dmlc-core_2include_2dmlc_2data_8h" id="_2work_2mxnet_23rdparty_2dmlc-core_2include_2dmlc_2data_8h"> |
| <area shape="rect" id="node5" href="3rdparty_2dmlc-core_2include_2dmlc_2base_8h.html" title="./base.h" alt="" coords="1562,408,1635,435"/> |
| <area shape="rect" id="node9" href="3rdparty_2dmlc-core_2include_2dmlc_2io_8h.html" title="./io.h" alt="" coords="481,184,535,211"/> |
| <area shape="rect" id="node26" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html" title="./registry.h" alt="" coords="1841,109,1932,136"/> |
| <area shape="rect" id="node8" href="build__config__default_8h.html" title="Default detection logic for fopen64 and other symbols. May be overriden by CMake. ..." alt="" coords="1411,483,1613,509"/> |
| <area shape="rect" id="node16" href="serializer_8h.html" title="serializer template class that helps serialization. This file do not need to be directly used by most..." alt="" coords="1251,259,1352,285"/> |
| <area shape="rect" id="node21" href="type__traits_8h.html" title="type traits information header " alt="" coords="2439,333,2551,360"/> |
| <area shape="rect" id="node23" href="endian_8h.html" title="Endian testing, need c++11. " alt="" coords="1177,333,1263,360"/> |
| <area shape="rect" id="node27" href="parameter_8h.html" title="Provide lightweight util to do parameter setup and checking. " alt="" coords="2507,184,2616,211"/> |
| <area shape="rect" id="node39" href="json_8h.html" title="Lightweight JSON Reader/Writer that read save into C++ data structs. This includes STL composites and..." alt="" coords="2303,259,2372,285"/> |
| <area shape="rect" id="node42" href="optional_8h.html" title="Container to hold optional data. " alt="" coords="2973,259,3067,285"/> |
| <area shape="rect" id="node45" href="strtonum_8h.html" title="A faster implementation of strtof and strtod. " alt="" coords="3417,333,3519,360"/> |
| <area shape="rect" id="node43" href="common_8h.html" title="defines some common utility function. " alt="" coords="3143,333,3241,360"/> |
| </map> |
| </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 name="_2work_2mxnet_23rdparty_2dmlc-core_2include_2dmlc_2data_8hdep" id="_2work_2mxnet_23rdparty_2dmlc-core_2include_2dmlc_2data_8hdep"> |
| <area shape="rect" id="node2" href="threadediter_8h.html" title="thread backed iterator that can be used to implement general thread-based pipeline such as prefetch a..." alt="" coords="5,109,184,165"/> |
| <area shape="rect" id="node3" href="include_2mxnet_2io_8h.html" title="/work/mxnet/include\l/mxnet/io.h" alt="" coords="208,117,363,158"/> |
| </map> |
| </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  </td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1DataIter.html">dmlc::DataIter< DType ></a></td></tr> |
| <tr class="memdesc:"><td class="mdescLeft"> </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"> </td></tr> |
| <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1Row.html">dmlc::Row< IndexType, DType ></a></td></tr> |
| <tr class="memdesc:"><td class="mdescLeft"> </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"> </td></tr> |
| <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structdmlc_1_1RowBlock.html">dmlc::RowBlock< IndexType, DType ></a></td></tr> |
| <tr class="memdesc:"><td class="mdescLeft"> </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"> </td></tr> |
| <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1RowBlockIter.html">dmlc::RowBlockIter< IndexType, DType ></a></td></tr> |
| <tr class="memdesc:"><td class="mdescLeft"> </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"> </td></tr> |
| <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classdmlc_1_1Parser.html">dmlc::Parser< IndexType, DType ></a></td></tr> |
| <tr class="memdesc:"><td class="mdescLeft"> </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"> </td></tr> |
| <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structdmlc_1_1ParserFactoryReg.html">dmlc::ParserFactoryReg< IndexType, DType ></a></td></tr> |
| <tr class="memdesc:"><td class="mdescLeft"> </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"> </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">  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacedmlc.html">dmlc</a></td></tr> |
| <tr class="memdesc:namespacedmlc"><td class="mdescLeft"> </td><td class="mdescRight">namespace for dmlc <br /></td></tr> |
| <tr class="separator:"><td class="memSeparator" colspan="2"> </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 </td><td class="memItemRight" valign="bottom"><a class="el" href="data_8h.html#a5b1cc6161f39c0f11f6a871eed6b018b">__DMLC_COMMA</a>   ,</td></tr> |
| <tr class="separator:a5b1cc6161f39c0f11f6a871eed6b018b"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a817ab5e00a100e40e3bf9dba7d23ddd2"><td class="memItemLeft" align="right" valign="top">#define </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"> </td><td class="mdescRight">Register a new distributed parser to dmlc-core. <a href="#a817ab5e00a100e40e3bf9dba7d23ddd2">More...</a><br /></td></tr> |
| <tr class="separator:a817ab5e00a100e40e3bf9dba7d23ddd2"><td class="memSeparator" colspan="2"> </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 </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"> </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"> </td></tr> |
| <tr class="memitem:a7a89c6e0909617034aa818dafe83a361"><td class="memItemLeft" align="right" valign="top">typedef unsigned </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"> </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"> </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">◆ </a></span>__DMLC_COMMA</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">#define __DMLC_COMMA   ,</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="a817ab5e00a100e40e3bf9dba7d23ddd2"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a817ab5e00a100e40e3bf9dba7d23ddd2">◆ </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"> </td> |
| <td class="paramname">IndexType, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype"> </td> |
| <td class="paramname">DataType, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype"> </td> |
| <td class="paramname">TypeName, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype"> </td> |
| <td class="paramname">FactoryFunction </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<IndexType __DMLC_COMMA DataType>, \</div><div class="line"> ParserFactoryReg ## _ ## IndexType ## _ ## DataType, TypeName) \</div><div class="line"> .set_body(FactoryFunction)</div><div class="ttc" id="3rdparty_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> |
| </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>// define the factory function template<typename IndexType, typename DType = real_t> Parser<IndexType, DType>* 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<uint32_t>::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<uint32_t>)</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<uint64_t>)</a>;</p> |
| |
| </div> |
| </div> |
| </div><!-- contents --> |
| <!-- start footer part --> |
| <hr class="footer"/><address class="footer"><small> |
| Generated on Wed Jun 8 2022 23:30:29 for mxnet by  <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/> |
| </a> 1.8.13 |
| </small></address> |
| </body> |
| </html> |