blob: b2ec0408b33aa82eba59802c792cfb696c979a93 [file] [log] [blame]
<!-- HTML header for doxygen 1.8.15-->
<!-- Remember to use version doxygen 1.8.15 +-->
<!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.15"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: TensorAllocator 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="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</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>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="stylesheet.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;">
<img alt="Compute Library" src="https://raw.githubusercontent.com/ARM-software/ComputeLibrary/gh-pages/ACL_logo.png" style="max-width: 100%;margin-top: 15px;margin-left: 10px"/>
<td style="padding-left: 0.5em;">
<div id="projectname">
&#160;<span id="projectnumber">19.08</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classarm__compute_1_1_tensor_allocator.xhtml','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- 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 class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">TensorAllocator Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Basic implementation of a CPU memory tensor allocator.
<a href="classarm__compute_1_1_tensor_allocator.xhtml#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_tensor_allocator_8h_source.xhtml">TensorAllocator.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for TensorAllocator:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classarm__compute_1_1_tensor_allocator__coll__graph.svg" width="134" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.xhtml">legend</a>]</span></center></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:a20c11f37f59a434b1dd0b69f62771ac6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a20c11f37f59a434b1dd0b69f62771ac6">TensorAllocator</a> (<a class="el" href="classarm__compute_1_1_tensor.xhtml">Tensor</a> *owner=nullptr)</td></tr>
<tr class="memdesc:a20c11f37f59a434b1dd0b69f62771ac6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <a href="#a20c11f37f59a434b1dd0b69f62771ac6">More...</a><br /></td></tr>
<tr class="separator:a20c11f37f59a434b1dd0b69f62771ac6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27f8b115e4571d52d83419aaea4eeee1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a27f8b115e4571d52d83419aaea4eeee1">~TensorAllocator</a> ()</td></tr>
<tr class="memdesc:a27f8b115e4571d52d83419aaea4eeee1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor. <a href="#a27f8b115e4571d52d83419aaea4eeee1">More...</a><br /></td></tr>
<tr class="separator:a27f8b115e4571d52d83419aaea4eeee1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f7d6251f7bd7834128664d851986e6a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a1f7d6251f7bd7834128664d851986e6a">TensorAllocator</a> (const <a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;)=delete</td></tr>
<tr class="memdesc:a1f7d6251f7bd7834128664d851986e6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prevent instances of this class from being copied (As this class contains pointers) <a href="#a1f7d6251f7bd7834128664d851986e6a">More...</a><br /></td></tr>
<tr class="separator:a1f7d6251f7bd7834128664d851986e6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a943854ce6f3aafac2714340e0915de75"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a943854ce6f3aafac2714340e0915de75">operator=</a> (const <a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;)=delete</td></tr>
<tr class="memdesc:a943854ce6f3aafac2714340e0915de75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prevent instances of this class from being copy assigned (As this class contains pointers) <a href="#a943854ce6f3aafac2714340e0915de75">More...</a><br /></td></tr>
<tr class="separator:a943854ce6f3aafac2714340e0915de75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5d534fb1ab7a62ef81d80f47af1679b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#aa5d534fb1ab7a62ef81d80f47af1679b">TensorAllocator</a> (<a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&amp;) noexcept</td></tr>
<tr class="memdesc:aa5d534fb1ab7a62ef81d80f47af1679b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow instances of this class to be moved. <a href="#aa5d534fb1ab7a62ef81d80f47af1679b">More...</a><br /></td></tr>
<tr class="separator:aa5d534fb1ab7a62ef81d80f47af1679b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace0f71b15cbb5b468070f5a2fd4110ad"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#ace0f71b15cbb5b468070f5a2fd4110ad">operator=</a> (<a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&amp;) noexcept</td></tr>
<tr class="memdesc:ace0f71b15cbb5b468070f5a2fd4110ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow instances of this class to be moved. <a href="#ace0f71b15cbb5b468070f5a2fd4110ad">More...</a><br /></td></tr>
<tr class="separator:ace0f71b15cbb5b468070f5a2fd4110ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fc6adad84b23f10d54d5a7b6928f872"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a3fc6adad84b23f10d54d5a7b6928f872">init</a> (const <a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;allocator, const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;coords, <a class="el" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> &amp;sub_info)</td></tr>
<tr class="memdesc:a3fc6adad84b23f10d54d5a7b6928f872"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shares the same backing memory with another tensor allocator, while the tensor info might be different. <a href="#a3fc6adad84b23f10d54d5a7b6928f872">More...</a><br /></td></tr>
<tr class="separator:a3fc6adad84b23f10d54d5a7b6928f872"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a344325f71f51323330de47f307ebecfd"><td class="memItemLeft" align="right" valign="top">uint8_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a344325f71f51323330de47f307ebecfd">data</a> () const</td></tr>
<tr class="memdesc:a344325f71f51323330de47f307ebecfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the pointer to the allocated data. <a href="#a344325f71f51323330de47f307ebecfd">More...</a><br /></td></tr>
<tr class="separator:a344325f71f51323330de47f307ebecfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e509c2a177b0b29e9e2369535094dee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a6e509c2a177b0b29e9e2369535094dee">allocate</a> () override</td></tr>
<tr class="memdesc:a6e509c2a177b0b29e9e2369535094dee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocate size specified by <a class="el" href="classarm__compute_1_1_tensor_info.xhtml" title="Store the tensor&#39;s metadata.">TensorInfo</a> of CPU memory. <a href="#a6e509c2a177b0b29e9e2369535094dee">More...</a><br /></td></tr>
<tr class="separator:a6e509c2a177b0b29e9e2369535094dee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1468b0adb6ec3f9d38aa7d60b8a91974"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a1468b0adb6ec3f9d38aa7d60b8a91974">free</a> () override</td></tr>
<tr class="memdesc:a1468b0adb6ec3f9d38aa7d60b8a91974"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free allocated CPU memory. <a href="#a1468b0adb6ec3f9d38aa7d60b8a91974">More...</a><br /></td></tr>
<tr class="separator:a1468b0adb6ec3f9d38aa7d60b8a91974"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84052cebf66a6126051a166a078253a4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_status.xhtml">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a84052cebf66a6126051a166a078253a4">import_memory</a> (void *memory)</td></tr>
<tr class="memdesc:a84052cebf66a6126051a166a078253a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import an existing memory as a tensor's backing memory. <a href="#a84052cebf66a6126051a166a078253a4">More...</a><br /></td></tr>
<tr class="separator:a84052cebf66a6126051a166a078253a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89ee265e94df4e8aaf4f465649d4e065"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#a89ee265e94df4e8aaf4f465649d4e065">set_associated_memory_group</a> (<a class="el" href="namespacearm__compute.xhtml#a0e7a03e2e133cb1fbb12517a3f646a09">MemoryGroup</a> *associated_memory_group)</td></tr>
<tr class="memdesc:a89ee265e94df4e8aaf4f465649d4e065"><td class="mdescLeft">&#160;</td><td class="mdescRight">Associates the tensor with a memory group. <a href="#a89ee265e94df4e8aaf4f465649d4e065">More...</a><br /></td></tr>
<tr class="separator:a89ee265e94df4e8aaf4f465649d4e065"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af36143939a43fa124312e395975091ed"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml#af36143939a43fa124312e395975091ed">init</a> (const <a class="el" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> &amp;input, size_t <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a32899157b4898866a4a58440f2f7b13f">alignment</a>=0)</td></tr>
<tr class="memdesc:af36143939a43fa124312e395975091ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml" title="Interface to allocate tensors.">ITensorAllocator</a>'s init methods available. <a href="#af36143939a43fa124312e395975091ed">More...</a><br /></td></tr>
<tr class="separator:af36143939a43fa124312e395975091ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classarm__compute_1_1_i_tensor_allocator"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarm__compute_1_1_i_tensor_allocator')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a></td></tr>
<tr class="memitem:af97d553d2aa86688c92db8ed9a67cf0e inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#af97d553d2aa86688c92db8ed9a67cf0e">ITensorAllocator</a> ()</td></tr>
<tr class="memdesc:af97d553d2aa86688c92db8ed9a67cf0e inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <a href="classarm__compute_1_1_i_tensor_allocator.xhtml#af97d553d2aa86688c92db8ed9a67cf0e">More...</a><br /></td></tr>
<tr class="separator:af97d553d2aa86688c92db8ed9a67cf0e inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae82acbc677aa7d77c6a3f5e3547ef917 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#ae82acbc677aa7d77c6a3f5e3547ef917">ITensorAllocator</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a> &amp;)=default</td></tr>
<tr class="memdesc:ae82acbc677aa7d77c6a3f5e3547ef917 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow instances of this class to be copy constructed. <a href="classarm__compute_1_1_i_tensor_allocator.xhtml#ae82acbc677aa7d77c6a3f5e3547ef917">More...</a><br /></td></tr>
<tr class="separator:ae82acbc677aa7d77c6a3f5e3547ef917 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a12e5f2915e2461321b130dcf84f3e268 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a12e5f2915e2461321b130dcf84f3e268">operator=</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a> &amp;)=default</td></tr>
<tr class="memdesc:a12e5f2915e2461321b130dcf84f3e268 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow instances of this class to be copied. <a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a12e5f2915e2461321b130dcf84f3e268">More...</a><br /></td></tr>
<tr class="separator:a12e5f2915e2461321b130dcf84f3e268 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fe09d257ff33e01defc7074ca22dc98 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a4fe09d257ff33e01defc7074ca22dc98">ITensorAllocator</a> (<a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a4fe09d257ff33e01defc7074ca22dc98 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow instances of this class to be move constructed. <a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a4fe09d257ff33e01defc7074ca22dc98">More...</a><br /></td></tr>
<tr class="separator:a4fe09d257ff33e01defc7074ca22dc98 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46277b6e964a66a9936e06f9989f0ff6 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a46277b6e964a66a9936e06f9989f0ff6">operator=</a> (<a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml">ITensorAllocator</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a46277b6e964a66a9936e06f9989f0ff6 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow instances of this class to be moved. <a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a46277b6e964a66a9936e06f9989f0ff6">More...</a><br /></td></tr>
<tr class="separator:a46277b6e964a66a9936e06f9989f0ff6 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8378fc6c887231765b885f8033c7bb99 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a8378fc6c887231765b885f8033c7bb99">~ITensorAllocator</a> ()=default</td></tr>
<tr class="memdesc:a8378fc6c887231765b885f8033c7bb99 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default virtual destructor. <a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a8378fc6c887231765b885f8033c7bb99">More...</a><br /></td></tr>
<tr class="separator:a8378fc6c887231765b885f8033c7bb99 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af36143939a43fa124312e395975091ed inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#af36143939a43fa124312e395975091ed">init</a> (const <a class="el" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> &amp;input, size_t <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a32899157b4898866a4a58440f2f7b13f">alignment</a>=0)</td></tr>
<tr class="memdesc:af36143939a43fa124312e395975091ed inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize a tensor based on the passed <a class="el" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a>. <a href="classarm__compute_1_1_i_tensor_allocator.xhtml#af36143939a43fa124312e395975091ed">More...</a><br /></td></tr>
<tr class="separator:af36143939a43fa124312e395975091ed inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29737b25723597c9708c662c7088e6c3 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a29737b25723597c9708c662c7088e6c3">info</a> ()</td></tr>
<tr class="memdesc:a29737b25723597c9708c662c7088e6c3 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a reference to the tensor's metadata. <a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a29737b25723597c9708c662c7088e6c3">More...</a><br /></td></tr>
<tr class="separator:a29737b25723597c9708c662c7088e6c3 inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3461a6d7c86f09c854cbb7ab5578c4e inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#af3461a6d7c86f09c854cbb7ab5578c4e">info</a> () const</td></tr>
<tr class="memdesc:af3461a6d7c86f09c854cbb7ab5578c4e inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a constant reference to the tensor's metadata. <a href="classarm__compute_1_1_i_tensor_allocator.xhtml#af3461a6d7c86f09c854cbb7ab5578c4e">More...</a><br /></td></tr>
<tr class="separator:af3461a6d7c86f09c854cbb7ab5578c4e inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32899157b4898866a4a58440f2f7b13f inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a32899157b4898866a4a58440f2f7b13f">alignment</a> () const</td></tr>
<tr class="memdesc:a32899157b4898866a4a58440f2f7b13f inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return underlying's tensor buffer alignment. <a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a32899157b4898866a4a58440f2f7b13f">More...</a><br /></td></tr>
<tr class="separator:a32899157b4898866a4a58440f2f7b13f inherit pub_methods_classarm__compute_1_1_i_tensor_allocator"><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>Basic implementation of a CPU memory tensor allocator. </p>
<p class="definition">Definition at line <a class="el" href="_tensor_allocator_8h_source.xhtml#l00044">44</a> of file <a class="el" href="_tensor_allocator_8h_source.xhtml">TensorAllocator.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a20c11f37f59a434b1dd0b69f62771ac6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a20c11f37f59a434b1dd0b69f62771ac6">&#9670;&nbsp;</a></span>TensorAllocator() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_tensor.xhtml">Tensor</a> *&#160;</td>
<td class="paramname"><em>owner</em> = <code>nullptr</code></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">owner</td><td>Owner of the tensor allocator. </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml#l00069">69</a> of file <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml">TensorAllocator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; : _associated_memory_group(<span class="keyword">nullptr</span>), _memory(), _owner(owner)</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;{</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a id="a27f8b115e4571d52d83419aaea4eeee1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27f8b115e4571d52d83419aaea4eeee1">&#9670;&nbsp;</a></span>~TensorAllocator()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">~<a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Default destructor. </p>
<p class="definition">Definition at line <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml#l00074">74</a> of file <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml">TensorAllocator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;{</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a29737b25723597c9708c662c7088e6c3">info</a>().<a class="code" href="classarm__compute_1_1_tensor_info.xhtml#a78bf77b2d9b959259f77a32b9a412184">set_is_resizable</a>(<span class="keyword">true</span>);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml_a78bf77b2d9b959259f77a32b9a412184"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml#a78bf77b2d9b959259f77a32b9a412184">arm_compute::TensorInfo::set_is_resizable</a></div><div class="ttdeci">ITensorInfo &amp; set_is_resizable(bool is_resizable) override</div><div class="ttdoc">Set the flag whether the tensor size can be changed.</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00280">TensorInfo.h:280</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_allocator_xhtml_a29737b25723597c9708c662c7088e6c3"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a29737b25723597c9708c662c7088e6c3">arm_compute::ITensorAllocator::info</a></div><div class="ttdeci">TensorInfo &amp; info()</div><div class="ttdoc">Return a reference to the tensor's metadata.</div><div class="ttdef"><b>Definition:</b> <a href="_i_tensor_allocator_8cpp_source.xhtml#l00044">ITensorAllocator.cpp:44</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_i_tensor_allocator_8cpp_source.xhtml#l00044">ITensorAllocator::info()</a>, and <a class="el" href="_tensor_info_8h_source.xhtml#l00280">TensorInfo::set_is_resizable()</a>.</p>
</div>
</div>
<a id="a1f7d6251f7bd7834128664d851986e6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f7d6251f7bd7834128664d851986e6a">&#9670;&nbsp;</a></span>TensorAllocator() <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"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Prevent instances of this class from being copied (As this class contains pointers) </p>
</div>
</div>
<a id="aa5d534fb1ab7a62ef81d80f47af1679b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5d534fb1ab7a62ef81d80f47af1679b">&#9670;&nbsp;</a></span>TensorAllocator() <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"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&amp;&#160;</td>
<td class="paramname"><em>o</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Allow instances of this class to be moved. </p>
<p class="definition">Definition at line <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml#l00079">79</a> of file <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml">TensorAllocator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; : <a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#af97d553d2aa86688c92db8ed9a67cf0e">ITensorAllocator</a>(std::move(o)),</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; _associated_memory_group(o._associated_memory_group),</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; _memory(std::move(o._memory)),</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; _owner(o._owner)</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160;{</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; o._associated_memory_group = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; o._memory = <a class="code" href="classarm__compute_1_1_memory.xhtml">Memory</a>();</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; o._owner = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1_memory_xhtml"><div class="ttname"><a href="classarm__compute_1_1_memory.xhtml">arm_compute::Memory</a></div><div class="ttdoc">CPU implementation of memory object.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_8h_source.xhtml#l00037">Memory.h:37</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_allocator_xhtml_af97d553d2aa86688c92db8ed9a67cf0e"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_allocator.xhtml#af97d553d2aa86688c92db8ed9a67cf0e">arm_compute::ITensorAllocator::ITensorAllocator</a></div><div class="ttdeci">ITensorAllocator()</div><div class="ttdoc">Default constructor.</div><div class="ttdef"><b>Definition:</b> <a href="_i_tensor_allocator_8cpp_source.xhtml#l00033">ITensorAllocator.cpp:33</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a6e509c2a177b0b29e9e2369535094dee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e509c2a177b0b29e9e2369535094dee">&#9670;&nbsp;</a></span>allocate()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void allocate </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Allocate size specified by <a class="el" href="classarm__compute_1_1_tensor_info.xhtml" title="Store the tensor&#39;s metadata.">TensorInfo</a> of CPU memory. </p>
<dl class="section note"><dt>Note</dt><dd>The tensor must not already be allocated when calling this function. </dd></dl>
<p>Implements <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#aa8a4946cd749d482dd996874d295af85">ITensorAllocator</a>.</p>
<p class="definition">Definition at line <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml#l00133">133</a> of file <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml">TensorAllocator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;{</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordflow">if</span>(_associated_memory_group == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160; {</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160; _memory.<a class="code" href="classarm__compute_1_1_memory.xhtml#af2d30bc4b38a0f4703ff154a39f1b422">set_owned_region</a>(support::cpp14::make_unique&lt;MemoryRegion&gt;(<a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a29737b25723597c9708c662c7088e6c3">info</a>().total_size(), <a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a32899157b4898866a4a58440f2f7b13f">alignment</a>()));</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160; }</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; {</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; _associated_memory_group-&gt;<a class="code" href="classarm__compute_1_1_memory_group_base.xhtml#a2e02f3a65b77943a43daed6f90970abf">finalize_memory</a>(_owner, _memory, <a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a29737b25723597c9708c662c7088e6c3">info</a>().total_size(), <a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a32899157b4898866a4a58440f2f7b13f">alignment</a>());</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160; }</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; <a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a29737b25723597c9708c662c7088e6c3">info</a>().<a class="code" href="classarm__compute_1_1_tensor_info.xhtml#a78bf77b2d9b959259f77a32b9a412184">set_is_resizable</a>(<span class="keyword">false</span>);</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1_memory_xhtml_af2d30bc4b38a0f4703ff154a39f1b422"><div class="ttname"><a href="classarm__compute_1_1_memory.xhtml#af2d30bc4b38a0f4703ff154a39f1b422">arm_compute::Memory::set_owned_region</a></div><div class="ttdeci">void set_owned_region(std::unique_ptr&lt; IMemoryRegion &gt; region) final</div><div class="ttdoc">Sets a memory region.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_8cpp_source.xhtml#l00064">Memory.cpp:64</a></div></div>
<div class="ttc" id="classarm__compute_1_1_memory_group_base_xhtml_a2e02f3a65b77943a43daed6f90970abf"><div class="ttname"><a href="classarm__compute_1_1_memory_group_base.xhtml#a2e02f3a65b77943a43daed6f90970abf">arm_compute::MemoryGroupBase::finalize_memory</a></div><div class="ttdeci">void finalize_memory(TensorType *obj, IMemory &amp;obj_memory, size_t size, size_t alignment=0)</div><div class="ttdoc">Finalizes memory for a given object.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_group_base_8h_source.xhtml#l00120">MemoryGroupBase.h:120</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_allocator_xhtml_a32899157b4898866a4a58440f2f7b13f"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a32899157b4898866a4a58440f2f7b13f">arm_compute::ITensorAllocator::alignment</a></div><div class="ttdeci">size_t alignment() const</div><div class="ttdoc">Return underlying's tensor buffer alignment.</div><div class="ttdef"><b>Definition:</b> <a href="_i_tensor_allocator_8cpp_source.xhtml#l00054">ITensorAllocator.cpp:54</a></div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml_a78bf77b2d9b959259f77a32b9a412184"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml#a78bf77b2d9b959259f77a32b9a412184">arm_compute::TensorInfo::set_is_resizable</a></div><div class="ttdeci">ITensorInfo &amp; set_is_resizable(bool is_resizable) override</div><div class="ttdoc">Set the flag whether the tensor size can be changed.</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00280">TensorInfo.h:280</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_allocator_xhtml_a29737b25723597c9708c662c7088e6c3"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a29737b25723597c9708c662c7088e6c3">arm_compute::ITensorAllocator::info</a></div><div class="ttdeci">TensorInfo &amp; info()</div><div class="ttdoc">Return a reference to the tensor's metadata.</div><div class="ttdef"><b>Definition:</b> <a href="_i_tensor_allocator_8cpp_source.xhtml#l00044">ITensorAllocator.cpp:44</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_i_tensor_allocator_8cpp_source.xhtml#l00054">ITensorAllocator::alignment()</a>, <a class="el" href="_memory_group_base_8h_source.xhtml#l00120">MemoryGroupBase&lt; TensorType &gt;::finalize_memory()</a>, <a class="el" href="_i_tensor_allocator_8cpp_source.xhtml#l00044">ITensorAllocator::info()</a>, <a class="el" href="_tensor_info_8h_source.xhtml#l00280">TensorInfo::set_is_resizable()</a>, and <a class="el" href="_memory_8cpp_source.xhtml#l00064">Memory::set_owned_region()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_tensor_handle_8cpp_source.xhtml#l00041">NETensorHandle::allocate()</a>, <a class="el" href="_n_e_g_e_m_m_lowp_assembly_matrix_multiply_core_8cpp_source.xhtml#l00046">NEGEMMLowpAssemblyMatrixMultiplyCore::configure()</a>, <a class="el" href="_n_e_f_f_t2_d_8cpp_source.xhtml#l00037">NEFFT2D::configure()</a>, <a class="el" href="_n_e_l2_normalize_layer_8cpp_source.xhtml#l00041">NEL2NormalizeLayer::configure()</a>, <a class="el" href="_n_e_scale_8cpp_source.xhtml#l00105">NEScale::configure()</a>, <a class="el" href="_n_e_f_f_t1_d_8cpp_source.xhtml#l00038">NEFFT1D::configure()</a>, <a class="el" href="_n_e_h_o_g_descriptor_8cpp_source.xhtml#l00039">NEHOGDescriptor::configure()</a>, <a class="el" href="_n_e_normalization_layer_8cpp_source.xhtml#l00040">NENormalizationLayer::configure()</a>, <a class="el" href="_n_e_gaussian5x5_8cpp_source.xhtml#l00040">NEGaussian5x5::configure()</a>, <a class="el" href="_n_e_h_o_g_gradient_8cpp_source.xhtml#l00042">NEHOGGradient::configure()</a>, <a class="el" href="_n_e_r_n_n_layer_8cpp_source.xhtml#l00067">NERNNLayer::configure()</a>, <a class="el" href="_n_e_sobel5x5_8cpp_source.xhtml#l00040">NESobel5x5::configure()</a>, <a class="el" href="_n_e_sobel7x7_8cpp_source.xhtml#l00040">NESobel7x7::configure()</a>, <a class="el" href="_n_e_fast_corners_8cpp_source.xhtml#l00050">NEFastCorners::configure()</a>, <a class="el" href="_c_p_p_detection_post_process_layer_8cpp_source.xhtml#l00191">CPPDetectionPostProcessLayer::configure()</a>, <a class="el" href="_n_e_depthwise_convolution_assembly_dispatch_8cpp_source.xhtml#l00267">NEDepthwiseConvolutionAssemblyDispatch::configure()</a>, <a class="el" href="_n_e_softmax_layer_8cpp_source.xhtml#l00071">NESoftmaxLayer::configure()</a>, <a class="el" href="_n_e_winograd_convolution_layer_8cpp_source.xhtml#l00244">NEWinogradConvolutionLayer::configure()</a>, <a class="el" href="_n_e_locally_connected_layer_8cpp_source.xhtml#l00124">NELocallyConnectedLayer::configure()</a>, <a class="el" href="_n_e_g_e_m_m_8cpp_source.xhtml#l00051">NEGEMM::configure()</a>, <a class="el" href="_n_e_canny_edge_8cpp_source.xhtml#l00061">NECannyEdge::configure()</a>, <a class="el" href="_n_e_harris_corners_8cpp_source.xhtml#l00062">NEHarrisCorners::configure()</a>, <a class="el" href="_n_e_h_o_g_multi_detection_8cpp_source.xhtml#l00054">NEHOGMultiDetection::configure()</a>, <a class="el" href="_n_e_f_f_t_convolution_layer_8cpp_source.xhtml#l00097">NEFFTConvolutionLayer::configure()</a>, <a class="el" href="_n_e_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00050">NEGEMMLowpMatrixMultiplyCore::configure()</a>, <a class="el" href="_n_e_l_s_t_m_layer_8cpp_source.xhtml#l00056">NELSTMLayer::configure()</a>, <a class="el" href="_n_e_l_s_t_m_layer_quantized_8cpp_source.xhtml#l00057">NELSTMLayerQuantized::configure()</a>, <a class="el" href="_n_e_deconvolution_layer_8cpp_source.xhtml#l00115">NEDeconvolutionLayer::configure()</a>, <a class="el" href="_n_e_fully_connected_layer_8cpp_source.xhtml#l00139">NEFullyConnectedLayer::configure()</a>, <a class="el" href="_n_e_g_e_m_m_interleaved_wrapper_8cpp_source.xhtml#l00342">NEGEMMInterleavedWrapper::configure()</a>, <a class="el" href="_n_e_g_e_m_m_convolution_layer_8cpp_source.xhtml#l00241">NEGEMMConvolutionLayer::configure()</a>, <a class="el" href="_n_e_depthwise_convolution_layer_8cpp_source.xhtml#l00711">NEDepthwiseConvolutionLayer::configure()</a>, <a class="el" href="_graph_utils_8cpp_source.xhtml#l00143">NumPyAccessor::NumPyAccessor()</a>, <a class="el" href="_n_e_winograd_convolution_layer_8cpp_source.xhtml#l00663">NEWinogradConvolutionLayer::prepare()</a>, <a class="el" href="_n_e_locally_connected_layer_8cpp_source.xhtml#l00183">NELocallyConnectedLayer::prepare()</a>, <a class="el" href="_n_e_g_e_m_m_8cpp_source.xhtml#l00273">NEGEMM::prepare()</a>, <a class="el" href="_n_e_depthwise_convolution_layer_8cpp_source.xhtml#l00343">NEDepthwiseConvolutionLayer3x3::prepare()</a>, <a class="el" href="_n_e_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00420">NEGEMMLowpMatrixMultiplyCore::prepare()</a>, <a class="el" href="_n_e_depthwise_convolution_assembly_dispatch_8cpp_source.xhtml#l00441">NEDepthwiseConvolutionAssemblyDispatch::prepare()</a>, <a class="el" href="_n_e_f_f_t_convolution_layer_8cpp_source.xhtml#l00337">NEFFTConvolutionLayer::prepare()</a>, <a class="el" href="_n_e_deconvolution_layer_8cpp_source.xhtml#l00234">NEDeconvolutionLayer::prepare()</a>, <a class="el" href="_n_e_g_e_m_m_interleaved_wrapper_8cpp_source.xhtml#l00196">NEGEMMInterleavedWrapper::prepare()</a>, <a class="el" href="_n_e_fully_connected_layer_8cpp_source.xhtml#l00380">NEFullyConnectedLayer::prepare()</a>, <a class="el" href="_n_e_l_s_t_m_layer_quantized_8cpp_source.xhtml#l00491">NELSTMLayerQuantized::prepare()</a>, <a class="el" href="_n_e_g_e_m_m_convolution_layer_8cpp_source.xhtml#l00600">NEGEMMConvolutionLayer::prepare()</a>, <a class="el" href="_n_e_depthwise_convolution_layer_8cpp_source.xhtml#l00677">NEDepthwiseConvolutionLayerOptimized::prepare()</a>, <a class="el" href="_n_e_depthwise_convolution_layer_8cpp_source.xhtml#l01011">NEDepthwiseConvolutionLayer::prepare()</a>, and <a class="el" href="tests_2validation_2_n_e_o_n_2_u_n_i_t_2_tensor_allocator_8cpp_source.xhtml#l00257">arm_compute::test::validation::TEST_CASE()</a>.</p>
</div>
</div>
<a id="a344325f71f51323330de47f307ebecfd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a344325f71f51323330de47f307ebecfd">&#9670;&nbsp;</a></span>data()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">uint8_t * data </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the pointer to the allocated data. </p>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the allocated data. </dd></dl>
<p class="definition">Definition at line <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml#l00128">128</a> of file <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml">TensorAllocator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;{</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="keywordflow">return</span> (_memory.<a class="code" href="classarm__compute_1_1_memory.xhtml#a146cb960b44f4b1fb11ef4420382021a">region</a>() == <span class="keyword">nullptr</span>) ? <span class="keyword">nullptr</span> : reinterpret_cast&lt;uint8_t *&gt;(_memory.<a class="code" href="classarm__compute_1_1_memory.xhtml#a146cb960b44f4b1fb11ef4420382021a">region</a>()-&gt;<a class="code" href="classarm__compute_1_1_i_memory_region.xhtml#af4cf95f81e1b269a31d2d9a7e0429a24">buffer</a>());</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1_memory_xhtml_a146cb960b44f4b1fb11ef4420382021a"><div class="ttname"><a href="classarm__compute_1_1_memory.xhtml#a146cb960b44f4b1fb11ef4420382021a">arm_compute::Memory::region</a></div><div class="ttdeci">IMemoryRegion * region() final</div><div class="ttdoc">Region accessor.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_8cpp_source.xhtml#l00048">Memory.cpp:48</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_memory_region_xhtml_af4cf95f81e1b269a31d2d9a7e0429a24"><div class="ttname"><a href="classarm__compute_1_1_i_memory_region.xhtml#af4cf95f81e1b269a31d2d9a7e0429a24">arm_compute::IMemoryRegion::buffer</a></div><div class="ttdeci">virtual void * buffer()=0</div><div class="ttdoc">Returns the pointer to the allocated data.</div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="classarm__compute_1_1_i_memory_region.xhtml#af4cf95f81e1b269a31d2d9a7e0429a24">IMemoryRegion::buffer()</a>, and <a class="el" href="_memory_8cpp_source.xhtml#l00048">Memory::region()</a>.</p>
<p class="reference">Referenced by <a class="el" href="runtime_2_tensor_8cpp_source.xhtml#l00043">Tensor::buffer()</a>.</p>
</div>
</div>
<a id="a1468b0adb6ec3f9d38aa7d60b8a91974"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1468b0adb6ec3f9d38aa7d60b8a91974">&#9670;&nbsp;</a></span>free()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void free </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Free allocated CPU memory. </p>
<dl class="section note"><dt>Note</dt><dd>The tensor must have been allocated when calling this function. </dd></dl>
<p>Implements <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a1781eecaabd2bc97d074437d01b2c683">ITensorAllocator</a>.</p>
<p class="definition">Definition at line <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml#l00146">146</a> of file <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml">TensorAllocator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;{</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; _memory.<a class="code" href="classarm__compute_1_1_memory.xhtml#a5e343ebd0fb1c7816e7abfee53d2578b">set_region</a>(<span class="keyword">nullptr</span>);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; <a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a29737b25723597c9708c662c7088e6c3">info</a>().<a class="code" href="classarm__compute_1_1_tensor_info.xhtml#a78bf77b2d9b959259f77a32b9a412184">set_is_resizable</a>(<span class="keyword">true</span>);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1_memory_xhtml_a5e343ebd0fb1c7816e7abfee53d2578b"><div class="ttname"><a href="classarm__compute_1_1_memory.xhtml#a5e343ebd0fb1c7816e7abfee53d2578b">arm_compute::Memory::set_region</a></div><div class="ttdeci">void set_region(IMemoryRegion *region) final</div><div class="ttdoc">Sets a memory region.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_8cpp_source.xhtml#l00058">Memory.cpp:58</a></div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml_a78bf77b2d9b959259f77a32b9a412184"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml#a78bf77b2d9b959259f77a32b9a412184">arm_compute::TensorInfo::set_is_resizable</a></div><div class="ttdeci">ITensorInfo &amp; set_is_resizable(bool is_resizable) override</div><div class="ttdoc">Set the flag whether the tensor size can be changed.</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00280">TensorInfo.h:280</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_allocator_xhtml_a29737b25723597c9708c662c7088e6c3"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a29737b25723597c9708c662c7088e6c3">arm_compute::ITensorAllocator::info</a></div><div class="ttdeci">TensorInfo &amp; info()</div><div class="ttdoc">Return a reference to the tensor's metadata.</div><div class="ttdef"><b>Definition:</b> <a href="_i_tensor_allocator_8cpp_source.xhtml#l00044">ITensorAllocator.cpp:44</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_i_tensor_allocator_8cpp_source.xhtml#l00044">ITensorAllocator::info()</a>, <a class="el" href="_tensor_info_8h_source.xhtml#l00280">TensorInfo::set_is_resizable()</a>, and <a class="el" href="_memory_8cpp_source.xhtml#l00058">Memory::set_region()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_direct_convolution_layer_8cpp_source.xhtml#l00042">NEDirectConvolutionLayer::configure()</a>, <a class="el" href="_n_e_tensor_handle_8cpp_source.xhtml#l00046">NETensorHandle::free()</a>, <a class="el" href="_n_e_winograd_convolution_layer_8cpp_source.xhtml#l00663">NEWinogradConvolutionLayer::prepare()</a>, <a class="el" href="_n_e_depthwise_convolution_layer_8cpp_source.xhtml#l00343">NEDepthwiseConvolutionLayer3x3::prepare()</a>, <a class="el" href="_n_e_f_f_t_convolution_layer_8cpp_source.xhtml#l00337">NEFFTConvolutionLayer::prepare()</a>, <a class="el" href="_n_e_deconvolution_layer_8cpp_source.xhtml#l00234">NEDeconvolutionLayer::prepare()</a>, <a class="el" href="_n_e_l_s_t_m_layer_quantized_8cpp_source.xhtml#l00491">NELSTMLayerQuantized::prepare()</a>, <a class="el" href="_n_e_g_e_m_m_convolution_layer_8cpp_source.xhtml#l00600">NEGEMMConvolutionLayer::prepare()</a>, <a class="el" href="_n_e_depthwise_convolution_layer_8cpp_source.xhtml#l00677">NEDepthwiseConvolutionLayerOptimized::prepare()</a>, <a class="el" href="_n_e_tensor_handle_8cpp_source.xhtml#l00069">NETensorHandle::release_if_unused()</a>, and <a class="el" href="tests_2validation_2_n_e_o_n_2_u_n_i_t_2_tensor_allocator_8cpp_source.xhtml#l00145">arm_compute::test::validation::TEST_CASE()</a>.</p>
</div>
</div>
<a id="a84052cebf66a6126051a166a078253a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84052cebf66a6126051a166a078253a4">&#9670;&nbsp;</a></span>import_memory()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_status.xhtml">Status</a> import_memory </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>memory</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Import an existing memory as a tensor's backing memory. </p>
<dl class="section warning"><dt>Warning</dt><dd>size is expected to be compliant with total_size reported by <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml" title="Store the tensor&#39;s metadata.">ITensorInfo</a>. </dd>
<dd>
ownership of memory is not transferred. </dd>
<dd>
tensor shouldn't be memory managed. </dd>
<dd>
padding should be accounted by the client code. </dd>
<dd>
memory must be writable in case of in-place operations </dd></dl>
<dl class="section note"><dt>Note</dt><dd>buffer alignment will be checked to be compliant with alignment reported by <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml" title="Store the tensor&#39;s metadata.">ITensorInfo</a>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">memory</td><td>Raw memory pointer to be used as backing memory</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An error status </dd></dl>
<p class="definition">Definition at line <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml#l00152">152</a> of file <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml">TensorAllocator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;{</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <a class="code" href="_error_8h.xhtml#a206d6e247e0957ac3dee45d27756fc25">ARM_COMPUTE_RETURN_ERROR_ON</a>(memory == <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <a class="code" href="_error_8h.xhtml#a206d6e247e0957ac3dee45d27756fc25">ARM_COMPUTE_RETURN_ERROR_ON</a>(_associated_memory_group != <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <a class="code" href="_error_8h.xhtml#a206d6e247e0957ac3dee45d27756fc25">ARM_COMPUTE_RETURN_ERROR_ON</a>(<a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a32899157b4898866a4a58440f2f7b13f">alignment</a>() != 0 &amp;&amp; !<a class="code" href="namespacearm__compute_1_1utility.xhtml#a9eed476cf46a22a3ce6ebd8ba22e8945">arm_compute::utility::check_aligned</a>(memory, <a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a32899157b4898866a4a58440f2f7b13f">alignment</a>()));</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; _memory.<a class="code" href="classarm__compute_1_1_memory.xhtml#af2d30bc4b38a0f4703ff154a39f1b422">set_owned_region</a>(support::cpp14::make_unique&lt;MemoryRegion&gt;(memory, <a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a29737b25723597c9708c662c7088e6c3">info</a>().total_size()));</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a29737b25723597c9708c662c7088e6c3">info</a>().<a class="code" href="classarm__compute_1_1_tensor_info.xhtml#a78bf77b2d9b959259f77a32b9a412184">set_is_resizable</a>(<span class="keyword">false</span>);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1_status.xhtml">Status</a>{};</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1_status_xhtml"><div class="ttname"><a href="classarm__compute_1_1_status.xhtml">arm_compute::Status</a></div><div class="ttdoc">Status class.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00052">Error.h:52</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a206d6e247e0957ac3dee45d27756fc25"><div class="ttname"><a href="_error_8h.xhtml#a206d6e247e0957ac3dee45d27756fc25">ARM_COMPUTE_RETURN_ERROR_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_RETURN_ERROR_ON(cond)</div><div class="ttdoc">If the condition is true, an error is returned.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00244">Error.h:244</a></div></div>
<div class="ttc" id="classarm__compute_1_1_memory_xhtml_af2d30bc4b38a0f4703ff154a39f1b422"><div class="ttname"><a href="classarm__compute_1_1_memory.xhtml#af2d30bc4b38a0f4703ff154a39f1b422">arm_compute::Memory::set_owned_region</a></div><div class="ttdeci">void set_owned_region(std::unique_ptr&lt; IMemoryRegion &gt; region) final</div><div class="ttdoc">Sets a memory region.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_8cpp_source.xhtml#l00064">Memory.cpp:64</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_allocator_xhtml_a32899157b4898866a4a58440f2f7b13f"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a32899157b4898866a4a58440f2f7b13f">arm_compute::ITensorAllocator::alignment</a></div><div class="ttdeci">size_t alignment() const</div><div class="ttdoc">Return underlying's tensor buffer alignment.</div><div class="ttdef"><b>Definition:</b> <a href="_i_tensor_allocator_8cpp_source.xhtml#l00054">ITensorAllocator.cpp:54</a></div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml_a78bf77b2d9b959259f77a32b9a412184"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml#a78bf77b2d9b959259f77a32b9a412184">arm_compute::TensorInfo::set_is_resizable</a></div><div class="ttdeci">ITensorInfo &amp; set_is_resizable(bool is_resizable) override</div><div class="ttdoc">Set the flag whether the tensor size can be changed.</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00280">TensorInfo.h:280</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_allocator_xhtml_a29737b25723597c9708c662c7088e6c3"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a29737b25723597c9708c662c7088e6c3">arm_compute::ITensorAllocator::info</a></div><div class="ttdeci">TensorInfo &amp; info()</div><div class="ttdoc">Return a reference to the tensor's metadata.</div><div class="ttdef"><b>Definition:</b> <a href="_i_tensor_allocator_8cpp_source.xhtml#l00044">ITensorAllocator.cpp:44</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1utility_xhtml_a9eed476cf46a22a3ce6ebd8ba22e8945"><div class="ttname"><a href="namespacearm__compute_1_1utility.xhtml#a9eed476cf46a22a3ce6ebd8ba22e8945">arm_compute::utility::check_aligned</a></div><div class="ttdeci">bool check_aligned(void *ptr, const size_t alignment)</div><div class="ttdoc">Checks if a pointer complies with a given alignment.</div><div class="ttdef"><b>Definition:</b> <a href="_utility_8h_source.xhtml#l00177">Utility.h:177</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_i_tensor_allocator_8cpp_source.xhtml#l00054">ITensorAllocator::alignment()</a>, <a class="el" href="_error_8h_source.xhtml#l00244">ARM_COMPUTE_RETURN_ERROR_ON</a>, <a class="el" href="_utility_8h_source.xhtml#l00177">arm_compute::utility::check_aligned()</a>, <a class="el" href="_i_tensor_allocator_8cpp_source.xhtml#l00044">ITensorAllocator::info()</a>, <a class="el" href="_tensor_info_8h_source.xhtml#l00280">TensorInfo::set_is_resizable()</a>, and <a class="el" href="_memory_8cpp_source.xhtml#l00064">Memory::set_owned_region()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_f_f_t_convolution_layer_8cpp_source.xhtml#l00296">NEFFTConvolutionLayer::run()</a>, and <a class="el" href="tests_2validation_2_n_e_o_n_2_u_n_i_t_2_tensor_allocator_8cpp_source.xhtml#l00054">arm_compute::test::validation::TEST_CASE()</a>.</p>
</div>
</div>
<a id="af36143939a43fa124312e395975091ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af36143939a43fa124312e395975091ed">&#9670;&nbsp;</a></span>init() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void init</td>
</tr>
</table>
</div><div class="memdoc">
<p>Make <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml" title="Interface to allocate tensors.">ITensorAllocator</a>'s init methods available. </p>
<p class="definition">Definition at line <a class="el" href="_i_tensor_allocator_8cpp_source.xhtml#l00038">38</a> of file <a class="el" href="_i_tensor_allocator_8cpp_source.xhtml">ITensorAllocator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;{</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; _info = input;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; _alignment = <a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a32899157b4898866a4a58440f2f7b13f">alignment</a>;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1_i_tensor_allocator_xhtml_a32899157b4898866a4a58440f2f7b13f"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a32899157b4898866a4a58440f2f7b13f">arm_compute::ITensorAllocator::alignment</a></div><div class="ttdeci">size_t alignment() const</div><div class="ttdoc">Return underlying's tensor buffer alignment.</div><div class="ttdef"><b>Definition:</b> <a href="_i_tensor_allocator_8cpp_source.xhtml#l00054">ITensorAllocator.cpp:54</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a3fc6adad84b23f10d54d5a7b6928f872"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3fc6adad84b23f10d54d5a7b6928f872">&#9670;&nbsp;</a></span>init() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void init </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&#160;</td>
<td class="paramname"><em>allocator</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;&#160;</td>
<td class="paramname"><em>coords</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>sub_info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Shares the same backing memory with another tensor allocator, while the tensor info might be different. </p>
<p>In other words this can be used to create a sub-tensor from another tensor while sharing the same memory.</p>
<dl class="section note"><dt>Note</dt><dd><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml" title="Basic implementation of a CPU memory tensor allocator.">TensorAllocator</a> have to be of the same specialized type.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">allocator</td><td>The allocator that owns the backing memory to be shared. Ownership becomes shared afterwards. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">coords</td><td>The starting coordinates of the new tensor inside the parent tensor. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">sub_info</td><td>The new tensor information (e.g. shape etc) </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml#l00108">108</a> of file <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml">TensorAllocator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160;{</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="comment">// Get parent info</span></div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a> parent_info = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a817d7768d04140a832d2cb27f83edb12">allocator</a>.info();</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <span class="comment">// Check if coordinates and new shape are within the parent tensor</span></div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(!validate_subtensor_shape(parent_info, sub_info, coords));</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <a class="code" href="_error_8h.xhtml#a6dc630a6ae9cc063b3924bcea8dee9d6">ARM_COMPUTE_UNUSED</a>(validate_subtensor_shape);</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <span class="comment">// Copy pointer to buffer</span></div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; _memory = <a class="code" href="classarm__compute_1_1_memory.xhtml">Memory</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a817d7768d04140a832d2cb27f83edb12">allocator</a>._memory.region());</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="comment">// Init tensor info with new dimensions</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <span class="keywordtype">size_t</span> total_size = parent_info.<a class="code" href="classarm__compute_1_1_tensor_info.xhtml#a147790358ccd40f61dcd618cd4edd688">offset_element_in_bytes</a>(coords) + sub_info.<a class="code" href="classarm__compute_1_1_tensor_info.xhtml#af398466b602a02b42d8df19fb66a6c60">total_size</a>() - sub_info.<a class="code" href="classarm__compute_1_1_tensor_info.xhtml#ab54246abe670b06f5624add7e7022904">offset_first_element_in_bytes</a>();</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; sub_info.<a class="code" href="classarm__compute_1_1_tensor_info.xhtml#ad6b64f33be1e66dcf7612483ffb8fd63">init</a>(sub_info.<a class="code" href="classarm__compute_1_1_tensor_info.xhtml#a269b19ce3f357ac65f41f9951906e38e">tensor_shape</a>(), sub_info.<a class="code" href="classarm__compute_1_1_tensor_info.xhtml#ac4b36cc1e56b0b7e579bb4b7196490db">format</a>(), parent_info.<a class="code" href="classarm__compute_1_1_tensor_info.xhtml#a5f1ca9d674346287cae57a6c5b5c24ec">strides_in_bytes</a>(), parent_info.<a class="code" href="classarm__compute_1_1_tensor_info.xhtml#a147790358ccd40f61dcd618cd4edd688">offset_element_in_bytes</a>(coords), total_size);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="comment">// Set TensorInfo</span></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <a class="code" href="classarm__compute_1_1_tensor_allocator.xhtml#a3fc6adad84b23f10d54d5a7b6928f872">init</a>(sub_info);</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1_memory_xhtml"><div class="ttname"><a href="classarm__compute_1_1_memory.xhtml">arm_compute::Memory</a></div><div class="ttdoc">CPU implementation of memory object.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_8h_source.xhtml#l00037">Memory.h:37</a></div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_allocator_xhtml_a3fc6adad84b23f10d54d5a7b6928f872"><div class="ttname"><a href="classarm__compute_1_1_tensor_allocator.xhtml#a3fc6adad84b23f10d54d5a7b6928f872">arm_compute::TensorAllocator::init</a></div><div class="ttdeci">void init(const TensorAllocator &amp;allocator, const Coordinates &amp;coords, TensorInfo &amp;sub_info)</div><div class="ttdoc">Shares the same backing memory with another tensor allocator, while the tensor info might be differen...</div><div class="ttdef"><b>Definition:</b> <a href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml#l00108">TensorAllocator.cpp:108</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON(cond)</div><div class="ttdoc">If the condition is true then an error message is printed and an exception thrown.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00337">Error.h:337</a></div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml_a5f1ca9d674346287cae57a6c5b5c24ec"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml#a5f1ca9d674346287cae57a6c5b5c24ec">arm_compute::TensorInfo::strides_in_bytes</a></div><div class="ttdeci">const Strides &amp; strides_in_bytes() const override</div><div class="ttdoc">The strides in bytes for accessing each dimension of the tensor.</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00231">TensorInfo.h:231</a></div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml_ac4b36cc1e56b0b7e579bb4b7196490db"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml#ac4b36cc1e56b0b7e579bb4b7196490db">arm_compute::TensorInfo::format</a></div><div class="ttdeci">Format format() const override</div><div class="ttdoc">Colour format of the image.</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00260">TensorInfo.h:260</a></div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml_a147790358ccd40f61dcd618cd4edd688"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml#a147790358ccd40f61dcd618cd4edd688">arm_compute::TensorInfo::offset_element_in_bytes</a></div><div class="ttdeci">size_t offset_element_in_bytes(const Coordinates &amp;pos) const override</div><div class="ttdoc">The offset in bytes from the beginning of the memory allocation to access the element at position (x,...</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_tensor_info_8cpp_source.xhtml#l00386">TensorInfo.cpp:386</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a6dc630a6ae9cc063b3924bcea8dee9d6"><div class="ttname"><a href="_error_8h.xhtml#a6dc630a6ae9cc063b3924bcea8dee9d6">ARM_COMPUTE_UNUSED</a></div><div class="ttdeci">#define ARM_COMPUTE_UNUSED(...)</div><div class="ttdoc">To avoid unused variables warnings.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00160">Error.h:160</a></div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml_af398466b602a02b42d8df19fb66a6c60"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml#af398466b602a02b42d8df19fb66a6c60">arm_compute::TensorInfo::total_size</a></div><div class="ttdeci">size_t total_size() const override</div><div class="ttdoc">Returns the total size of the tensor in bytes.</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00264">TensorInfo.h:264</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a817d7768d04140a832d2cb27f83edb12"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a817d7768d04140a832d2cb27f83edb12">arm_compute::test::validation::allocator</a></div><div class="ttdeci">src_target allocator() -&gt; allocate()</div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml_ad6b64f33be1e66dcf7612483ffb8fd63"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml#ad6b64f33be1e66dcf7612483ffb8fd63">arm_compute::TensorInfo::init</a></div><div class="ttdeci">void init(Format format)</div><div class="ttdoc">Initialize the tensor info with just a format.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_tensor_info_8cpp_source.xhtml#l00099">TensorInfo.cpp:99</a></div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml_ab54246abe670b06f5624add7e7022904"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml#ab54246abe670b06f5624add7e7022904">arm_compute::TensorInfo::offset_first_element_in_bytes</a></div><div class="ttdeci">size_t offset_first_element_in_bytes() const override</div><div class="ttdoc">The offset from the beginning of the memory allocation to the first element of the tensor.</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00235">TensorInfo.h:235</a></div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml">arm_compute::TensorInfo</a></div><div class="ttdoc">Store the tensor's metadata.</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00045">TensorInfo.h:45</a></div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml_a269b19ce3f357ac65f41f9951906e38e"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml#a269b19ce3f357ac65f41f9951906e38e">arm_compute::TensorInfo::tensor_shape</a></div><div class="ttdeci">const TensorShape &amp; tensor_shape() const override</div><div class="ttdoc">Size for each dimension of the tensor.</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00252">TensorInfo.h:252</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="namespacearm__compute_1_1test_1_1validation.xhtml#a817d7768d04140a832d2cb27f83edb12">arm_compute::test::validation::allocator()</a>, <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_error_8h_source.xhtml#l00160">ARM_COMPUTE_UNUSED</a>, <a class="el" href="_tensor_info_8h_source.xhtml#l00260">TensorInfo::format()</a>, <a class="el" href="src_2core_2_tensor_info_8cpp_source.xhtml#l00099">TensorInfo::init()</a>, <a class="el" href="src_2core_2_tensor_info_8cpp_source.xhtml#l00386">TensorInfo::offset_element_in_bytes()</a>, <a class="el" href="_tensor_info_8h_source.xhtml#l00235">TensorInfo::offset_first_element_in_bytes()</a>, <a class="el" href="_tensor_info_8h_source.xhtml#l00231">TensorInfo::strides_in_bytes()</a>, <a class="el" href="_tensor_info_8h_source.xhtml#l00252">TensorInfo::tensor_shape()</a>, and <a class="el" href="_tensor_info_8h_source.xhtml#l00264">TensorInfo::total_size()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_g_e_m_m_lowp_assembly_matrix_multiply_core_8cpp_source.xhtml#l00046">NEGEMMLowpAssemblyMatrixMultiplyCore::configure()</a>, <a class="el" href="_n_e_scale_8cpp_source.xhtml#l00105">NEScale::configure()</a>, <a class="el" href="_n_e_f_f_t1_d_8cpp_source.xhtml#l00038">NEFFT1D::configure()</a>, <a class="el" href="_n_e_h_o_g_descriptor_8cpp_source.xhtml#l00039">NEHOGDescriptor::configure()</a>, <a class="el" href="_n_e_gaussian5x5_8cpp_source.xhtml#l00040">NEGaussian5x5::configure()</a>, <a class="el" href="_n_e_h_o_g_gradient_8cpp_source.xhtml#l00042">NEHOGGradient::configure()</a>, <a class="el" href="_n_e_normalization_layer_8cpp_source.xhtml#l00040">NENormalizationLayer::configure()</a>, <a class="el" href="_n_e_r_n_n_layer_8cpp_source.xhtml#l00067">NERNNLayer::configure()</a>, <a class="el" href="_n_e_sobel5x5_8cpp_source.xhtml#l00040">NESobel5x5::configure()</a>, <a class="el" href="_n_e_sobel7x7_8cpp_source.xhtml#l00040">NESobel7x7::configure()</a>, <a class="el" href="_n_e_fast_corners_8cpp_source.xhtml#l00050">NEFastCorners::configure()</a>, <a class="el" href="_n_e_depthwise_convolution_assembly_dispatch_8cpp_source.xhtml#l00267">NEDepthwiseConvolutionAssemblyDispatch::configure()</a>, <a class="el" href="_n_e_winograd_convolution_layer_8cpp_source.xhtml#l00244">NEWinogradConvolutionLayer::configure()</a>, <a class="el" href="_n_e_softmax_layer_8cpp_source.xhtml#l00071">NESoftmaxLayer::configure()</a>, <a class="el" href="_n_e_locally_connected_layer_8cpp_source.xhtml#l00124">NELocallyConnectedLayer::configure()</a>, <a class="el" href="_n_e_g_e_m_m_8cpp_source.xhtml#l00051">NEGEMM::configure()</a>, <a class="el" href="_n_e_canny_edge_8cpp_source.xhtml#l00061">NECannyEdge::configure()</a>, <a class="el" href="_n_e_harris_corners_8cpp_source.xhtml#l00062">NEHarrisCorners::configure()</a>, <a class="el" href="_n_e_h_o_g_multi_detection_8cpp_source.xhtml#l00054">NEHOGMultiDetection::configure()</a>, <a class="el" href="_n_e_f_f_t_convolution_layer_8cpp_source.xhtml#l00097">NEFFTConvolutionLayer::configure()</a>, <a class="el" href="_n_e_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00050">NEGEMMLowpMatrixMultiplyCore::configure()</a>, <a class="el" href="_n_e_l_s_t_m_layer_8cpp_source.xhtml#l00056">NELSTMLayer::configure()</a>, <a class="el" href="_n_e_l_s_t_m_layer_quantized_8cpp_source.xhtml#l00057">NELSTMLayerQuantized::configure()</a>, <a class="el" href="_n_e_deconvolution_layer_8cpp_source.xhtml#l00115">NEDeconvolutionLayer::configure()</a>, <a class="el" href="_n_e_fully_connected_layer_8cpp_source.xhtml#l00139">NEFullyConnectedLayer::configure()</a>, <a class="el" href="_n_e_g_e_m_m_interleaved_wrapper_8cpp_source.xhtml#l00342">NEGEMMInterleavedWrapper::configure()</a>, <a class="el" href="_n_e_g_e_m_m_convolution_layer_8cpp_source.xhtml#l00241">NEGEMMConvolutionLayer::configure()</a>, <a class="el" href="_n_e_depthwise_convolution_layer_8cpp_source.xhtml#l00711">NEDepthwiseConvolutionLayer::configure()</a>, <a class="el" href="_n_e_tensor_handle_8cpp_source.xhtml#l00035">NETensorHandle::NETensorHandle()</a>, <a class="el" href="_graph_utils_8cpp_source.xhtml#l00143">NumPyAccessor::NumPyAccessor()</a>, and <a class="el" href="tests_2validation_2_n_e_o_n_2_u_n_i_t_2_tensor_allocator_8cpp_source.xhtml#l00054">arm_compute::test::validation::TEST_CASE()</a>.</p>
</div>
</div>
<a id="a943854ce6f3aafac2714340e0915de75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a943854ce6f3aafac2714340e0915de75">&#9670;&nbsp;</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="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a>&amp; operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Prevent instances of this class from being copy assigned (As this class contains pointers) </p>
</div>
</div>
<a id="ace0f71b15cbb5b468070f5a2fd4110ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ace0f71b15cbb5b468070f5a2fd4110ad">&#9670;&nbsp;</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="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp; operator= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a> &amp;&amp;&#160;</td>
<td class="paramname"><em>o</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Allow instances of this class to be moved. </p>
<p class="definition">Definition at line <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml#l00090">90</a> of file <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml">TensorAllocator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;{</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keywordflow">if</span>(&amp;o != <span class="keyword">this</span>)</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; {</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; _associated_memory_group = o._associated_memory_group;</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; o._associated_memory_group = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; _memory = std::move(o._memory);</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; o._memory = <a class="code" href="classarm__compute_1_1_memory.xhtml">Memory</a>();</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; _owner = o._owner;</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; o._owner = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; <a class="code" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a12e5f2915e2461321b130dcf84f3e268">ITensorAllocator::operator=</a>(std::move(o));</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; }</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;}</div><div class="ttc" id="classarm__compute_1_1_memory_xhtml"><div class="ttname"><a href="classarm__compute_1_1_memory.xhtml">arm_compute::Memory</a></div><div class="ttdoc">CPU implementation of memory object.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_8h_source.xhtml#l00037">Memory.h:37</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_allocator_xhtml_a12e5f2915e2461321b130dcf84f3e268"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_allocator.xhtml#a12e5f2915e2461321b130dcf84f3e268">arm_compute::ITensorAllocator::operator=</a></div><div class="ttdeci">ITensorAllocator &amp; operator=(const ITensorAllocator &amp;)=default</div><div class="ttdoc">Allow instances of this class to be copied.</div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="classarm__compute_1_1_i_tensor_allocator.xhtml#a12e5f2915e2461321b130dcf84f3e268">ITensorAllocator::operator=()</a>.</p>
</div>
</div>
<a id="a89ee265e94df4e8aaf4f465649d4e065"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89ee265e94df4e8aaf4f465649d4e065">&#9670;&nbsp;</a></span>set_associated_memory_group()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void set_associated_memory_group </td>
<td>(</td>
<td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a0e7a03e2e133cb1fbb12517a3f646a09">MemoryGroup</a> *&#160;</td>
<td class="paramname"><em>associated_memory_group</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Associates the tensor with a memory group. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">associated_memory_group</td><td><a class="el" href="classarm__compute_1_1_memory.xhtml" title="CPU implementation of memory object.">Memory</a> group to associate the tensor with </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml#l00164">164</a> of file <a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml">TensorAllocator.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;{</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(associated_memory_group == <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(_associated_memory_group != <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(_memory.<a class="code" href="classarm__compute_1_1_memory.xhtml#a146cb960b44f4b1fb11ef4420382021a">region</a>() != <span class="keyword">nullptr</span> &amp;&amp; _memory.<a class="code" href="classarm__compute_1_1_memory.xhtml#a146cb960b44f4b1fb11ef4420382021a">region</a>()-&gt;<a class="code" href="classarm__compute_1_1_i_memory_region.xhtml#af4cf95f81e1b269a31d2d9a7e0429a24">buffer</a>() != <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; _associated_memory_group = associated_memory_group;</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON(cond)</div><div class="ttdoc">If the condition is true then an error message is printed and an exception thrown.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00337">Error.h:337</a></div></div>
<div class="ttc" id="classarm__compute_1_1_memory_xhtml_a146cb960b44f4b1fb11ef4420382021a"><div class="ttname"><a href="classarm__compute_1_1_memory.xhtml#a146cb960b44f4b1fb11ef4420382021a">arm_compute::Memory::region</a></div><div class="ttdeci">IMemoryRegion * region() final</div><div class="ttdoc">Region accessor.</div><div class="ttdef"><b>Definition:</b> <a href="_memory_8cpp_source.xhtml#l00048">Memory.cpp:48</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_memory_region_xhtml_af4cf95f81e1b269a31d2d9a7e0429a24"><div class="ttname"><a href="classarm__compute_1_1_i_memory_region.xhtml#af4cf95f81e1b269a31d2d9a7e0429a24">arm_compute::IMemoryRegion::buffer</a></div><div class="ttdeci">virtual void * buffer()=0</div><div class="ttdoc">Returns the pointer to the allocated data.</div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="classarm__compute_1_1_i_memory_region.xhtml#af4cf95f81e1b269a31d2d9a7e0429a24">IMemoryRegion::buffer()</a>, and <a class="el" href="_memory_8cpp_source.xhtml#l00048">Memory::region()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>arm_compute/runtime/<a class="el" href="_tensor_allocator_8h_source.xhtml">TensorAllocator.h</a></li>
<li>src/runtime/<a class="el" href="src_2runtime_2_tensor_allocator_8cpp_source.xhtml">TensorAllocator.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1_tensor_allocator.xhtml">TensorAllocator</a></li>
<li class="footer">Generated on Mon Sep 2 2019 11:47:38 for Compute Library by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
</ul>
</div>
</body>
</html>