| <!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: mxnet::runtime::Object Class 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&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&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="namespacemxnet.html">mxnet</a></li><li class="navelem"><a class="el" href="namespacemxnet_1_1runtime.html">runtime</a></li><li class="navelem"><a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a></li> </ul> |
| </div> |
| </div><!-- top --> |
| <div class="header"> |
| <div class="summary"> |
| <a href="#pub-types">Public Types</a> | |
| <a href="#pub-methods">Public Member Functions</a> | |
| <a href="#pub-static-methods">Static Public Member Functions</a> | |
| <a href="#pub-static-attribs">Static Public Attributes</a> | |
| <a href="#pro-methods">Protected Member Functions</a> | |
| <a href="#pro-static-methods">Static Protected Member Functions</a> | |
| <a href="#pro-attribs">Protected Attributes</a> | |
| <a href="#friends">Friends</a> | |
| <a href="classmxnet_1_1runtime_1_1Object-members.html">List of all members</a> </div> |
| <div class="headertitle"> |
| <div class="title">mxnet::runtime::Object Class Reference</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| |
| <p>base class of all object containers. |
| <a href="classmxnet_1_1runtime_1_1Object.html#details">More...</a></p> |
| |
| <p><code>#include <<a class="el" href="object_8h_source.html">object.h</a>></code></p> |
| <div class="dynheader"> |
| Inheritance diagram for mxnet::runtime::Object:</div> |
| <div class="dyncontent"> |
| <div class="center"><img src="classmxnet_1_1runtime_1_1Object__inherit__graph.png" border="0" usemap="#mxnet_1_1runtime_1_1Object_inherit__map" alt="Inheritance graph"/></div> |
| <!-- MAP 0 --> |
| </div> |
| <div class="dynheader"> |
| Collaboration diagram for mxnet::runtime::Object:</div> |
| <div class="dyncontent"> |
| <div class="center"><img src="classmxnet_1_1runtime_1_1Object__coll__graph.png" border="0" usemap="#mxnet_1_1runtime_1_1Object_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:a0fab6c32914322b17bca50b3abc29a4a"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a0fab6c32914322b17bca50b3abc29a4a">FDeleter</a>) (<a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a> *self)</td></tr> |
| <tr class="memdesc:a0fab6c32914322b17bca50b3abc29a4a"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classmxnet_1_1runtime_1_1Object.html" title="base class of all object containers.">Object</a> deleter. <a href="classmxnet_1_1runtime_1_1Object.html#a0fab6c32914322b17bca50b3abc29a4a">More...</a><br /></td></tr> |
| <tr class="separator:a0fab6c32914322b17bca50b3abc29a4a"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:abe59637cab2011bdf475325399d90b6e"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#abe59637cab2011bdf475325399d90b6e">RefCounterType</a> = std::atomic< int32_t ></td></tr> |
| <tr class="separator:abe59637cab2011bdf475325399d90b6e"><td class="memSeparator" colspan="2"> </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:a8fc23a4d42050cae4615e0b030fc59c5"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a8fc23a4d42050cae4615e0b030fc59c5">type_index</a> () const</td></tr> |
| <tr class="separator:a8fc23a4d42050cae4615e0b030fc59c5"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a243c8da6e57878bd349ed7dac4abd238"><td class="memItemLeft" align="right" valign="top">std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a243c8da6e57878bd349ed7dac4abd238">GetTypeKey</a> () const</td></tr> |
| <tr class="separator:a243c8da6e57878bd349ed7dac4abd238"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a601d73a606b24f7fb4fb408ebd4af184"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a601d73a606b24f7fb4fb408ebd4af184">GetTypeKeyHash</a> () const</td></tr> |
| <tr class="separator:a601d73a606b24f7fb4fb408ebd4af184"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:ae3923f7e6cdf9b2ddd643cf55951f81d"><td class="memTemplParams" colspan="2">template<typename TargetType > </td></tr> |
| <tr class="memitem:ae3923f7e6cdf9b2ddd643cf55951f81d"><td class="memTemplItemLeft" align="right" valign="top">bool </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#ae3923f7e6cdf9b2ddd643cf55951f81d">IsInstance</a> () const</td></tr> |
| <tr class="separator:ae3923f7e6cdf9b2ddd643cf55951f81d"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a0123f4844d5cc81b80cf3da86e41aa3b"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a0123f4844d5cc81b80cf3da86e41aa3b">Object</a> ()</td></tr> |
| <tr class="separator:a0123f4844d5cc81b80cf3da86e41aa3b"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a485351b0d6fd7d19e71b60529c40d339"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a485351b0d6fd7d19e71b60529c40d339">Object</a> (const <a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a> &other)</td></tr> |
| <tr class="separator:a485351b0d6fd7d19e71b60529c40d339"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:af93b865cbd7c4afc76af89c7befd26a4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#af93b865cbd7c4afc76af89c7befd26a4">Object</a> (<a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a> &&other)</td></tr> |
| <tr class="separator:af93b865cbd7c4afc76af89c7befd26a4"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:aa44606b99d3488f21b5290a7c046264a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#aa44606b99d3488f21b5290a7c046264a">operator=</a> (const <a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a> &other)</td></tr> |
| <tr class="separator:aa44606b99d3488f21b5290a7c046264a"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a96443fb87c46521a0f5177893d70cba9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a96443fb87c46521a0f5177893d70cba9">operator=</a> (<a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a> &&other)</td></tr> |
| <tr class="separator:a96443fb87c46521a0f5177893d70cba9"><td class="memSeparator" colspan="2"> </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:a38af2a13b570006a5760541f4a5ef6d0"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="include_2mxnet_2c__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> std::string </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a38af2a13b570006a5760541f4a5ef6d0">TypeIndex2Key</a> (uint32_t tindex)</td></tr> |
| <tr class="memdesc:a38af2a13b570006a5760541f4a5ef6d0"><td class="mdescLeft"> </td><td class="mdescRight">Get the type key of the corresponding index from runtime. <a href="classmxnet_1_1runtime_1_1Object.html#a38af2a13b570006a5760541f4a5ef6d0">More...</a><br /></td></tr> |
| <tr class="separator:a38af2a13b570006a5760541f4a5ef6d0"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a9a3015981ca2719dc1997d4b59f3bd95"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="include_2mxnet_2c__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a9a3015981ca2719dc1997d4b59f3bd95">TypeIndex2KeyHash</a> (uint32_t tindex)</td></tr> |
| <tr class="memdesc:a9a3015981ca2719dc1997d4b59f3bd95"><td class="mdescLeft"> </td><td class="mdescRight">Get the type key hash of the corresponding index from runtime. <a href="classmxnet_1_1runtime_1_1Object.html#a9a3015981ca2719dc1997d4b59f3bd95">More...</a><br /></td></tr> |
| <tr class="separator:a9a3015981ca2719dc1997d4b59f3bd95"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a187981a221881175d58e94c66b9689d1"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="include_2mxnet_2c__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a187981a221881175d58e94c66b9689d1">TypeKey2Index</a> (const std::string &key)</td></tr> |
| <tr class="memdesc:a187981a221881175d58e94c66b9689d1"><td class="mdescLeft"> </td><td class="mdescRight">Get the type index of the corresponding key from runtime. <a href="classmxnet_1_1runtime_1_1Object.html#a187981a221881175d58e94c66b9689d1">More...</a><br /></td></tr> |
| <tr class="separator:a187981a221881175d58e94c66b9689d1"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a9a14f0cacdb1dc322de5b98714450586"><td class="memItemLeft" align="right" valign="top">static uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a9a14f0cacdb1dc322de5b98714450586">_GetOrAllocRuntimeTypeIndex</a> ()</td></tr> |
| <tr class="separator:a9a14f0cacdb1dc322de5b98714450586"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a78ee34d8088ac6e5eff7d285826f2dcd"><td class="memItemLeft" align="right" valign="top">static uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a78ee34d8088ac6e5eff7d285826f2dcd">RuntimeTypeIndex</a> ()</td></tr> |
| <tr class="separator:a78ee34d8088ac6e5eff7d285826f2dcd"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a> |
| Static Public Attributes</h2></td></tr> |
| <tr class="memitem:a237ab83f51a0bfd0e2d9332e41fa543d"><td class="memItemLeft" align="right" valign="top">static constexpr const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a237ab83f51a0bfd0e2d9332e41fa543d">_type_key</a> = "Object"</td></tr> |
| <tr class="separator:a237ab83f51a0bfd0e2d9332e41fa543d"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a76ba66366d1583d5532bd93b13e4f835"><td class="memItemLeft" align="right" valign="top">static constexpr bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a76ba66366d1583d5532bd93b13e4f835">_type_final</a> = false</td></tr> |
| <tr class="separator:a76ba66366d1583d5532bd93b13e4f835"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a370bf83f2f2dcc8be2aca8e34ad67609"><td class="memItemLeft" align="right" valign="top">static constexpr uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a370bf83f2f2dcc8be2aca8e34ad67609">_type_child_slots</a> = 0</td></tr> |
| <tr class="separator:a370bf83f2f2dcc8be2aca8e34ad67609"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:aa7b4b8548044af9c3114876999dcbf3b"><td class="memItemLeft" align="right" valign="top">static constexpr bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#aa7b4b8548044af9c3114876999dcbf3b">_type_child_slots_can_overflow</a> = true</td></tr> |
| <tr class="separator:aa7b4b8548044af9c3114876999dcbf3b"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a5d66c402d6200f039e5c89f2f54f8589"><td class="memItemLeft" align="right" valign="top">static constexpr uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a5d66c402d6200f039e5c89f2f54f8589">_type_index</a> = TypeIndex::kDynamic</td></tr> |
| <tr class="separator:a5d66c402d6200f039e5c89f2f54f8589"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a> |
| Protected Member Functions</h2></td></tr> |
| <tr class="memitem:a4364e8a2c082e03a293bcab8a8ca5d62"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a4364e8a2c082e03a293bcab8a8ca5d62">IncRef</a> ()</td></tr> |
| <tr class="memdesc:a4364e8a2c082e03a293bcab8a8ca5d62"><td class="mdescLeft"> </td><td class="mdescRight">developer function, increases reference counter. <a href="classmxnet_1_1runtime_1_1Object.html#a4364e8a2c082e03a293bcab8a8ca5d62">More...</a><br /></td></tr> |
| <tr class="separator:a4364e8a2c082e03a293bcab8a8ca5d62"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a56610510e619c64a904ed607fddfd3cc"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a56610510e619c64a904ed607fddfd3cc">DecRef</a> ()</td></tr> |
| <tr class="memdesc:a56610510e619c64a904ed607fddfd3cc"><td class="mdescLeft"> </td><td class="mdescRight">developer function, decrease reference counter. <a href="classmxnet_1_1runtime_1_1Object.html#a56610510e619c64a904ed607fddfd3cc">More...</a><br /></td></tr> |
| <tr class="separator:a56610510e619c64a904ed607fddfd3cc"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-methods"></a> |
| Static Protected Member Functions</h2></td></tr> |
| <tr class="memitem:ab76cef683c1b9471fea079c2f3d6fa67"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="include_2mxnet_2c__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#ab76cef683c1b9471fea079c2f3d6fa67">GetOrAllocRuntimeTypeIndex</a> (const std::string &key, uint32_t static_tindex, uint32_t parent_tindex, uint32_t type_child_slots, bool type_child_slots_can_overflow)</td></tr> |
| <tr class="memdesc:ab76cef683c1b9471fea079c2f3d6fa67"><td class="mdescLeft"> </td><td class="mdescRight">Get the type index using type key. <a href="classmxnet_1_1runtime_1_1Object.html#ab76cef683c1b9471fea079c2f3d6fa67">More...</a><br /></td></tr> |
| <tr class="separator:ab76cef683c1b9471fea079c2f3d6fa67"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a> |
| Protected Attributes</h2></td></tr> |
| <tr class="memitem:a9431b125b4a027ba5022422eacff8943"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a9431b125b4a027ba5022422eacff8943">type_index_</a> {0}</td></tr> |
| <tr class="memdesc:a9431b125b4a027ba5022422eacff8943"><td class="mdescLeft"> </td><td class="mdescRight">Type index(tag) that indicates the type of the object. <a href="classmxnet_1_1runtime_1_1Object.html#a9431b125b4a027ba5022422eacff8943">More...</a><br /></td></tr> |
| <tr class="separator:a9431b125b4a027ba5022422eacff8943"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a14c68426d247442b13cc74af612d7ccd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#abe59637cab2011bdf475325399d90b6e">RefCounterType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a14c68426d247442b13cc74af612d7ccd">ref_counter_</a> {0}</td></tr> |
| <tr class="memdesc:a14c68426d247442b13cc74af612d7ccd"><td class="mdescLeft"> </td><td class="mdescRight">The internal reference counter. <a href="classmxnet_1_1runtime_1_1Object.html#a14c68426d247442b13cc74af612d7ccd">More...</a><br /></td></tr> |
| <tr class="separator:a14c68426d247442b13cc74af612d7ccd"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a1ee4c8cd5747637a3c8a8499cd5745cc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a0fab6c32914322b17bca50b3abc29a4a">FDeleter</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a1ee4c8cd5747637a3c8a8499cd5745cc">deleter_</a> = nullptr</td></tr> |
| <tr class="memdesc:a1ee4c8cd5747637a3c8a8499cd5745cc"><td class="mdescLeft"> </td><td class="mdescRight">deleter of this object to enable customized allocation. If the deleter is nullptr, no deletion will be performed. The creator of the object must always set the deleter field properly. <a href="classmxnet_1_1runtime_1_1Object.html#a1ee4c8cd5747637a3c8a8499cd5745cc">More...</a><br /></td></tr> |
| <tr class="separator:a1ee4c8cd5747637a3c8a8499cd5745cc"><td class="memSeparator" colspan="2"> </td></tr> |
| </table><table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a> |
| Friends</h2></td></tr> |
| <tr class="memitem:a8fae619f3bd1a2b2f7273d8d6525032a"><td class="memTemplParams" colspan="2">template<typename > </td></tr> |
| <tr class="memitem:a8fae619f3bd1a2b2f7273d8d6525032a"><td class="memTemplItemLeft" align="right" valign="top">class </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a8fae619f3bd1a2b2f7273d8d6525032a">ObjAllocatorBase</a></td></tr> |
| <tr class="separator:a8fae619f3bd1a2b2f7273d8d6525032a"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a4193bb155125953e77ded93c0fb46965"><td class="memTemplParams" colspan="2">template<typename > </td></tr> |
| <tr class="memitem:a4193bb155125953e77ded93c0fb46965"><td class="memTemplItemLeft" align="right" valign="top">class </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a4193bb155125953e77ded93c0fb46965">ObjectPtr</a></td></tr> |
| <tr class="memdesc:a4193bb155125953e77ded93c0fb46965"><td class="mdescLeft"> </td><td class="mdescRight">we always used <a class="el" href="classmxnet_1_1runtime_1_1ObjectPtr.html" title="A custom smart pointer for Object.">ObjectPtr</a> for a reference pointer to the node, so this alias can be changed in case. <a href="classmxnet_1_1runtime_1_1Object.html#a4193bb155125953e77ded93c0fb46965">More...</a><br /></td></tr> |
| <tr class="separator:a4193bb155125953e77ded93c0fb46965"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a82aa089816e7ff294eecf5c1bc1165cf"><td class="memItemLeft" align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a82aa089816e7ff294eecf5c1bc1165cf">MXNetRetValue</a></td></tr> |
| <tr class="separator:a82aa089816e7ff294eecf5c1bc1165cf"><td class="memSeparator" colspan="2"> </td></tr> |
| <tr class="memitem:a4a8e2a2ce9dc9267dc18ac8abfd8dd16"><td class="memItemLeft" align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a4a8e2a2ce9dc9267dc18ac8abfd8dd16">ObjectInternal</a></td></tr> |
| <tr class="separator:a4a8e2a2ce9dc9267dc18ac8abfd8dd16"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| <div class="textblock"><p>base class of all object containers. </p> |
| <p>Sub-class of objects should declare the following static constexpr fields:</p> |
| <ul> |
| <li>_type_index: Static type index of the object, if assigned to TypeIndex::kDynamic the type index will be assigned during runtime. Runtime type index can be accessed by <a class="el" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfac" title="list of the type index.">ObjectType::TypeIndex()</a>;</li> |
| <li>_type_key: The unique string identifier of tyep type.</li> |
| <li>_type_final: Whether the type is terminal type(there is no subclass of the type in the object system). This field is automatically set by marco MXNET_DECLARE_FINAL_OBJECT_INFO It is still OK to sub-class a terminal object type T and construct it using make_object. But IsInstance check will only show that the object type is T(instead of the sub-class).</li> |
| </ul> |
| <p>The following two fields are necessary for base classes that can be sub-classed.</p> |
| <ul> |
| <li>_type_child_slots: Number of reserved type index slots for child classes. Used for runtime optimization for type checking in IsInstance. If an object's type_index is within range of [type_index, type_index + _type_child_slots] Then the object can be quickly decided as sub-class of the current object class. If not, a fallback mechanism is used to check the global type table. Recommendation: set to estimate number of children needed.</li> |
| <li>_type_child_slots_can_overflow: Whether we can add additional child classes even if the number of child classes exceeds the _type_child_slots. A fallback mechanism to check global type table will be used. Recommendation: set to false for optimal runtime speed if we know exact number of children.</li> |
| </ul> |
| <p>Two macros are used to declare helper functions in the object:</p><ul> |
| <li>Use MXNET_DECLARE_BASE_OBJECT_INFO for object classes that can be sub-classed.</li> |
| <li>Use MXNET_DECLARE_FINAL_OBJECT_INFO for object classes that cannot be sub-classed.</li> |
| </ul> |
| <p>New objects can be created using make_object function. Which will automatically populate the type_index and deleter of the object.</p> |
| <dl class="section see"><dt>See also</dt><dd><a class="el" href="namespacemxnet_1_1runtime.html#ae494b840652fdcee82babd1e3c71e629" title="Allocate an object using default allocator.">make_object</a> </dd> |
| <dd> |
| <a class="el" href="classmxnet_1_1runtime_1_1ObjectPtr.html" title="A custom smart pointer for Object.">ObjectPtr</a> </dd> |
| <dd> |
| <a class="el" href="classmxnet_1_1runtime_1_1ObjectRef.html" title="Base class of all object reference.">ObjectRef</a></dd></dl> |
| <div class="fragment"><div class="line"><span class="comment">// Create a base object</span></div> |
| <div class="line"><span class="keyword">class </span>BaseObj : <span class="keyword">public</span> <a class="code" href="classmxnet_1_1runtime_1_1Object.html#a0123f4844d5cc81b80cf3da86e41aa3b">Object</a> {</div> |
| <div class="line"> <span class="keyword">public</span>:</div> |
| <div class="line"> <span class="comment">// object fields</span></div> |
| <div class="line"> <span class="keywordtype">int</span> field0;</div> |
| <div class="line"> </div> |
| <div class="line"> <span class="comment">// object properties</span></div> |
| <div class="line"> <span class="keyword">static</span> constexpr <span class="keyword">const</span> uint32_t <a class="code" href="classmxnet_1_1runtime_1_1Object.html#a5d66c402d6200f039e5c89f2f54f8589">_type_index</a> = <a class="code" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfaca6e3caaf791147e40ff557f272f15b8cb">TypeIndex::kDynamic</a>;</div> |
| <div class="line"> <span class="keyword">static</span> constexpr <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classmxnet_1_1runtime_1_1Object.html#a237ab83f51a0bfd0e2d9332e41fa543d">_type_key</a> = <span class="stringliteral">"test.BaseObj"</span>;</div> |
| <div class="line"> <a class="code" href="object_8h.html#a07a1848f5230303d53fd9fcb05534fa0">MXNET_DECLARE_BASE_OBJECT_INFO</a>(BaseObj, <a class="code" href="classmxnet_1_1runtime_1_1Object.html#a0123f4844d5cc81b80cf3da86e41aa3b">Object</a>);</div> |
| <div class="line">};</div> |
| <div class="line"> </div> |
| <div class="line"><span class="keyword">class </span>ObjLeaf : <span class="keyword">public</span> ObjBase {</div> |
| <div class="line"> <span class="keyword">public</span>:</div> |
| <div class="line"> <span class="comment">// fields</span></div> |
| <div class="line"> <span class="keywordtype">int</span> child_field0;</div> |
| <div class="line"> <span class="comment">// object properties</span></div> |
| <div class="line"> <span class="keyword">static</span> constexpr <span class="keyword">const</span> uint32_t <a class="code" href="classmxnet_1_1runtime_1_1Object.html#a5d66c402d6200f039e5c89f2f54f8589">_type_index</a> = <a class="code" href="namespacemxnet_1_1runtime.html#a43738149e3dac1738390743d3de5cfaca6e3caaf791147e40ff557f272f15b8cb">TypeIndex::kDynamic</a>;</div> |
| <div class="line"> <span class="keyword">static</span> constexpr <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classmxnet_1_1runtime_1_1Object.html#a237ab83f51a0bfd0e2d9332e41fa543d">_type_key</a> = <span class="stringliteral">"test.LeafObj"</span>;</div> |
| <div class="line"> <a class="code" href="object_8h.html#a07a1848f5230303d53fd9fcb05534fa0">MXNET_DECLARE_BASE_OBJECT_INFO</a>(LeaffObj, <a class="code" href="classmxnet_1_1runtime_1_1Object.html#a0123f4844d5cc81b80cf3da86e41aa3b">Object</a>);</div> |
| <div class="line">};</div> |
| <div class="line"> </div> |
| <div class="line"><span class="comment">// The following code should be put into a cc file.</span></div> |
| <div class="line"><a class="code" href="object_8h.html#a6b28c0e1dc09b67696ad1369794b89c6">MXNET_REGISTER_OBJECT_TYPE</a>(ObjBase);</div> |
| <div class="line"><a class="code" href="object_8h.html#a6b28c0e1dc09b67696ad1369794b89c6">MXNET_REGISTER_OBJECT_TYPE</a>(ObjLeaf);</div> |
| <div class="line"> </div> |
| <div class="line"><span class="comment">// Usage example.</span></div> |
| <div class="line"><span class="keywordtype">void</span> TestObjects() {</div> |
| <div class="line"> <span class="comment">// create an object</span></div> |
| <div class="line"> ObjectRef leaf_ref(make_object<LeafObj>());</div> |
| <div class="line"> <span class="comment">// cast to a specific instance</span></div> |
| <div class="line"> <span class="keyword">const</span> LeafObj* leaf_ptr = leaf_ref.as<LeafObj>();</div> |
| <div class="line"> CHECK(leaf_ptr != <span class="keyword">nullptr</span>);</div> |
| <div class="line"> <span class="comment">// can also cast to the base class.</span></div> |
| <div class="line"> CHECK(leaf_ref.as<BaseObj>() != <span class="keyword">nullptr</span>);</div> |
| <div class="line">}</div> |
| </div><!-- fragment --> </div><h2 class="groupheader">Member Typedef Documentation</h2> |
| <a id="a0fab6c32914322b17bca50b3abc29a4a"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a0fab6c32914322b17bca50b3abc29a4a">◆ </a></span>FDeleter</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">typedef void(* mxnet::runtime::Object::FDeleter) (<a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a> *self)</td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p><a class="el" href="classmxnet_1_1runtime_1_1Object.html" title="base class of all object containers.">Object</a> deleter. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">self</td><td>pointer to the <a class="el" href="classmxnet_1_1runtime_1_1Object.html" title="base class of all object containers.">Object</a>. </td></tr> |
| </table> |
| </dd> |
| </dl> |
| |
| </div> |
| </div> |
| <a id="abe59637cab2011bdf475325399d90b6e"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#abe59637cab2011bdf475325399d90b6e">◆ </a></span>RefCounterType</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">using <a class="el" href="classmxnet_1_1runtime_1_1Object.html#abe59637cab2011bdf475325399d90b6e">mxnet::runtime::Object::RefCounterType</a> = std::atomic<int32_t></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| <a id="a0123f4844d5cc81b80cf3da86e41aa3b"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a0123f4844d5cc81b80cf3da86e41aa3b">◆ </a></span>Object() <span class="overload">[1/3]</span></h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">mxnet::runtime::Object::Object </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="a485351b0d6fd7d19e71b60529c40d339"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a485351b0d6fd7d19e71b60529c40d339">◆ </a></span>Object() <span class="overload">[2/3]</span></h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">mxnet::runtime::Object::Object </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a> & </td> |
| <td class="paramname"><em>other</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="af93b865cbd7c4afc76af89c7befd26a4"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#af93b865cbd7c4afc76af89c7befd26a4">◆ </a></span>Object() <span class="overload">[3/3]</span></h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">mxnet::runtime::Object::Object </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a> && </td> |
| <td class="paramname"><em>other</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Member Function Documentation</h2> |
| <a id="a9a14f0cacdb1dc322de5b98714450586"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a9a14f0cacdb1dc322de5b98714450586">◆ </a></span>_GetOrAllocRuntimeTypeIndex()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static uint32_t mxnet::runtime::Object::_GetOrAllocRuntimeTypeIndex </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="a56610510e619c64a904ed607fddfd3cc"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a56610510e619c64a904ed607fddfd3cc">◆ </a></span>DecRef()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void mxnet::runtime::Object::DecRef </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>developer function, decrease reference counter. </p> |
| <dl class="section note"><dt>Note</dt><dd>The deleter will be called when ref_counter_ becomes zero. </dd></dl> |
| |
| </div> |
| </div> |
| <a id="ab76cef683c1b9471fea079c2f3d6fa67"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ab76cef683c1b9471fea079c2f3d6fa67">◆ </a></span>GetOrAllocRuntimeTypeIndex()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static <a class="el" href="include_2mxnet_2c__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> uint32_t mxnet::runtime::Object::GetOrAllocRuntimeTypeIndex </td> |
| <td>(</td> |
| <td class="paramtype">const std::string & </td> |
| <td class="paramname"><em>key</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint32_t </td> |
| <td class="paramname"><em>static_tindex</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint32_t </td> |
| <td class="paramname"><em>parent_tindex</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint32_t </td> |
| <td class="paramname"><em>type_child_slots</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">bool </td> |
| <td class="paramname"><em>type_child_slots_can_overflow</em> </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 class="mlabel">protected</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Get the type index using type key. </p> |
| <p>When the function is first time called for a type, it will register the type to the type table in the runtime. If the static_tindex is TypeIndex::kDynamic, the function will allocate a runtime type index. Otherwise, we will populate the type table and return the static index.</p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">key</td><td>the type key. </td></tr> |
| <tr><td class="paramname">static_tindex</td><td>The current _type_index field. can be TypeIndex::kDynamic. </td></tr> |
| <tr><td class="paramname">parent_tindex</td><td>The index of the parent. </td></tr> |
| <tr><td class="paramname">type_child_slots</td><td>Number of slots reserved for its children. </td></tr> |
| <tr><td class="paramname">type_child_slots_can_overflow</td><td>Whether to allow child to overflow the slots. </td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>The allocated type index. </dd></dl> |
| |
| </div> |
| </div> |
| <a id="a243c8da6e57878bd349ed7dac4abd238"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a243c8da6e57878bd349ed7dac4abd238">◆ </a></span>GetTypeKey()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">std::string mxnet::runtime::Object::GetTypeKey </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td> const</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <dl class="section return"><dt>Returns</dt><dd>the type key of the object. </dd></dl> |
| <dl class="section note"><dt>Note</dt><dd>this operation is expensive, can be used for error reporting. </dd></dl> |
| |
| </div> |
| </div> |
| <a id="a601d73a606b24f7fb4fb408ebd4af184"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a601d73a606b24f7fb4fb408ebd4af184">◆ </a></span>GetTypeKeyHash()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">size_t mxnet::runtime::Object::GetTypeKeyHash </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td> const</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <dl class="section return"><dt>Returns</dt><dd>A hash value of the return of GetTypeKey. </dd></dl> |
| |
| </div> |
| </div> |
| <a id="a4364e8a2c082e03a293bcab8a8ca5d62"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a4364e8a2c082e03a293bcab8a8ca5d62">◆ </a></span>IncRef()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">void mxnet::runtime::Object::IncRef </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>developer function, increases reference counter. </p> |
| |
| </div> |
| </div> |
| <a id="ae3923f7e6cdf9b2ddd643cf55951f81d"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ae3923f7e6cdf9b2ddd643cf55951f81d">◆ </a></span>IsInstance()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename TargetType > </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">bool mxnet::runtime::Object::IsInstance</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <p>Check if the object is an instance of TargetType. </p><dl class="tparams"><dt>Template Parameters</dt><dd> |
| <table class="tparams"> |
| <tr><td class="paramname">TargetType</td><td>The target type to be checked. </td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>Whether the target type is true. </dd></dl> |
| |
| </div> |
| </div> |
| <a id="aa44606b99d3488f21b5290a7c046264a"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#aa44606b99d3488f21b5290a7c046264a">◆ </a></span>operator=() <span class="overload">[1/2]</span></h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a>& mxnet::runtime::Object::operator= </td> |
| <td>(</td> |
| <td class="paramtype">const <a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a> & </td> |
| <td class="paramname"><em>other</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="a96443fb87c46521a0f5177893d70cba9"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a96443fb87c46521a0f5177893d70cba9">◆ </a></span>operator=() <span class="overload">[2/2]</span></h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a>& mxnet::runtime::Object::operator= </td> |
| <td>(</td> |
| <td class="paramtype"><a class="el" href="classmxnet_1_1runtime_1_1Object.html">Object</a> && </td> |
| <td class="paramname"><em>other</em></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="a78ee34d8088ac6e5eff7d285826f2dcd"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a78ee34d8088ac6e5eff7d285826f2dcd">◆ </a></span>RuntimeTypeIndex()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static uint32_t mxnet::runtime::Object::RuntimeTypeIndex </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="a8fc23a4d42050cae4615e0b030fc59c5"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a8fc23a4d42050cae4615e0b030fc59c5">◆ </a></span>type_index()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">uint32_t mxnet::runtime::Object::type_index </td> |
| <td>(</td> |
| <td class="paramname"></td><td>)</td> |
| <td> const</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| <dl class="section return"><dt>Returns</dt><dd>The internal runtime type index of the object. </dd></dl> |
| |
| </div> |
| </div> |
| <a id="a38af2a13b570006a5760541f4a5ef6d0"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a38af2a13b570006a5760541f4a5ef6d0">◆ </a></span>TypeIndex2Key()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static <a class="el" href="include_2mxnet_2c__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> std::string mxnet::runtime::Object::TypeIndex2Key </td> |
| <td>(</td> |
| <td class="paramtype">uint32_t </td> |
| <td class="paramname"><em>tindex</em></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>Get the type key of the corresponding index from runtime. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">tindex</td><td>The type index. </td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>the result. </dd></dl> |
| |
| </div> |
| </div> |
| <a id="a9a3015981ca2719dc1997d4b59f3bd95"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a9a3015981ca2719dc1997d4b59f3bd95">◆ </a></span>TypeIndex2KeyHash()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static <a class="el" href="include_2mxnet_2c__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> size_t mxnet::runtime::Object::TypeIndex2KeyHash </td> |
| <td>(</td> |
| <td class="paramtype">uint32_t </td> |
| <td class="paramname"><em>tindex</em></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>Get the type key hash of the corresponding index from runtime. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">tindex</td><td>The type index. </td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>the related key-hash. </dd></dl> |
| |
| </div> |
| </div> |
| <a id="a187981a221881175d58e94c66b9689d1"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a187981a221881175d58e94c66b9689d1">◆ </a></span>TypeKey2Index()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">static <a class="el" href="include_2mxnet_2c__api_8h.html#a5b0e47dde55f9b2f58b99fab92d1e0ac">MXNET_DLL</a> uint32_t mxnet::runtime::Object::TypeKey2Index </td> |
| <td>(</td> |
| <td class="paramtype">const std::string & </td> |
| <td class="paramname"><em>key</em></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>Get the type index of the corresponding key from runtime. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramname">key</td><td>The type key. </td></tr> |
| </table> |
| </dd> |
| </dl> |
| <dl class="section return"><dt>Returns</dt><dd>the result. </dd></dl> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Friends And Related Function Documentation</h2> |
| <a id="a82aa089816e7ff294eecf5c1bc1165cf"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a82aa089816e7ff294eecf5c1bc1165cf">◆ </a></span>MXNetRetValue</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">friend class <a class="el" href="classmxnet_1_1runtime_1_1MXNetRetValue.html">MXNetRetValue</a></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">friend</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="a8fae619f3bd1a2b2f7273d8d6525032a"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a8fae619f3bd1a2b2f7273d8d6525032a">◆ </a></span>ObjAllocatorBase</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename > </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">friend class <a class="el" href="classmxnet_1_1runtime_1_1ObjAllocatorBase.html">ObjAllocatorBase</a></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">friend</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="a4a8e2a2ce9dc9267dc18ac8abfd8dd16"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a4a8e2a2ce9dc9267dc18ac8abfd8dd16">◆ </a></span>ObjectInternal</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">friend class ObjectInternal</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">friend</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="a4193bb155125953e77ded93c0fb46965"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a4193bb155125953e77ded93c0fb46965">◆ </a></span>ObjectPtr</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <div class="memtemplate"> |
| template<typename > </div> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">friend class <a class="el" href="classmxnet_1_1runtime_1_1ObjectPtr.html">ObjectPtr</a></td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">friend</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>we always used <a class="el" href="classmxnet_1_1runtime_1_1ObjectPtr.html" title="A custom smart pointer for Object.">ObjectPtr</a> for a reference pointer to the node, so this alias can be changed in case. </p> |
| <p>By default, <a class="el" href="classmxnet_1_1runtime_1_1ObjectPtr.html" title="A custom smart pointer for Object.">ObjectPtr</a> is a std::shared_ptr of node </p> |
| |
| </div> |
| </div> |
| <h2 class="groupheader">Member Data Documentation</h2> |
| <a id="a370bf83f2f2dcc8be2aca8e34ad67609"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a370bf83f2f2dcc8be2aca8e34ad67609">◆ </a></span>_type_child_slots</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">constexpr uint32_t mxnet::runtime::Object::_type_child_slots = 0</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span><span class="mlabel">constexpr</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="aa7b4b8548044af9c3114876999dcbf3b"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#aa7b4b8548044af9c3114876999dcbf3b">◆ </a></span>_type_child_slots_can_overflow</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">constexpr bool mxnet::runtime::Object::_type_child_slots_can_overflow = true</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span><span class="mlabel">constexpr</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="a76ba66366d1583d5532bd93b13e4f835"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a76ba66366d1583d5532bd93b13e4f835">◆ </a></span>_type_final</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">constexpr bool mxnet::runtime::Object::_type_final = false</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span><span class="mlabel">constexpr</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="a5d66c402d6200f039e5c89f2f54f8589"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a5d66c402d6200f039e5c89f2f54f8589">◆ </a></span>_type_index</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">constexpr uint32_t mxnet::runtime::Object::_type_index = TypeIndex::kDynamic</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span><span class="mlabel">constexpr</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="a237ab83f51a0bfd0e2d9332e41fa543d"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a237ab83f51a0bfd0e2d9332e41fa543d">◆ </a></span>_type_key</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">constexpr const char* mxnet::runtime::Object::_type_key = "Object"</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">static</span><span class="mlabel">constexpr</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| </div> |
| </div> |
| <a id="a1ee4c8cd5747637a3c8a8499cd5745cc"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a1ee4c8cd5747637a3c8a8499cd5745cc">◆ </a></span>deleter_</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#a0fab6c32914322b17bca50b3abc29a4a">FDeleter</a> mxnet::runtime::Object::deleter_ = nullptr</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>deleter of this object to enable customized allocation. If the deleter is nullptr, no deletion will be performed. The creator of the object must always set the deleter field properly. </p> |
| |
| </div> |
| </div> |
| <a id="a14c68426d247442b13cc74af612d7ccd"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a14c68426d247442b13cc74af612d7ccd">◆ </a></span>ref_counter_</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname"><a class="el" href="classmxnet_1_1runtime_1_1Object.html#abe59637cab2011bdf475325399d90b6e">RefCounterType</a> mxnet::runtime::Object::ref_counter_ {0}</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>The internal reference counter. </p> |
| |
| </div> |
| </div> |
| <a id="a9431b125b4a027ba5022422eacff8943"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a9431b125b4a027ba5022422eacff8943">◆ </a></span>type_index_</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="mlabels"> |
| <tr> |
| <td class="mlabels-left"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">uint32_t mxnet::runtime::Object::type_index_ {0}</td> |
| </tr> |
| </table> |
| </td> |
| <td class="mlabels-right"> |
| <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>Type index(tag) that indicates the type of the object. </p> |
| |
| </div> |
| </div> |
| <hr/>The documentation for this class was generated from the following file:<ul> |
| <li>/work/mxnet/include/mxnet/runtime/<a class="el" href="object_8h_source.html">object.h</a></li> |
| </ul> |
| </div><!-- contents --> |
| <div class="ttc" id="aclassmxnet_1_1runtime_1_1Object_html_a5d66c402d6200f039e5c89f2f54f8589"><div class="ttname"><a href="classmxnet_1_1runtime_1_1Object.html#a5d66c402d6200f039e5c89f2f54f8589">mxnet::runtime::Object::_type_index</a></div><div class="ttdeci">static constexpr uint32_t _type_index</div><div class="ttdef"><b>Definition:</b> object.h:224</div></div> |
| <div class="ttc" id="aclassmxnet_1_1runtime_1_1Object_html_a0123f4844d5cc81b80cf3da86e41aa3b"><div class="ttname"><a href="classmxnet_1_1runtime_1_1Object.html#a0123f4844d5cc81b80cf3da86e41aa3b">mxnet::runtime::Object::Object</a></div><div class="ttdeci">Object()</div><div class="ttdef"><b>Definition:</b> object.h:227</div></div> |
| <div class="ttc" id="aclassmxnet_1_1runtime_1_1Object_html_a237ab83f51a0bfd0e2d9332e41fa543d"><div class="ttname"><a href="classmxnet_1_1runtime_1_1Object.html#a237ab83f51a0bfd0e2d9332e41fa543d">mxnet::runtime::Object::_type_key</a></div><div class="ttdeci">static constexpr const char * _type_key</div><div class="ttdef"><b>Definition:</b> object.h:208</div></div> |
| <div class="ttc" id="aobject_8h_html_a07a1848f5230303d53fd9fcb05534fa0"><div class="ttname"><a href="object_8h.html#a07a1848f5230303d53fd9fcb05534fa0">MXNET_DECLARE_BASE_OBJECT_INFO</a></div><div class="ttdeci">#define MXNET_DECLARE_BASE_OBJECT_INFO(TypeName, ParentType)</div><div class="ttdoc">helper macro to declare a base object type that can be inheritated.</div><div class="ttdef"><b>Definition:</b> object.h:651</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> |
| <div class="ttc" id="aobject_8h_html_a6b28c0e1dc09b67696ad1369794b89c6"><div class="ttname"><a href="object_8h.html#a6b28c0e1dc09b67696ad1369794b89c6">MXNET_REGISTER_OBJECT_TYPE</a></div><div class="ttdeci">#define MXNET_REGISTER_OBJECT_TYPE(TypeName)</div><div class="ttdoc">Helper macro to register the object type to runtime. Makes sure that the runtime type table is correc...</div><div class="ttdef"><b>Definition:</b> object.h:683</div></div> |
| <!-- start footer part --> |
| <hr class="footer"/><address class="footer"><small> |
| Generated on Sun Aug 1 2021 20:32:50 for mxnet by  <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/> |
| </a> 1.8.17 |
| </small></address> |
| </body> |
| </html> |