blob: 164316888a5361373fa1bfd19be97e864b1fed84 [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.6"/>
<title>mxnet: mxnet::Resource 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/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</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 style="padding-left: 0.5em;">
<div id="projectname">mxnet
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a></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="structmxnet_1_1Resource.html">Resource</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structmxnet_1_1Resource-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">mxnet::Resource Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Resources used by mxnet operations. A resource is something special other than <a class="el" href="classmxnet_1_1NDArray.html" title="ndarray interface ">NDArray</a>, but will still participate.
<a href="structmxnet_1_1Resource.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="resource_8h_source.html">resource.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for mxnet::Resource:</div>
<div class="dyncontent">
<div class="center"><img src="structmxnet_1_1Resource__coll__graph.png" border="0" usemap="#mxnet_1_1Resource_coll__map" alt="Collaboration graph"/></div>
<map name="mxnet_1_1Resource_coll__map" id="mxnet_1_1Resource_coll__map">
<area shape="rect" id="node2" href="structmxnet_1_1ResourceRequest.html" title="The resources that can be requested by Operator. " alt="" coords="17,6,196,98"/></map>
</div>
<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:a76a2cc8f2a94b67b3533a048a80396aa"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmxnet_1_1Resource.html#a76a2cc8f2a94b67b3533a048a80396aa">Resource</a> ()</td></tr>
<tr class="memdesc:a76a2cc8f2a94b67b3533a048a80396aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">default constructor <a href="#a76a2cc8f2a94b67b3533a048a80396aa">More...</a><br/></td></tr>
<tr class="separator:a76a2cc8f2a94b67b3533a048a80396aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86039963ae5d682ffc287aefd520f6f9"><td class="memTemplParams" colspan="2">template&lt;typename xpu , typename DType &gt; </td></tr>
<tr class="memitem:a86039963ae5d682ffc287aefd520f6f9"><td class="memTemplItemLeft" align="right" valign="top">mshadow::Random&lt; xpu, DType &gt; *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structmxnet_1_1Resource.html#a86039963ae5d682ffc287aefd520f6f9">get_random</a> (mshadow::Stream&lt; xpu &gt; *stream) const </td></tr>
<tr class="memdesc:a86039963ae5d682ffc287aefd520f6f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get random number generator. <a href="#a86039963ae5d682ffc287aefd520f6f9">More...</a><br/></td></tr>
<tr class="separator:a86039963ae5d682ffc287aefd520f6f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2be3ebdd3c5f5fa181ac4f6cdd69508"><td class="memTemplParams" colspan="2">template&lt;typename xpu , int ndim&gt; </td></tr>
<tr class="memitem:ab2be3ebdd3c5f5fa181ac4f6cdd69508"><td class="memTemplItemLeft" align="right" valign="top">mshadow::Tensor&lt; xpu, ndim, <br class="typebreak"/>
<a class="el" href="namespacemxnet.html#a4421326e33f2a848cb2fa3e70ab24ff4">real_t</a> &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structmxnet_1_1Resource.html#ab2be3ebdd3c5f5fa181ac4f6cdd69508">get_space</a> (mshadow::Shape&lt; ndim &gt; shape, mshadow::Stream&lt; xpu &gt; *stream) const </td></tr>
<tr class="memdesc:ab2be3ebdd3c5f5fa181ac4f6cdd69508"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get space requested as mshadow Tensor. The caller can request arbitrary size. <a href="#ab2be3ebdd3c5f5fa181ac4f6cdd69508">More...</a><br/></td></tr>
<tr class="separator:ab2be3ebdd3c5f5fa181ac4f6cdd69508"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92724193fad2a6c5e2a63687e63e3d80"><td class="memTemplParams" colspan="2">template&lt;int ndim&gt; </td></tr>
<tr class="memitem:a92724193fad2a6c5e2a63687e63e3d80"><td class="memTemplItemLeft" align="right" valign="top">mshadow::Tensor&lt; <a class="el" href="namespacemxnet.html#a850af9d76d9d4beaeb5234c1434973e3">cpu</a>, ndim, <br class="typebreak"/>
<a class="el" href="namespacemxnet.html#a4421326e33f2a848cb2fa3e70ab24ff4">real_t</a> &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structmxnet_1_1Resource.html#a92724193fad2a6c5e2a63687e63e3d80">get_host_space</a> (mshadow::Shape&lt; ndim &gt; shape) const </td></tr>
<tr class="memdesc:a92724193fad2a6c5e2a63687e63e3d80"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get cpu space requested as mshadow Tensor. The caller can request arbitrary size. <a href="#a92724193fad2a6c5e2a63687e63e3d80">More...</a><br/></td></tr>
<tr class="separator:a92724193fad2a6c5e2a63687e63e3d80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84e66895d72f9e99ae994de86539a77e"><td class="memTemplParams" colspan="2">template&lt;typename xpu , int ndim, typename DType &gt; </td></tr>
<tr class="memitem:a84e66895d72f9e99ae994de86539a77e"><td class="memTemplItemLeft" align="right" valign="top">mshadow::Tensor&lt; xpu, ndim, DType &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structmxnet_1_1Resource.html#a84e66895d72f9e99ae994de86539a77e">get_space_typed</a> (mshadow::Shape&lt; ndim &gt; shape, mshadow::Stream&lt; xpu &gt; *stream) const </td></tr>
<tr class="memdesc:a84e66895d72f9e99ae994de86539a77e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get space requested as mshadow Tensor in specified type. The caller can request arbitrary size. <a href="#a84e66895d72f9e99ae994de86539a77e">More...</a><br/></td></tr>
<tr class="separator:a84e66895d72f9e99ae994de86539a77e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c6dff75a9e05a7394b02c84b79a14b2"><td class="memTemplParams" colspan="2">template&lt;int ndim, typename DType &gt; </td></tr>
<tr class="memitem:a7c6dff75a9e05a7394b02c84b79a14b2"><td class="memTemplItemLeft" align="right" valign="top">mshadow::Tensor&lt; <a class="el" href="namespacemxnet.html#a850af9d76d9d4beaeb5234c1434973e3">cpu</a>, ndim, DType &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="structmxnet_1_1Resource.html#a7c6dff75a9e05a7394b02c84b79a14b2">get_host_space_typed</a> (mshadow::Shape&lt; ndim &gt; shape) const </td></tr>
<tr class="memdesc:a7c6dff75a9e05a7394b02c84b79a14b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get CPU space as mshadow Tensor in specified type. The caller can request arbitrary size. <a href="#a7c6dff75a9e05a7394b02c84b79a14b2">More...</a><br/></td></tr>
<tr class="separator:a7c6dff75a9e05a7394b02c84b79a14b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af57d32e959227f49d54d6eb6a5c62875"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmxnet_1_1Resource.html#af57d32e959227f49d54d6eb6a5c62875">get_space_internal</a> (size_t size) const </td></tr>
<tr class="memdesc:af57d32e959227f49d54d6eb6a5c62875"><td class="mdescLeft">&#160;</td><td class="mdescRight">internal function to get space from resources. <a href="#af57d32e959227f49d54d6eb6a5c62875">More...</a><br/></td></tr>
<tr class="separator:af57d32e959227f49d54d6eb6a5c62875"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6e0224f60b5e9afd3c883972863537f"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmxnet_1_1Resource.html#af6e0224f60b5e9afd3c883972863537f">get_host_space_internal</a> (size_t size) const </td></tr>
<tr class="memdesc:af6e0224f60b5e9afd3c883972863537f"><td class="mdescLeft">&#160;</td><td class="mdescRight">internal function to get cpu space from resources. <a href="#af6e0224f60b5e9afd3c883972863537f">More...</a><br/></td></tr>
<tr class="separator:af6e0224f60b5e9afd3c883972863537f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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:ae841e25cf5ee4aed895ace7fa080edc4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmxnet_1_1ResourceRequest.html">ResourceRequest</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmxnet_1_1Resource.html#ae841e25cf5ee4aed895ace7fa080edc4">req</a></td></tr>
<tr class="memdesc:ae841e25cf5ee4aed895ace7fa080edc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The original request. <a href="#ae841e25cf5ee4aed895ace7fa080edc4">More...</a><br/></td></tr>
<tr class="separator:ae841e25cf5ee4aed895ace7fa080edc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a8048bdda73fefa3af322aaaba50eb8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacemxnet_1_1engine.html#a9d36c4f33eae8531586dc2edf83ae7cf">engine::VarHandle</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmxnet_1_1Resource.html#a5a8048bdda73fefa3af322aaaba50eb8">var</a></td></tr>
<tr class="memdesc:a5a8048bdda73fefa3af322aaaba50eb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">engine variable <a href="#a5a8048bdda73fefa3af322aaaba50eb8">More...</a><br/></td></tr>
<tr class="separator:a5a8048bdda73fefa3af322aaaba50eb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1fc8578c0fa849afe7da29c1cf1308b"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmxnet_1_1Resource.html#aa1fc8578c0fa849afe7da29c1cf1308b">id</a></td></tr>
<tr class="memdesc:aa1fc8578c0fa849afe7da29c1cf1308b"><td class="mdescLeft">&#160;</td><td class="mdescRight">identifier of id information, used for debug purpose <a href="#aa1fc8578c0fa849afe7da29c1cf1308b">More...</a><br/></td></tr>
<tr class="separator:aa1fc8578c0fa849afe7da29c1cf1308b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e9576783b7e9023375ffebd76a11806"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmxnet_1_1Resource.html#a7e9576783b7e9023375ffebd76a11806">ptr_</a></td></tr>
<tr class="memdesc:a7e9576783b7e9023375ffebd76a11806"><td class="mdescLeft">&#160;</td><td class="mdescRight">pointer to the resource, do not use directly, access using member functions <a href="#a7e9576783b7e9023375ffebd76a11806">More...</a><br/></td></tr>
<tr class="separator:a7e9576783b7e9023375ffebd76a11806"><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>Resources used by mxnet operations. A resource is something special other than <a class="el" href="classmxnet_1_1NDArray.html" title="ndarray interface ">NDArray</a>, but will still participate. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a76a2cc8f2a94b67b3533a048a80396aa"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">mxnet::Resource::Resource </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">
<p>default constructor </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a92724193fad2a6c5e2a63687e63e3d80"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int ndim&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">mshadow::Tensor&lt;<a class="el" href="namespacemxnet.html#a850af9d76d9d4beaeb5234c1434973e3">cpu</a>, ndim, <a class="el" href="namespacemxnet.html#a4421326e33f2a848cb2fa3e70ab24ff4">real_t</a>&gt; mxnet::Resource::get_host_space </td>
<td>(</td>
<td class="paramtype">mshadow::Shape&lt; ndim &gt;&#160;</td>
<td class="paramname"><em>shape</em></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">
<p>Get cpu space requested as mshadow Tensor. The caller can request arbitrary size. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">shape</td><td>the Shape of returning tensor. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the mshadow tensor requested. </dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ndim</td><td>the number of dimension of the tensor requested. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="af6e0224f60b5e9afd3c883972863537f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* mxnet::Resource::get_host_space_internal </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>internal function to get cpu space from resources. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">size</td><td>The size of space. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The allocated space </dd></dl>
</div>
</div>
<a class="anchor" id="a7c6dff75a9e05a7394b02c84b79a14b2"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;int ndim, typename DType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">mshadow::Tensor&lt;<a class="el" href="namespacemxnet.html#a850af9d76d9d4beaeb5234c1434973e3">cpu</a>, ndim, DType&gt; mxnet::Resource::get_host_space_typed </td>
<td>(</td>
<td class="paramtype">mshadow::Shape&lt; ndim &gt;&#160;</td>
<td class="paramname"><em>shape</em></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">
<p>Get CPU space as mshadow Tensor in specified type. The caller can request arbitrary size. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">shape</td><td>the Shape of returning tensor </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the mshadow tensor requested </dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ndim</td><td>the number of dimnesion of tensor requested </td></tr>
<tr><td class="paramname">DType</td><td>request data type </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="a86039963ae5d682ffc287aefd520f6f9"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename xpu , typename DType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">mshadow::Random&lt;xpu, DType&gt;* mxnet::Resource::get_random </td>
<td>(</td>
<td class="paramtype">mshadow::Stream&lt; xpu &gt; *&#160;</td>
<td class="paramname"><em>stream</em></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">
<p>Get random number generator. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">stream</td><td>The stream to use in the random number generator. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the mshadow random number generator requested. </dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">xpu</td><td>the device type of random number generator. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="ab2be3ebdd3c5f5fa181ac4f6cdd69508"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename xpu , int ndim&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">mshadow::Tensor&lt;xpu, ndim, <a class="el" href="namespacemxnet.html#a4421326e33f2a848cb2fa3e70ab24ff4">real_t</a>&gt; mxnet::Resource::get_space </td>
<td>(</td>
<td class="paramtype">mshadow::Shape&lt; ndim &gt;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">mshadow::Stream&lt; xpu &gt; *&#160;</td>
<td class="paramname"><em>stream</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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">
<p>Get space requested as mshadow Tensor. The caller can request arbitrary size. </p>
<p>This space can be shared with other calls to this-&gt;get_space. So the caller need to serialize the calls when using the conflicted space. The old space can get freed, however, this will incur a synchronization, when running on device, so the launched kernels that depend on the temp space can finish correctly.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">shape</td><td>the Shape of returning tensor. </td></tr>
<tr><td class="paramname">stream</td><td>the stream of retruning tensor. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the mshadow tensor requested. </dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">xpu</td><td>the device type of random number generator. </td></tr>
<tr><td class="paramname">ndim</td><td>the number of dimension of the tensor requested. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="af57d32e959227f49d54d6eb6a5c62875"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* mxnet::Resource::get_space_internal </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>internal function to get space from resources. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">size</td><td>The size of the space. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The allocated space. </dd></dl>
</div>
</div>
<a class="anchor" id="a84e66895d72f9e99ae994de86539a77e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename xpu , int ndim, typename DType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">mshadow::Tensor&lt;xpu, ndim, DType&gt; mxnet::Resource::get_space_typed </td>
<td>(</td>
<td class="paramtype">mshadow::Shape&lt; ndim &gt;&#160;</td>
<td class="paramname"><em>shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">mshadow::Stream&lt; xpu &gt; *&#160;</td>
<td class="paramname"><em>stream</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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">
<p>Get space requested as mshadow Tensor in specified type. The caller can request arbitrary size. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">shape</td><td>the Shape of returning tensor. </td></tr>
<tr><td class="paramname">stream</td><td>the stream of retruning tensor. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the mshadow tensor requested. </dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">xpu</td><td>the device type of random number generator. </td></tr>
<tr><td class="paramname">ndim</td><td>the number of dimension of the tensor requested. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="aa1fc8578c0fa849afe7da29c1cf1308b"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int32_t mxnet::Resource::id</td>
</tr>
</table>
</div><div class="memdoc">
<p>identifier of id information, used for debug purpose </p>
</div>
</div>
<a class="anchor" id="a7e9576783b7e9023375ffebd76a11806"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* mxnet::Resource::ptr_</td>
</tr>
</table>
</div><div class="memdoc">
<p>pointer to the resource, do not use directly, access using member functions </p>
</div>
</div>
<a class="anchor" id="ae841e25cf5ee4aed895ace7fa080edc4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structmxnet_1_1ResourceRequest.html">ResourceRequest</a> mxnet::Resource::req</td>
</tr>
</table>
</div><div class="memdoc">
<p>The original request. </p>
</div>
</div>
<a class="anchor" id="a5a8048bdda73fefa3af322aaaba50eb8"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="namespacemxnet_1_1engine.html#a9d36c4f33eae8531586dc2edf83ae7cf">engine::VarHandle</a> mxnet::Resource::var</td>
</tr>
</table>
</div><div class="memdoc">
<p>engine variable </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/mxnet/<a class="el" href="resource_8h_source.html">resource.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Aug 6 2017 07:14:31 for mxnet by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>