blob: 37fa5eec75c7b117dad335ae2a490a82298594b8 [file] [log] [blame]
<!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/registry.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> &#124;
<a href="#namespaces">Namespaces</a> &#124;
<a href="#define-members">Macros</a> </div>
<div class="headertitle">
<div class="title">registry.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;map&gt;</code><br />
<code>#include &lt;string&gt;</code><br />
<code>#include &lt;vector&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;./logging.h&quot;</code><br />
<code>#include &quot;<a class="el" href="parameter_8h_source.html">./parameter.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="type__traits_8h_source.html">./type_traits.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for registry.h:</div>
<div class="dyncontent">
<div class="center"><img src="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h__incl.png" border="0" usemap="#_2work_2mxnet_23rdparty_2dmlc-core_2include_2dmlc_2registry_8h" alt=""/></div>
<map name="_2work_2mxnet_23rdparty_2dmlc-core_2include_2dmlc_2registry_8h" id="_2work_2mxnet_23rdparty_2dmlc-core_2include_2dmlc_2registry_8h">
<area shape="rect" id="node5" href="3rdparty_2dmlc-core_2include_2dmlc_2base_8h.html" title="./base.h" alt="" coords="1255,333,1329,360"/>
<area shape="rect" id="node10" href="parameter_8h.html" title="Provide lightweight util to do parameter setup and checking. " alt="" coords="1252,109,1361,136"/>
<area shape="rect" id="node27" href="type__traits_8h.html" title="type traits information header " alt="" coords="1037,259,1149,285"/>
<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="1191,408,1393,435"/>
<area shape="rect" id="node24" href="json_8h.html" title="Lightweight JSON Reader/Writer that read save into C++ data structs. This includes STL composites and..." alt="" coords="1149,184,1219,211"/>
<area shape="rect" id="node31" href="optional_8h.html" title="Container to hold optional data. " alt="" coords="553,184,647,211"/>
<area shape="rect" id="node34" href="strtonum_8h.html" title="A faster implementation of strtof and strtod. " alt="" coords="1743,259,1844,285"/>
<area shape="rect" id="node32" href="common_8h.html" title="defines some common utility function. " alt="" coords="499,259,597,285"/>
</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="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h__dep__incl.png" border="0" usemap="#_2work_2mxnet_23rdparty_2dmlc-core_2include_2dmlc_2registry_8hdep" alt=""/></div>
<map name="_2work_2mxnet_23rdparty_2dmlc-core_2include_2dmlc_2registry_8hdep" id="_2work_2mxnet_23rdparty_2dmlc-core_2include_2dmlc_2registry_8hdep">
<area shape="rect" id="node2" href="data_8h.html" title="defines common input data structure, and interface for handling the input data " alt="" coords="56,109,235,165"/>
<area shape="rect" id="node4" href="include_2mxnet_2io_8h.html" title="/work/mxnet/include\l/mxnet/io.h" alt="" coords="195,1113,349,1154"/>
<area shape="rect" id="node5" href="include_2mxnet_2ndarray_8h.html" title="/work/mxnet/include\l/mxnet/ndarray.h" alt="" coords="659,1016,813,1057"/>
<area shape="rect" id="node11" href="include_2mxnet_2operator_8h.html" title="/work/mxnet/include\l/mxnet/operator.h" alt="" coords="1501,1209,1656,1251"/>
<area shape="rect" id="node12" href="operator__util_8h.html" title="Utility functions and registries to help quickly build new operators. [Deprecated] Use the register f..." alt="" coords="1978,1299,2145,1340"/>
<area shape="rect" id="node18" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2base_8h.html" title="Configuration of nnvm as well as basic data structure. " alt="" coords="1289,109,1474,165"/>
<area shape="rect" id="node3" href="threadediter_8h.html" title="thread backed iterator that can be used to implement general thread&#45;based pipeline such as prefetch a..." alt="" coords="5,213,184,269"/>
<area shape="rect" id="node6" href="packed__func_8h.html" title="Type&#45;erased function used across MXNET API. " alt="" coords="430,1105,605,1161"/>
<area shape="rect" id="node9" href="include_2mxnet_2executor_8h.html" title="/work/mxnet/include\l/mxnet/executor.h" alt="" coords="645,1299,800,1340"/>
<area shape="rect" id="node10" href="include_2mxnet_2op__attr__types_8h.html" title="/work/mxnet/include\l/mxnet/op_attr_types.h" alt="" coords="1317,1113,1491,1154"/>
<area shape="rect" id="node14" href="imperative_8h.html" title="/work/mxnet/include\l/mxnet/imperative.h" alt="" coords="1731,1299,1885,1340"/>
<area shape="rect" id="node15" href="utils_8h.html" title="Basic utilility functions. " alt="" coords="1483,1388,1671,1429"/>
<area shape="rect" id="node17" href="include_2mxnet_2kvstore_8h.html" title="/work/mxnet/include\l/mxnet/kvstore.h" alt="" coords="760,1113,915,1154"/>
<area shape="rect" id="node7" href="include_2mxnet_2runtime_2registry_8h.html" title="/work/mxnet/include\l/mxnet/runtime/registry.h" alt="" coords="424,1209,611,1251"/>
<area shape="rect" id="node8" href="api__registry_8h.html" title="This file contains utilities related to the MXNet&#39;s global function registry. " alt="" coords="438,1299,597,1340"/>
<area shape="rect" id="node13" href="include_2mxnet_2graph__attr__types_8h.html" title="/work/mxnet/include\l/mxnet/graph_attr_types.h" alt="" coords="1181,1209,1376,1251"/>
<area shape="rect" id="node16" href="exec__utils_8h.html" title="Common utility functions for executors. " alt="" coords="1483,1477,1671,1519"/>
<area shape="rect" id="node19" href="graph_8h.html" title="Configuation of nnvm as well as basic data structure. " alt="" coords="1867,525,2053,581"/>
<area shape="rect" id="node28" href="pass_8h.html" title="Pass that can be applied to a graph. " alt="" coords="1053,629,1238,685"/>
<area shape="rect" id="node29" href="pass__functions_8h.html" title="Pass functions that simply redirect the calls to ApplyPass. " alt="" coords="570,733,755,789"/>
<area shape="rect" id="node30" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2node_8h.html" title="Graph node data structure. " alt="" coords="1658,317,1843,373"/>
<area shape="rect" id="node31" href="symbolic_8h.html" title="Symbolic graph construction API. " alt="" coords="1842,421,2027,477"/>
<area shape="rect" id="node32" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2op__attr__types_8h.html" title="Data structures that can appear in operator attributes. " alt="" coords="1289,629,1474,685"/>
<area shape="rect" id="node33" href="op_8h.html" title="Operator information structor. " alt="" coords="1494,221,1711,262"/>
<area shape="rect" id="node34" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2tuple_8h.html" title="Data structure Tuple and TShape to store dynamic sized shapes. " alt="" coords="1107,525,1293,581"/>
<area shape="rect" id="node20" href="include_2mxnet_2tuple_8h.html" title="Data structure Tuple and TShape to store dynamic sized shapes. " alt="" coords="1081,741,1236,782"/>
<area shape="rect" id="node21" href="include_2mxnet_2base_8h.html" title="/work/mxnet/include\l/mxnet/base.h" alt="" coords="1081,837,1236,879"/>
<area shape="rect" id="node22" href="engine_8h.html" title="Engine that schedules all the operations according to dependency. " alt="" coords="1591,927,1745,968"/>
<area shape="rect" id="node23" href="resource_8h.html" title="Global resource allocation handling. " alt="" coords="1451,1016,1605,1057"/>
<area shape="rect" id="node24" href="storage_8h.html" title="Storage manager across multiple devices. " alt="" coords="671,927,825,968"/>
<area shape="rect" id="node25" href="random__generator_8h.html" title="Parallel random number generator. " alt="" coords="1313,927,1516,968"/>
<area shape="rect" id="node26" href="rtc_8h.html" title="/work/mxnet/include\l/mxnet/rtc.h" alt="" coords="900,927,1055,968"/>
<area shape="rect" id="node27" href="tensor__blob_8h.html" title="TBlob class that holds common representation of arbirary dimension tensor, can be used to transformed..." alt="" coords="1079,927,1239,968"/>
<area shape="rect" id="node35" href="3rdparty_2tvm_2nnvm_2include_2nnvm_2graph__attr__types_8h.html" title="Data structures that can appear in graph attributes. " alt="" coords="714,629,899,685"/>
</map>
</div>
</div>
<p><a href="3rdparty_2dmlc-core_2include_2dmlc_2registry_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_1Registry.html">dmlc::Registry&lt; EntryType &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classdmlc_1_1Registry.html" title="Registry class. Registry can be used to register global singletons. The most commonly use case are fa...">Registry</a> class. <a class="el" href="classdmlc_1_1Registry.html" title="Registry class. Registry can be used to register global singletons. The most commonly use case are fa...">Registry</a> can be used to register global singletons. The most commonly use case are factory functions. <a href="classdmlc_1_1Registry.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_1FunctionRegEntryBase.html">dmlc::FunctionRegEntryBase&lt; EntryType, FunctionType &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Common base class for function registry. <a href="classdmlc_1_1FunctionRegEntryBase.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:a30edfc9f7bcb9862348b512dd73354ff"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#a30edfc9f7bcb9862348b512dd73354ff">DMLC_REGISTRY_ENABLE</a>(EntryType)</td></tr>
<tr class="memdesc:a30edfc9f7bcb9862348b512dd73354ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro to enable the registry of EntryType. This macro must be used under namespace dmlc, and only used once in cc file. <a href="#a30edfc9f7bcb9862348b512dd73354ff">More...</a><br /></td></tr>
<tr class="separator:a30edfc9f7bcb9862348b512dd73354ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6870c3bce5b56d427a4d225b1194816"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#af6870c3bce5b56d427a4d225b1194816">DMLC_REGISTRY_REGISTER</a>(EntryType, EntryTypeName, Name)</td></tr>
<tr class="memdesc:af6870c3bce5b56d427a4d225b1194816"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generic macro to register an EntryType There is a complete example in FactoryRegistryEntryBase. <a href="#af6870c3bce5b56d427a4d225b1194816">More...</a><br /></td></tr>
<tr class="separator:af6870c3bce5b56d427a4d225b1194816"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4948c95b9237182a8c10fb02bb3e9dc2"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#a4948c95b9237182a8c10fb02bb3e9dc2">DMLC_REGISTRY_FILE_TAG</a>(UniqueTag)&#160;&#160;&#160;int __dmlc_registry_file_tag_ ## UniqueTag ## __() { return 0; }</td></tr>
<tr class="memdesc:a4948c95b9237182a8c10fb02bb3e9dc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Declare a file tag to current file that contains object registrations. <a href="#a4948c95b9237182a8c10fb02bb3e9dc2">More...</a><br /></td></tr>
<tr class="separator:a4948c95b9237182a8c10fb02bb3e9dc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b08353ab775fb48862638173cf1ce38"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#a7b08353ab775fb48862638173cf1ce38">DMLC_REGISTRY_LINK_TAG</a>(UniqueTag)</td></tr>
<tr class="memdesc:a7b08353ab775fb48862638173cf1ce38"><td class="mdescLeft">&#160;</td><td class="mdescRight">(Optional) Force link to all the objects registered in file tag. <a href="#a7b08353ab775fb48862638173cf1ce38">More...</a><br /></td></tr>
<tr class="separator:a7b08353ab775fb48862638173cf1ce38"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a30edfc9f7bcb9862348b512dd73354ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a30edfc9f7bcb9862348b512dd73354ff">&#9670;&nbsp;</a></span>DMLC_REGISTRY_ENABLE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define DMLC_REGISTRY_ENABLE</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">EntryType</td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keyword">template</span>&lt;&gt; \</div><div class="line"> Registry&lt;EntryType &gt; *Registry&lt;EntryType &gt;::Get() { \</div><div class="line"> static Registry&lt;EntryType &gt; inst; \</div><div class="line"> return &amp;inst; \</div><div class="line"> } \</div></div><!-- fragment -->
<p>Macro to enable the registry of EntryType. This macro must be used under namespace dmlc, and only used once in cc file. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">EntryType</td><td>Type of registry entry </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a4948c95b9237182a8c10fb02bb3e9dc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4948c95b9237182a8c10fb02bb3e9dc2">&#9670;&nbsp;</a></span>DMLC_REGISTRY_FILE_TAG</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define DMLC_REGISTRY_FILE_TAG</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">UniqueTag</td><td>)</td>
<td>&#160;&#160;&#160;int __dmlc_registry_file_tag_ ## UniqueTag ## __() { return 0; }</td>
</tr>
</table>
</div><div class="memdoc">
<p>(Optional) Declare a file tag to current file that contains object registrations. </p>
<p>This will declare a dummy function that will be called by register file to incur a link dependency.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">UniqueTag</td><td>The unique tag used to represent. </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#a7b08353ab775fb48862638173cf1ce38" title="(Optional) Force link to all the objects registered in file tag. ">DMLC_REGISTRY_LINK_TAG</a> </dd></dl>
</div>
</div>
<a id="a7b08353ab775fb48862638173cf1ce38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b08353ab775fb48862638173cf1ce38">&#9670;&nbsp;</a></span>DMLC_REGISTRY_LINK_TAG</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define DMLC_REGISTRY_LINK_TAG</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">UniqueTag</td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"><span class="keywordtype">int</span> __dmlc_registry_file_tag_ ## UniqueTag ## __(); \</div><div class="line"> static <span class="keywordtype">int</span> <a class="code" href="3rdparty_2dmlc-core_2include_2dmlc_2base_8h.html#a9425a87a06019a8392509217b2a1da5a">DMLC_ATTRIBUTE_UNUSED</a> __reg_file_tag_ ## UniqueTag ## __ = \</div><div class="line"> __dmlc_registry_file_tag_ ## UniqueTag ## __();</div><div class="ttc" id="3rdparty_2dmlc-core_2include_2dmlc_2base_8h_html_a9425a87a06019a8392509217b2a1da5a"><div class="ttname"><a href="3rdparty_2dmlc-core_2include_2dmlc_2base_8h.html#a9425a87a06019a8392509217b2a1da5a">DMLC_ATTRIBUTE_UNUSED</a></div><div class="ttdeci">#define DMLC_ATTRIBUTE_UNUSED</div><div class="ttdoc">helper macro to supress unused warning </div><div class="ttdef"><b>Definition:</b> base.h:148</div></div>
</div><!-- fragment -->
<p>(Optional) Force link to all the objects registered in file tag. </p>
<p>This macro must be used in the same file as DMLC_REGISTRY_ENABLE and in the same namespace as DMLC_REGISTRY_FILE_TAG</p>
<p>DMLC_REGISTRY_FILE_TAG and DMLC_REGISTRY_LINK_TAG are optional macros for registration. They are used to encforce link of certain file into during static linking.</p>
<p>This is mainly used to solve problem during statically link a library which contains backward registration. Specifically, this avoids the objects in these file tags to be ignored by compiler.</p>
<p>For dynamic linking, this problem won't occur as everything is loaded by default.</p>
<p>Use of this is optional as it will create an error when a file tag do not exist. An alternative solution is always ask user to enable &ndash;whole-archieve during static link.</p>
<p>// in file objective_registry.cc <a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#a30edfc9f7bcb9862348b512dd73354ff" title="Macro to enable the registry of EntryType. This macro must be used under namespace dmlc...">DMLC_REGISTRY_ENABLE(MyObjective)</a>; <a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#a7b08353ab775fb48862638173cf1ce38" title="(Optional) Force link to all the objects registered in file tag. ">DMLC_REGISTRY_LINK_TAG(regression_op)</a>; <a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#a7b08353ab775fb48862638173cf1ce38" title="(Optional) Force link to all the objects registered in file tag. ">DMLC_REGISTRY_LINK_TAG(rank_op)</a>;</p>
<p>// in file regression_op.cc // declare tag of this file. <a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#a4948c95b9237182a8c10fb02bb3e9dc2" title="(Optional) Declare a file tag to current file that contains object registrations. ...">DMLC_REGISTRY_FILE_TAG(regression_op)</a>; <a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#af6870c3bce5b56d427a4d225b1194816" title="Generic macro to register an EntryType There is a complete example in FactoryRegistryEntryBase. ">DMLC_REGISTRY_REGISTER(MyObjective, logistic_reg, logistic_reg)</a>; // ...</p>
<p>// in file rank_op.cc // declare tag of this file. <a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#a4948c95b9237182a8c10fb02bb3e9dc2" title="(Optional) Declare a file tag to current file that contains object registrations. ...">DMLC_REGISTRY_FILE_TAG(rank_op)</a>; <a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#af6870c3bce5b56d427a4d225b1194816" title="Generic macro to register an EntryType There is a complete example in FactoryRegistryEntryBase. ">DMLC_REGISTRY_REGISTER(MyObjective, pairwiserank, pairwiserank)</a>;</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">UniqueTag</td><td>The unique tag used to represent. </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#a30edfc9f7bcb9862348b512dd73354ff" title="Macro to enable the registry of EntryType. This macro must be used under namespace dmlc...">DMLC_REGISTRY_ENABLE</a>, <a class="el" href="3rdparty_2dmlc-core_2include_2dmlc_2registry_8h.html#a4948c95b9237182a8c10fb02bb3e9dc2" title="(Optional) Declare a file tag to current file that contains object registrations. ...">DMLC_REGISTRY_FILE_TAG</a> </dd></dl>
</div>
</div>
<a id="af6870c3bce5b56d427a4d225b1194816"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af6870c3bce5b56d427a4d225b1194816">&#9670;&nbsp;</a></span>DMLC_REGISTRY_REGISTER</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define DMLC_REGISTRY_REGISTER</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">EntryType, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">EntryTypeName, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">Name&#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"><span class="keyword">static</span> <a class="code" href="3rdparty_2dmlc-core_2include_2dmlc_2base_8h.html#a9425a87a06019a8392509217b2a1da5a">DMLC_ATTRIBUTE_UNUSED</a> EntryType &amp; __make_ ## EntryTypeName ## _ ## Name ## __ = <a class="code" href="classdmlc_1_1Registry.html#ae41428f0ae40e5545df63a2dd0af50d6">\</a></div><div class="line"><a class="code" href="classdmlc_1_1Registry.html#ae41428f0ae40e5545df63a2dd0af50d6"> ::dmlc::Registry&lt;EntryType&gt;::Get</a>()-&gt;<a class="code" href="classdmlc_1_1Registry.html#a0b71def33966eca79ad304b9da04fecc">__REGISTER__</a>(#Name) \</div><div class="ttc" id="3rdparty_2dmlc-core_2include_2dmlc_2base_8h_html_a9425a87a06019a8392509217b2a1da5a"><div class="ttname"><a href="3rdparty_2dmlc-core_2include_2dmlc_2base_8h.html#a9425a87a06019a8392509217b2a1da5a">DMLC_ATTRIBUTE_UNUSED</a></div><div class="ttdeci">#define DMLC_ATTRIBUTE_UNUSED</div><div class="ttdoc">helper macro to supress unused warning </div><div class="ttdef"><b>Definition:</b> base.h:148</div></div>
<div class="ttc" id="classdmlc_1_1Registry_html_ae41428f0ae40e5545df63a2dd0af50d6"><div class="ttname"><a href="classdmlc_1_1Registry.html#ae41428f0ae40e5545df63a2dd0af50d6">dmlc::Registry::Get</a></div><div class="ttdeci">static Registry * Get()</div><div class="ttdoc">get a singleton of the Registry. This function can be defined by DMLC_REGISTRY_ENABLE. </div></div>
<div class="ttc" id="classdmlc_1_1Registry_html_a0b71def33966eca79ad304b9da04fecc"><div class="ttname"><a href="classdmlc_1_1Registry.html#a0b71def33966eca79ad304b9da04fecc">dmlc::Registry::__REGISTER__</a></div><div class="ttdeci">EntryType &amp; __REGISTER__(const std::string &amp;name)</div><div class="ttdoc">Internal function to register a name function under name. </div><div class="ttdef"><b>Definition:</b> registry.h:78</div></div>
</div><!-- fragment -->
<p>Generic macro to register an EntryType There is a complete example in FactoryRegistryEntryBase. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">EntryType</td><td>The type of registry entry. </td></tr>
<tr><td class="paramname">EntryTypeName</td><td>The typename of EntryType, must do not contain namespace :: . </td></tr>
<tr><td class="paramname">Name</td><td>The name to be registered. </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd>FactoryRegistryEntryBase </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jan 5 2023 00:58:42 for mxnet by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>