blob: 3bb484113b0ad46d4159017ac96a9067725698a5 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>mxnet: DLManagedTensor Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">mxnet
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structDLManagedTensor-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">DLManagedTensor Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>C Tensor object, manage memory of <a class="el" href="structDLTensor.html" title="Plain C Tensor object, does not manage memory. ">DLTensor</a>. This data structure is intended to facilitate the borrowing of <a class="el" href="structDLTensor.html" title="Plain C Tensor object, does not manage memory. ">DLTensor</a> by another framework. It is not meant to transfer the tensor. When the borrowing framework doesn't need the tensor, it should call the deleter to notify the host that the resource is no longer needed.
<a href="structDLManagedTensor.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="dlpack_8h_source.html">dlpack.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for DLManagedTensor:</div>
<div class="dyncontent">
<div class="center"><img src="structDLManagedTensor__coll__graph.png" border="0" usemap="#DLManagedTensor_coll__map" alt="Collaboration graph"/></div>
<map name="DLManagedTensor_coll__map" id="DLManagedTensor_coll__map">
<area shape="rect" id="node2" href="structDLTensor.html" title="Plain C Tensor object, does not manage memory. " alt="" coords="73,175,184,311"/>
<area shape="rect" id="node3" href="structDLContext.html" title="A Device context for Tensor and operator. " alt="" coords="5,13,121,105"/>
<area shape="rect" id="node4" href="structDLDataType.html" title="The data type the tensor can hold. " alt="" coords="145,5,245,112"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a568171e573aca5ba30f2cbae9fd2489b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structDLTensor.html">DLTensor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDLManagedTensor.html#a568171e573aca5ba30f2cbae9fd2489b">dl_tensor</a></td></tr>
<tr class="memdesc:a568171e573aca5ba30f2cbae9fd2489b"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structDLTensor.html" title="Plain C Tensor object, does not manage memory. ">DLTensor</a> which is being memory managed. <a href="#a568171e573aca5ba30f2cbae9fd2489b">More...</a><br /></td></tr>
<tr class="separator:a568171e573aca5ba30f2cbae9fd2489b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9bfa572555bd0b7855c5ae74ff96929"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDLManagedTensor.html#af9bfa572555bd0b7855c5ae74ff96929">manager_ctx</a></td></tr>
<tr class="memdesc:af9bfa572555bd0b7855c5ae74ff96929"><td class="mdescLeft">&#160;</td><td class="mdescRight">the context of the original host framework of <a class="el" href="structDLManagedTensor.html" title="C Tensor object, manage memory of DLTensor. This data structure is intended to facilitate the borrowi...">DLManagedTensor</a> in which <a class="el" href="structDLManagedTensor.html" title="C Tensor object, manage memory of DLTensor. This data structure is intended to facilitate the borrowi...">DLManagedTensor</a> is used in the framework. It can also be NULL. <a href="#af9bfa572555bd0b7855c5ae74ff96929">More...</a><br /></td></tr>
<tr class="separator:af9bfa572555bd0b7855c5ae74ff96929"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b5ac9adc40f2dbaf072531eb957d7ea"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDLManagedTensor.html#a3b5ac9adc40f2dbaf072531eb957d7ea">deleter</a> )(struct <a class="el" href="structDLManagedTensor.html">DLManagedTensor</a> *self)</td></tr>
<tr class="memdesc:a3b5ac9adc40f2dbaf072531eb957d7ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor signature void (*)(void*) - this should be called to destruct manager_ctx which holds the <a class="el" href="structDLManagedTensor.html" title="C Tensor object, manage memory of DLTensor. This data structure is intended to facilitate the borrowi...">DLManagedTensor</a>. It can be NULL if there is no way for the caller to provide a reasonable destructor. The destructors deletes the argument self as well. <a href="#a3b5ac9adc40f2dbaf072531eb957d7ea">More...</a><br /></td></tr>
<tr class="separator:a3b5ac9adc40f2dbaf072531eb957d7ea"><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>C Tensor object, manage memory of <a class="el" href="structDLTensor.html" title="Plain C Tensor object, does not manage memory. ">DLTensor</a>. This data structure is intended to facilitate the borrowing of <a class="el" href="structDLTensor.html" title="Plain C Tensor object, does not manage memory. ">DLTensor</a> by another framework. It is not meant to transfer the tensor. When the borrowing framework doesn't need the tensor, it should call the deleter to notify the host that the resource is no longer needed. </p>
</div><h2 class="groupheader">Member Data Documentation</h2>
<a id="a3b5ac9adc40f2dbaf072531eb957d7ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b5ac9adc40f2dbaf072531eb957d7ea">&#9670;&nbsp;</a></span>deleter</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void(* DLManagedTensor::deleter) (struct <a class="el" href="structDLManagedTensor.html">DLManagedTensor</a> *self)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor signature void (*)(void*) - this should be called to destruct manager_ctx which holds the <a class="el" href="structDLManagedTensor.html" title="C Tensor object, manage memory of DLTensor. This data structure is intended to facilitate the borrowi...">DLManagedTensor</a>. It can be NULL if there is no way for the caller to provide a reasonable destructor. The destructors deletes the argument self as well. </p>
</div>
</div>
<a id="a568171e573aca5ba30f2cbae9fd2489b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a568171e573aca5ba30f2cbae9fd2489b">&#9670;&nbsp;</a></span>dl_tensor</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structDLTensor.html">DLTensor</a> DLManagedTensor::dl_tensor</td>
</tr>
</table>
</div><div class="memdoc">
<p><a class="el" href="structDLTensor.html" title="Plain C Tensor object, does not manage memory. ">DLTensor</a> which is being memory managed. </p>
</div>
</div>
<a id="af9bfa572555bd0b7855c5ae74ff96929"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af9bfa572555bd0b7855c5ae74ff96929">&#9670;&nbsp;</a></span>manager_ctx</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* DLManagedTensor::manager_ctx</td>
</tr>
</table>
</div><div class="memdoc">
<p>the context of the original host framework of <a class="el" href="structDLManagedTensor.html" title="C Tensor object, manage memory of DLTensor. This data structure is intended to facilitate the borrowi...">DLManagedTensor</a> in which <a class="el" href="structDLManagedTensor.html" title="C Tensor object, manage memory of DLTensor. This data structure is intended to facilitate the borrowi...">DLManagedTensor</a> is used in the framework. It can also be NULL. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>/work/mxnet/3rdparty/dlpack/include/dlpack/<a class="el" href="dlpack_8h_source.html">dlpack.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jan 5 2023 00:58:43 for mxnet by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>