blob: 5a4e2cf5ebcad1c523aa2a88faa621df6e390e25 [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/include/mxnet/runtime/object.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_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1143c7affb9ebd026cb6818dd282def7.html">mxnet</a></li><li class="navelem"><a class="el" href="dir_8e7a93613ef4c7e7d673effa691c1739.html">runtime</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> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">object.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>A managed object in MXNet runtime.
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;dmlc/logging.h&gt;</code><br />
<code>#include &lt;type_traits&gt;</code><br />
<code>#include &lt;string&gt;</code><br />
<code>#include &lt;utility&gt;</code><br />
<code>#include &quot;<a class="el" href="c__runtime__api_8h_source.html">c_runtime_api.h</a>&quot;</code><br />
<code>#include &lt;atomic&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for object.h:</div>
<div class="dyncontent">
<div class="center"><img src="object_8h__incl.png" border="0" usemap="#_2work_2mxnet_2include_2mxnet_2runtime_2object_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="object_8h__dep__incl.png" border="0" usemap="#_2work_2mxnet_2include_2mxnet_2runtime_2object_8hdep" alt=""/></div>
<!-- MAP 1 -->
</div>
</div>
<p><a href="object_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="classmxnet_1_1runtime_1_1Object.html">mxnet::runtime::Object</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">base class of all object containers. <a href="classmxnet_1_1runtime_1_1Object.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="classmxnet_1_1runtime_1_1ObjectPtr.html">mxnet::runtime::ObjectPtr&lt; T &gt;</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A custom smart pointer for <a class="el" href="classmxnet_1_1runtime_1_1Object.html" title="base class of all object containers.">Object</a>. <a href="classmxnet_1_1runtime_1_1ObjectPtr.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="classmxnet_1_1runtime_1_1ObjectRef.html">mxnet::runtime::ObjectRef</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Base class of all object reference. <a href="classmxnet_1_1runtime_1_1ObjectRef.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="structmxnet_1_1runtime_1_1ObjectHash.html">mxnet::runtime::ObjectHash</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmxnet_1_1runtime_1_1ObjectRef.html" title="Base class of all object reference.">ObjectRef</a> hash functor. <a href="structmxnet_1_1runtime_1_1ObjectHash.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="structmxnet_1_1runtime_1_1ObjectEqual.html">mxnet::runtime::ObjectEqual</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classmxnet_1_1runtime_1_1ObjectRef.html" title="Base class of all object reference.">ObjectRef</a> equal functor. <a href="structmxnet_1_1runtime_1_1ObjectEqual.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:namespacemxnet"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemxnet.html">mxnet</a></td></tr>
<tr class="memdesc:namespacemxnet"><td class="mdescLeft">&#160;</td><td class="mdescRight">namespace of mxnet <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:namespacemxnet_1_1runtime"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemxnet_1_1runtime.html">mxnet::runtime</a></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:adc74fdc9e36de8e4ab39ecba73860cf5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="object_8h.html#adc74fdc9e36de8e4ab39ecba73860cf5">MXNET_OBJECT_ATOMIC_REF_COUNTER</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:adc74fdc9e36de8e4ab39ecba73860cf5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whether or not use atomic reference counter. If the reference counter is not atomic, an object cannot be owned by multiple threads. We can, however, move an object across threads. <a href="object_8h.html#adc74fdc9e36de8e4ab39ecba73860cf5">More...</a><br /></td></tr>
<tr class="separator:adc74fdc9e36de8e4ab39ecba73860cf5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07a1848f5230303d53fd9fcb05534fa0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="object_8h.html#a07a1848f5230303d53fd9fcb05534fa0">MXNET_DECLARE_BASE_OBJECT_INFO</a>(TypeName, ParentType)</td></tr>
<tr class="memdesc:a07a1848f5230303d53fd9fcb05534fa0"><td class="mdescLeft">&#160;</td><td class="mdescRight">helper macro to declare a base object type that can be inheritated. <a href="object_8h.html#a07a1848f5230303d53fd9fcb05534fa0">More...</a><br /></td></tr>
<tr class="separator:a07a1848f5230303d53fd9fcb05534fa0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff0db99c23ecb5cbf6c5b9134076a0f3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="object_8h.html#aff0db99c23ecb5cbf6c5b9134076a0f3">MXNET_DECLARE_FINAL_OBJECT_INFO</a>(TypeName, ParentType)</td></tr>
<tr class="memdesc:aff0db99c23ecb5cbf6c5b9134076a0f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">helper macro to declare type information in a final class. <a href="object_8h.html#aff0db99c23ecb5cbf6c5b9134076a0f3">More...</a><br /></td></tr>
<tr class="separator:aff0db99c23ecb5cbf6c5b9134076a0f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b28c0e1dc09b67696ad1369794b89c6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="object_8h.html#a6b28c0e1dc09b67696ad1369794b89c6">MXNET_REGISTER_OBJECT_TYPE</a>(TypeName)</td></tr>
<tr class="memdesc:a6b28c0e1dc09b67696ad1369794b89c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Helper macro to register the object type to runtime. Makes sure that the runtime type table is correctly populated. <a href="object_8h.html#a6b28c0e1dc09b67696ad1369794b89c6">More...</a><br /></td></tr>
<tr class="separator:a6b28c0e1dc09b67696ad1369794b89c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca8339b2955cf301ab9dd1cf1211c654"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="object_8h.html#aca8339b2955cf301ab9dd1cf1211c654">MXNET_DEFINE_DEFAULT_COPY_MOVE_AND_ASSIGN</a>(TypeName)</td></tr>
<tr class="separator:aca8339b2955cf301ab9dd1cf1211c654"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3bbe3c8205ea8d2660b25c519306f04f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="object_8h.html#a3bbe3c8205ea8d2660b25c519306f04f">MXNET_DEFINE_OBJECT_REF_METHODS</a>(TypeName, ParentType, ObjectName)</td></tr>
<tr class="separator:a3bbe3c8205ea8d2660b25c519306f04f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a715900fd588e08db3bad540c0ca0f7df"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="object_8h.html#a715900fd588e08db3bad540c0ca0f7df">MXNET_DEFINE_OBJECT_REF_METHODS_MUT</a>(TypeName, ParentType, ObjectName)</td></tr>
<tr class="separator:a715900fd588e08db3bad540c0ca0f7df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d335946c1724e13777adbd176b43540"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="object_8h.html#a9d335946c1724e13777adbd176b43540">MXNET_DEFINE_NOTNULLABLE_OBJECT_REF_METHODS</a>(TypeName, ParentType, ObjectName)</td></tr>
<tr class="separator:a9d335946c1724e13777adbd176b43540"><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:a2ab681b45ccee554c37775e5430e237f"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a2ab681b45ccee554c37775e5430e237f"><td class="memTemplItemLeft" align="right" valign="top">using&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemxnet.html#a2ab681b45ccee554c37775e5430e237f">mxnet::NodePtr</a> = runtime::ObjectPtr&lt; T &gt;</td></tr>
<tr class="separator:a2ab681b45ccee554c37775e5430e237f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a43738149e3dac1738390743d3de5cfac"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfac">mxnet::runtime::TypeIndex</a> { <br />
&#160;&#160;<a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfacac8749d8889e8fe72a6d698277b764458">mxnet::runtime::kRoot</a> = 0,
<a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfaca6539f6af501dc67fd6c8fb3d1cb2193d">mxnet::runtime::kMXNetTensor</a> = 1,
<a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfaca008b7567e2fed8aebf4573d88a301ef0">mxnet::runtime::kMXNetClosure</a> = 2,
<a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfacad6ac6a2d56e9b7f262d920def44509bf">mxnet::runtime::kMXNetADT</a> = 3,
<br />
&#160;&#160;<a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfaca7e465197746c27c835cadd7ee0cef82f">mxnet::runtime::kMXNetMap</a> = 4,
<a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfaca979d4bd568d6e9233185b070f4d4a740">mxnet::runtime::kMXNetString</a> = 5,
<a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfaca4efd65b5689dcc24c7316695c2f60c73">mxnet::runtime::kEllipsis</a> = 6,
<a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfaca226facde4854260861fcc447b24b142d">mxnet::runtime::kSlice</a> = 7,
<br />
&#160;&#160;<a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfacaf69f7723764834392643025c927bfe98">mxnet::runtime::kInteger</a> = 8,
<a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfaca2067f61f6fc0183c68ab067c32c83d00">mxnet::runtime::kFloat</a> = 9,
<a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfaca0d2ba2c4bdfe4ad90c0ca4e513d72d9f">mxnet::runtime::kStaticIndexEnd</a>,
<a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfaca6e3caaf791147e40ff557f272f15b8cb">mxnet::runtime::kDynamic</a> = kStaticIndexEnd
<br />
}</td></tr>
<tr class="memdesc:a43738149e3dac1738390743d3de5cfac"><td class="mdescLeft">&#160;</td><td class="mdescRight">list of the type index. <a href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfac">More...</a><br /></td></tr>
<tr class="separator:a43738149e3dac1738390743d3de5cfac"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a1bf05d799bd2a8ee18e9ef22335977ce"><td class="memTemplParams" colspan="2">template&lt;typename RefType , typename ObjectType &gt; </td></tr>
<tr class="memitem:a1bf05d799bd2a8ee18e9ef22335977ce"><td class="memTemplItemLeft" align="right" valign="top">RefType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemxnet_1_1runtime.html#a1bf05d799bd2a8ee18e9ef22335977ce">mxnet::runtime::GetRef</a> (const ObjectType *ptr)</td></tr>
<tr class="memdesc:a1bf05d799bd2a8ee18e9ef22335977ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a reference type from a raw object ptr type. <a href="namespacemxnet_1_1runtime.html#a1bf05d799bd2a8ee18e9ef22335977ce">More...</a><br /></td></tr>
<tr class="separator:a1bf05d799bd2a8ee18e9ef22335977ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6071ce524d51caddd366e0fb1827b081"><td class="memTemplParams" colspan="2">template&lt;typename SubRef , typename BaseRef &gt; </td></tr>
<tr class="memitem:a6071ce524d51caddd366e0fb1827b081"><td class="memTemplItemLeft" align="right" valign="top">SubRef&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemxnet_1_1runtime.html#a6071ce524d51caddd366e0fb1827b081">mxnet::runtime::Downcast</a> (BaseRef ref)</td></tr>
<tr class="memdesc:a6071ce524d51caddd366e0fb1827b081"><td class="mdescLeft">&#160;</td><td class="mdescRight">Downcast a base reference type to a more specific type. <a href="namespacemxnet_1_1runtime.html#a6071ce524d51caddd366e0fb1827b081">More...</a><br /></td></tr>
<tr class="separator:a6071ce524d51caddd366e0fb1827b081"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68c6b45a7469783b09a1b2b03211056d"><td class="memTemplParams" colspan="2">template&lt;typename BaseType , typename ObjectType &gt; </td></tr>
<tr class="memitem:a68c6b45a7469783b09a1b2b03211056d"><td class="memTemplItemLeft" align="right" valign="top">ObjectPtr&lt; BaseType &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemxnet_1_1runtime.html#a68c6b45a7469783b09a1b2b03211056d">mxnet::runtime::GetObjectPtr</a> (ObjectType *ptr)</td></tr>
<tr class="memdesc:a68c6b45a7469783b09a1b2b03211056d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an object ptr type from a raw object ptr. <a href="namespacemxnet_1_1runtime.html#a68c6b45a7469783b09a1b2b03211056d">More...</a><br /></td></tr>
<tr class="separator:a68c6b45a7469783b09a1b2b03211056d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab16bad32a0ce5d28b9201a6998b4a6d2"><td class="memTemplParams" colspan="2">template&lt;typename RefType , typename ObjType &gt; </td></tr>
<tr class="memitem:ab16bad32a0ce5d28b9201a6998b4a6d2"><td class="memTemplItemLeft" align="right" valign="top">RefType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemxnet_1_1runtime.html#ab16bad32a0ce5d28b9201a6998b4a6d2">mxnet::runtime::GetRef</a> (const ObjType *ptr)</td></tr>
<tr class="separator:ab16bad32a0ce5d28b9201a6998b4a6d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe2459d65fbb87e9b6c9a4aad5005db9"><td class="memTemplParams" colspan="2">template&lt;typename BaseType , typename ObjType &gt; </td></tr>
<tr class="memitem:abe2459d65fbb87e9b6c9a4aad5005db9"><td class="memTemplItemLeft" align="right" valign="top">ObjectPtr&lt; BaseType &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemxnet_1_1runtime.html#abe2459d65fbb87e9b6c9a4aad5005db9">mxnet::runtime::GetObjectPtr</a> (ObjType *ptr)</td></tr>
<tr class="separator:abe2459d65fbb87e9b6c9a4aad5005db9"><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>A managed object in MXNet runtime. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a07a1848f5230303d53fd9fcb05534fa0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a07a1848f5230303d53fd9fcb05534fa0">&#9670;&nbsp;</a></span>MXNET_DECLARE_BASE_OBJECT_INFO</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MXNET_DECLARE_BASE_OBJECT_INFO</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">ParentType&#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> uint32_t RuntimeTypeIndex() { \</div>
<div class="line"> return TypeName::_type_index != <a class="code" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfaca6e3caaf791147e40ff557f272f15b8cb">::mxnet::runtime::TypeIndex::kDynamic</a> ? \</div>
<div class="line"> TypeName::_type_index : \</div>
<div class="line"> _GetOrAllocRuntimeTypeIndex(); \</div>
<div class="line"> } \</div>
<div class="line"> static uint32_t _GetOrAllocRuntimeTypeIndex() { \</div>
<div class="line"> static uint32_t tidx = GetOrAllocRuntimeTypeIndex(TypeName::_type_key, \</div>
<div class="line"> TypeName::_type_index, \</div>
<div class="line"> ParentType::_GetOrAllocRuntimeTypeIndex(), \</div>
<div class="line"> TypeName::_type_child_slots, \</div>
<div class="line"> TypeName::_type_child_slots_can_overflow); \</div>
<div class="line"> return tidx; \</div>
<div class="line"> }</div>
</div><!-- fragment -->
<p>helper macro to declare a base object type that can be inheritated. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">TypeName</td><td>The name of the current type. </td></tr>
<tr><td class="paramname">ParentType</td><td>The name of the ParentType </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aff0db99c23ecb5cbf6c5b9134076a0f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aff0db99c23ecb5cbf6c5b9134076a0f3">&#9670;&nbsp;</a></span>MXNET_DECLARE_FINAL_OBJECT_INFO</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MXNET_DECLARE_FINAL_OBJECT_INFO</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">ParentType&#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> <span class="keyword">const</span> constexpr <span class="keywordtype">bool</span> _type_final = <span class="keyword">true</span>; \</div>
<div class="line"> static <span class="keyword">const</span> constexpr <span class="keywordtype">int</span> _type_child_slots = 0; \</div>
<div class="line"> MXNET_DECLARE_BASE_OBJECT_INFO(TypeName, ParentType)</div>
</div><!-- fragment -->
<p>helper macro to declare type information in a final class. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">TypeName</td><td>The name of the current type. </td></tr>
<tr><td class="paramname">ParentType</td><td>The name of the ParentType </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aca8339b2955cf301ab9dd1cf1211c654"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca8339b2955cf301ab9dd1cf1211c654">&#9670;&nbsp;</a></span>MXNET_DEFINE_DEFAULT_COPY_MOVE_AND_ASSIGN</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MXNET_DEFINE_DEFAULT_COPY_MOVE_AND_ASSIGN</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">TypeName</td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<b>Value:</b><div class="fragment"><div class="line"> TypeName(<span class="keyword">const</span> TypeName&amp; other) = <span class="keywordflow">default</span>; \</div>
<div class="line"> TypeName(TypeName&amp;&amp; other) = <span class="keywordflow">default</span>; \</div>
<div class="line"> TypeName&amp; operator=(<span class="keyword">const</span> TypeName&amp; other) = <span class="keywordflow">default</span>; \</div>
<div class="line"> TypeName&amp; operator=(TypeName&amp;&amp; other) = <span class="keywordflow">default</span>;</div>
</div><!-- fragment -->
</div>
</div>
<a id="a9d335946c1724e13777adbd176b43540"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d335946c1724e13777adbd176b43540">&#9670;&nbsp;</a></span>MXNET_DEFINE_NOTNULLABLE_OBJECT_REF_METHODS</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MXNET_DEFINE_NOTNULLABLE_OBJECT_REF_METHODS</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">ParentType, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">ObjectName&#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">explicit</span> TypeName(::<a class="code" href="classmxnet_1_1runtime_1_1ObjectPtr.html">mxnet::runtime::ObjectPtr&lt;::mxnet::runtime::Object&gt;</a> n) : ParentType(n) {} \</div>
<div class="line"> MXNET_DEFINE_DEFAULT_COPY_MOVE_AND_ASSIGN(TypeName); \</div>
<div class="line"> const ObjectName* operator-&gt;()<span class="keyword"> const </span>{ \</div>
<div class="line"> return <span class="keyword">static_cast&lt;</span><span class="keyword">const </span>ObjectName*<span class="keyword">&gt;</span>(data_.get()); \</div>
<div class="line"> } \</div>
<div class="line"> const ObjectName* <span class="keyword">get</span>() <span class="keyword">const</span> { \</div>
<div class="line"> return operator-&gt;(); \</div>
<div class="line"> } \</div>
<div class="line"> static constexpr <span class="keywordtype">bool</span> _type_is_nullable = <span class="keyword">false</span>; \</div>
<div class="line"> using ContainerType = ObjectName;</div>
</div><!-- fragment -->
</div>
</div>
<a id="a3bbe3c8205ea8d2660b25c519306f04f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3bbe3c8205ea8d2660b25c519306f04f">&#9670;&nbsp;</a></span>MXNET_DEFINE_OBJECT_REF_METHODS</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MXNET_DEFINE_OBJECT_REF_METHODS</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">ParentType, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">ObjectName&#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"> TypeName() {} \</div>
<div class="line"> explicit TypeName(::<a class="code" href="classmxnet_1_1runtime_1_1ObjectPtr.html">mxnet::runtime::ObjectPtr&lt;::mxnet::runtime::Object&gt;</a> n) : ParentType(n) {} \</div>
<div class="line"> const ObjectName* operator-&gt;()<span class="keyword"> const </span>{ \</div>
<div class="line"> return <span class="keyword">static_cast&lt;</span><span class="keyword">const </span>ObjectName*<span class="keyword">&gt;</span>(data_.get()); \</div>
<div class="line"> } \</div>
<div class="line"> operator bool()<span class="keyword"> const </span>{ \</div>
<div class="line"> return data_ != <span class="keyword">nullptr</span>; \</div>
<div class="line"> } \</div>
<div class="line"> using ContainerType = ObjectName;</div>
</div><!-- fragment -->
</div>
</div>
<a id="a715900fd588e08db3bad540c0ca0f7df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a715900fd588e08db3bad540c0ca0f7df">&#9670;&nbsp;</a></span>MXNET_DEFINE_OBJECT_REF_METHODS_MUT</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MXNET_DEFINE_OBJECT_REF_METHODS_MUT</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">ParentType, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">&#160;</td>
<td class="paramname">ObjectName&#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"> TypeName() {} \</div>
<div class="line"> explicit TypeName(::<a class="code" href="classmxnet_1_1runtime_1_1ObjectPtr.html">mxnet::runtime::ObjectPtr&lt;::mxnet::runtime::Object&gt;</a> n) : ParentType(n) {} \</div>
<div class="line"> ObjectName* operator-&gt;() { \</div>
<div class="line"> return <span class="keyword">static_cast&lt;</span>ObjectName*<span class="keyword">&gt;</span>(data_.get()); \</div>
<div class="line"> } \</div>
<div class="line"> operator bool()<span class="keyword"> const </span>{ \</div>
<div class="line"> return data_ != <span class="keyword">nullptr</span>; \</div>
<div class="line"> } \</div>
<div class="line"> using ContainerType = ObjectName;</div>
</div><!-- fragment -->
</div>
</div>
<a id="adc74fdc9e36de8e4ab39ecba73860cf5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc74fdc9e36de8e4ab39ecba73860cf5">&#9670;&nbsp;</a></span>MXNET_OBJECT_ATOMIC_REF_COUNTER</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MXNET_OBJECT_ATOMIC_REF_COUNTER&#160;&#160;&#160;1</td>
</tr>
</table>
</div><div class="memdoc">
<p>Whether or not use atomic reference counter. If the reference counter is not atomic, an object cannot be owned by multiple threads. We can, however, move an object across threads. </p>
</div>
</div>
<a id="a6b28c0e1dc09b67696ad1369794b89c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b28c0e1dc09b67696ad1369794b89c6">&#9670;&nbsp;</a></span>MXNET_REGISTER_OBJECT_TYPE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define MXNET_REGISTER_OBJECT_TYPE</td>
<td>(</td>
<td class="paramtype">&#160;</td>
<td class="paramname">TypeName</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> uint32_t __make_Object_tidx##_##TypeName##__ = \</div>
<div class="line"> TypeName::_GetOrAllocRuntimeTypeIndex()</div>
</div><!-- fragment -->
<p>Helper macro to register the object type to runtime. Makes sure that the runtime type table is correctly populated. </p>
<p>Use this macro in the cc file for each terminal class. </p>
</div>
</div>
</div><!-- contents -->
<div class="ttc" id="aclassmxnet_1_1runtime_1_1ObjectPtr_html"><div class="ttname"><a href="classmxnet_1_1runtime_1_1ObjectPtr.html">mxnet::runtime::ObjectPtr</a></div><div class="ttdoc">A custom smart pointer for Object.</div><div class="ttdef"><b>Definition:</b> object.h:346</div></div>
<div class="ttc" id="a3rdparty_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="anamespacemxnet_1_1runtime_html_a43738149e3dac1738390743d3de5cfaca6e3caaf791147e40ff557f272f15b8cb"><div class="ttname"><a href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfaca6e3caaf791147e40ff557f272f15b8cb">mxnet::runtime::kDynamic</a></div><div class="ttdeci">@ kDynamic</div><div class="ttdoc">Type index is allocated during runtime.</div><div class="ttdef"><b>Definition:</b> object.h:65</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>