blob: 556b0b57ec70704570f915f0372a0c0a728e2fe6 [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: MemoryRegion 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">20.02.1</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_memory_region.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">MemoryRegion Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classarm__compute_1_1_memory.xhtml" title="CPU implementation of memory object.">Memory</a> region CPU implementation.
<a href="classarm__compute_1_1_memory_region.xhtml#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_memory_region_8h_source.xhtml">MemoryRegion.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for MemoryRegion:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classarm__compute_1_1_memory_region__coll__graph.svg" width="130" 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:ad947765609255e0a67a384cd475fe83e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_memory_region.xhtml#ad947765609255e0a67a384cd475fe83e">MemoryRegion</a> (size_t <a class="el" href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a>, size_t alignment=0)</td></tr>
<tr class="memdesc:ad947765609255e0a67a384cd475fe83e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <a href="#ad947765609255e0a67a384cd475fe83e">More...</a><br /></td></tr>
<tr class="separator:ad947765609255e0a67a384cd475fe83e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee98ba000578ad694264595385997304"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_memory_region.xhtml#aee98ba000578ad694264595385997304">MemoryRegion</a> (void *ptr, size_t <a class="el" href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a>)</td></tr>
<tr class="separator:aee98ba000578ad694264595385997304"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32d4629fe7aa6093bbe54599319d08fa"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_memory_region.xhtml#a32d4629fe7aa6093bbe54599319d08fa">MemoryRegion</a> (const <a class="el" href="classarm__compute_1_1_memory_region.xhtml">MemoryRegion</a> &amp;)=delete</td></tr>
<tr class="memdesc:a32d4629fe7aa6093bbe54599319d08fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prevent instances of this class from being copied (As this class contains pointers) <a href="#a32d4629fe7aa6093bbe54599319d08fa">More...</a><br /></td></tr>
<tr class="separator:a32d4629fe7aa6093bbe54599319d08fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2306b6e5516e7ffa160156a4ba2739e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_memory_region.xhtml#ab2306b6e5516e7ffa160156a4ba2739e">MemoryRegion</a> (<a class="el" href="classarm__compute_1_1_memory_region.xhtml">MemoryRegion</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:ab2306b6e5516e7ffa160156a4ba2739e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default move constructor. <a href="#ab2306b6e5516e7ffa160156a4ba2739e">More...</a><br /></td></tr>
<tr class="separator:ab2306b6e5516e7ffa160156a4ba2739e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56244352ef17c3750434e3fd479859cb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_memory_region.xhtml">MemoryRegion</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_memory_region.xhtml#a56244352ef17c3750434e3fd479859cb">operator=</a> (const <a class="el" href="classarm__compute_1_1_memory_region.xhtml">MemoryRegion</a> &amp;)=delete</td></tr>
<tr class="memdesc:a56244352ef17c3750434e3fd479859cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prevent instances of this class from being copied (As this class contains pointers) <a href="#a56244352ef17c3750434e3fd479859cb">More...</a><br /></td></tr>
<tr class="separator:a56244352ef17c3750434e3fd479859cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a532920766558c751318576ff10974178"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_memory_region.xhtml">MemoryRegion</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_memory_region.xhtml#a532920766558c751318576ff10974178">operator=</a> (<a class="el" href="classarm__compute_1_1_memory_region.xhtml">MemoryRegion</a> &amp;&amp;)=default</td></tr>
<tr class="memdesc:a532920766558c751318576ff10974178"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default move assignment operator. <a href="#a532920766558c751318576ff10974178">More...</a><br /></td></tr>
<tr class="separator:a532920766558c751318576ff10974178"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9ec7ea42f2074a78cc2bf89e4663a24"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_memory_region.xhtml#ab9ec7ea42f2074a78cc2bf89e4663a24">buffer</a> () final</td></tr>
<tr class="memdesc:ab9ec7ea42f2074a78cc2bf89e4663a24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the pointer to the allocated data. <a href="#ab9ec7ea42f2074a78cc2bf89e4663a24">More...</a><br /></td></tr>
<tr class="separator:ab9ec7ea42f2074a78cc2bf89e4663a24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a555561f81b4473f9098e178defb96e53"><td class="memItemLeft" align="right" valign="top">const void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_memory_region.xhtml#a555561f81b4473f9098e178defb96e53">buffer</a> () const final</td></tr>
<tr class="memdesc:a555561f81b4473f9098e178defb96e53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the pointer to the allocated data. <a href="#a555561f81b4473f9098e178defb96e53">More...</a><br /></td></tr>
<tr class="separator:a555561f81b4473f9098e178defb96e53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa09a1dba8208c55ec9dd21ce4d4359a5"><td class="memItemLeft" align="right" valign="top">std::unique_ptr&lt; <a class="el" href="classarm__compute_1_1_i_memory_region.xhtml">IMemoryRegion</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_memory_region.xhtml#aa09a1dba8208c55ec9dd21ce4d4359a5">extract_subregion</a> (size_t <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>, size_t <a class="el" href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a>) final</td></tr>
<tr class="memdesc:aa09a1dba8208c55ec9dd21ce4d4359a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extract a sub-region from the memory. <a href="#aa09a1dba8208c55ec9dd21ce4d4359a5">More...</a><br /></td></tr>
<tr class="separator:aa09a1dba8208c55ec9dd21ce4d4359a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classarm__compute_1_1_i_memory_region"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarm__compute_1_1_i_memory_region')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classarm__compute_1_1_i_memory_region.xhtml">IMemoryRegion</a></td></tr>
<tr class="memitem:a92ee6f66a47e8ba4bd3d01579ad4ef42 inherit pub_methods_classarm__compute_1_1_i_memory_region"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_memory_region.xhtml#a92ee6f66a47e8ba4bd3d01579ad4ef42">IMemoryRegion</a> (size_t <a class="el" href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a>)</td></tr>
<tr class="memdesc:a92ee6f66a47e8ba4bd3d01579ad4ef42 inherit pub_methods_classarm__compute_1_1_i_memory_region"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <a href="classarm__compute_1_1_i_memory_region.xhtml#a92ee6f66a47e8ba4bd3d01579ad4ef42">More...</a><br /></td></tr>
<tr class="separator:a92ee6f66a47e8ba4bd3d01579ad4ef42 inherit pub_methods_classarm__compute_1_1_i_memory_region"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa097212d2b66253335ff2dca6385b13 inherit pub_methods_classarm__compute_1_1_i_memory_region"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_memory_region.xhtml#aaa097212d2b66253335ff2dca6385b13">~IMemoryRegion</a> ()=default</td></tr>
<tr class="memdesc:aaa097212d2b66253335ff2dca6385b13 inherit pub_methods_classarm__compute_1_1_i_memory_region"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual Destructor. <a href="classarm__compute_1_1_i_memory_region.xhtml#aaa097212d2b66253335ff2dca6385b13">More...</a><br /></td></tr>
<tr class="separator:aaa097212d2b66253335ff2dca6385b13 inherit pub_methods_classarm__compute_1_1_i_memory_region"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a259cb5a711406a8c3e5d937eb9350cca inherit pub_methods_classarm__compute_1_1_i_memory_region"><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_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a> () const</td></tr>
<tr class="memdesc:a259cb5a711406a8c3e5d937eb9350cca inherit pub_methods_classarm__compute_1_1_i_memory_region"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classarm__compute_1_1_memory.xhtml" title="CPU implementation of memory object.">Memory</a> region size accessor. <a href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">More...</a><br /></td></tr>
<tr class="separator:a259cb5a711406a8c3e5d937eb9350cca inherit pub_methods_classarm__compute_1_1_i_memory_region"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5c159b7d0cdca9f543019f4f47ec288 inherit pub_methods_classarm__compute_1_1_i_memory_region"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_memory_region.xhtml#ab5c159b7d0cdca9f543019f4f47ec288">set_size</a> (size_t <a class="el" href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a>)</td></tr>
<tr class="memdesc:ab5c159b7d0cdca9f543019f4f47ec288 inherit pub_methods_classarm__compute_1_1_i_memory_region"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets size of region. <a href="classarm__compute_1_1_i_memory_region.xhtml#ab5c159b7d0cdca9f543019f4f47ec288">More...</a><br /></td></tr>
<tr class="separator:ab5c159b7d0cdca9f543019f4f47ec288 inherit pub_methods_classarm__compute_1_1_i_memory_region"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classarm__compute_1_1_memory.xhtml" title="CPU implementation of memory object.">Memory</a> region CPU implementation. </p>
<p class="definition">Definition at line <a class="el" href="_memory_region_8h_source.xhtml#l00037">37</a> of file <a class="el" href="_memory_region_8h_source.xhtml">MemoryRegion.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ad947765609255e0a67a384cd475fe83e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad947765609255e0a67a384cd475fe83e">&#9670;&nbsp;</a></span>MemoryRegion() <span class="overload">[1/4]</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_memory_region.xhtml">MemoryRegion</a> </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>alignment</em> = <code>0</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Region size </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">alignment</td><td>Alignment in bytes of the base pointer. Defaults to 0 </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_memory_region_8h_source.xhtml#l00045">45</a> of file <a class="el" href="_memory_region_8h_source.xhtml">MemoryRegion.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; : <a class="code" href="classarm__compute_1_1_i_memory_region.xhtml#a92ee6f66a47e8ba4bd3d01579ad4ef42">IMemoryRegion</a>(<a class="code" href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a>), _mem(<span class="keyword">nullptr</span>), _ptr(<span class="keyword">nullptr</span>)</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; {</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="keywordflow">if</span>(<a class="code" href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a> != 0)</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; {</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="comment">// Allocate backing memory</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="keywordtype">size_t</span> space = <a class="code" href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a> + alignment;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; _mem = std::shared_ptr&lt;uint8_t&gt;(<span class="keyword">new</span> uint8_t[space](), [](uint8_t *ptr)</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; {</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keyword">delete</span>[] ptr;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; });</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; _ptr = _mem.get();</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="comment">// Calculate alignment offset</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <span class="keywordflow">if</span>(alignment != 0)</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; {</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; <span class="keywordtype">void</span> *aligned_ptr = _mem.get();</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <a class="code" href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a9e51e04e3f86c823883757ef22d4f39a">support::cpp11::align</a>(alignment, <a class="code" href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a>, aligned_ptr, space);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; _ptr = aligned_ptr;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; }</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; }</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; }</div><div class="ttc" id="classarm__compute_1_1_i_memory_region_xhtml_a92ee6f66a47e8ba4bd3d01579ad4ef42"><div class="ttname"><a href="classarm__compute_1_1_i_memory_region.xhtml#a92ee6f66a47e8ba4bd3d01579ad4ef42">arm_compute::IMemoryRegion::IMemoryRegion</a></div><div class="ttdeci">IMemoryRegion(size_t size)</div><div class="ttdoc">Default constructor.</div><div class="ttdef"><b>Definition:</b> <a href="_i_memory_region_8h_source.xhtml#l00040">IMemoryRegion.h:40</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1support_1_1cpp11_xhtml_a9e51e04e3f86c823883757ef22d4f39a"><div class="ttname"><a href="namespacearm__compute_1_1support_1_1cpp11.xhtml#a9e51e04e3f86c823883757ef22d4f39a">arm_compute::support::cpp11::align</a></div><div class="ttdeci">void * align(std::size_t alignment, std::size_t size, void *&amp;ptr, std::size_t &amp;space)</div><div class="ttdef"><b>Definition:</b> <a href="_toolchain_support_8h_source.xhtml#l00402">ToolchainSupport.h:402</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_memory_region_xhtml_a259cb5a711406a8c3e5d937eb9350cca"><div class="ttname"><a href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">arm_compute::IMemoryRegion::size</a></div><div class="ttdeci">size_t size() const</div><div class="ttdoc">Memory region size accessor.</div><div class="ttdef"><b>Definition:</b> <a href="_i_memory_region_8h_source.xhtml#l00073">IMemoryRegion.h:73</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_toolchain_support_8h_source.xhtml#l00402">arm_compute::support::cpp11::align()</a>, and <a class="el" href="_i_memory_region_8h_source.xhtml#l00073">IMemoryRegion::size()</a>.</p>
</div>
</div>
<a id="aee98ba000578ad694264595385997304"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee98ba000578ad694264595385997304">&#9670;&nbsp;</a></span>MemoryRegion() <span class="overload">[2/4]</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_memory_region.xhtml">MemoryRegion</a> </td>
<td>(</td>
<td class="paramtype">void *&#160;</td>
<td class="paramname"><em>ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</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 class="definition">Definition at line <a class="el" href="_memory_region_8h_source.xhtml#l00067">67</a> of file <a class="el" href="_memory_region_8h_source.xhtml">MemoryRegion.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; : <a class="code" href="classarm__compute_1_1_i_memory_region.xhtml#a92ee6f66a47e8ba4bd3d01579ad4ef42">IMemoryRegion</a>(<a class="code" href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a>), _mem(<span class="keyword">nullptr</span>), _ptr(<span class="keyword">nullptr</span>)</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; {</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keywordflow">if</span>(<a class="code" href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a> != 0)</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; _ptr = ptr;</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; }</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; }</div><div class="ttc" id="classarm__compute_1_1_i_memory_region_xhtml_a92ee6f66a47e8ba4bd3d01579ad4ef42"><div class="ttname"><a href="classarm__compute_1_1_i_memory_region.xhtml#a92ee6f66a47e8ba4bd3d01579ad4ef42">arm_compute::IMemoryRegion::IMemoryRegion</a></div><div class="ttdeci">IMemoryRegion(size_t size)</div><div class="ttdoc">Default constructor.</div><div class="ttdef"><b>Definition:</b> <a href="_i_memory_region_8h_source.xhtml#l00040">IMemoryRegion.h:40</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_memory_region_xhtml_a259cb5a711406a8c3e5d937eb9350cca"><div class="ttname"><a href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">arm_compute::IMemoryRegion::size</a></div><div class="ttdeci">size_t size() const</div><div class="ttdoc">Memory region size accessor.</div><div class="ttdef"><b>Definition:</b> <a href="_i_memory_region_8h_source.xhtml#l00073">IMemoryRegion.h:73</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_i_memory_region_8h_source.xhtml#l00073">IMemoryRegion::size()</a>.</p>
</div>
</div>
<a id="a32d4629fe7aa6093bbe54599319d08fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32d4629fe7aa6093bbe54599319d08fa">&#9670;&nbsp;</a></span>MemoryRegion() <span class="overload">[3/4]</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_memory_region.xhtml">MemoryRegion</a> </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_memory_region.xhtml">MemoryRegion</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="ab2306b6e5516e7ffa160156a4ba2739e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2306b6e5516e7ffa160156a4ba2739e">&#9670;&nbsp;</a></span>MemoryRegion() <span class="overload">[4/4]</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_memory_region.xhtml">MemoryRegion</a> </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_memory_region.xhtml">MemoryRegion</a> &amp;&amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default move constructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ab9ec7ea42f2074a78cc2bf89e4663a24"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9ec7ea42f2074a78cc2bf89e4663a24">&#9670;&nbsp;</a></span>buffer() <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">void* buffer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the pointer to the allocated data. </p>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the allocated data </dd></dl>
<p>Implements <a class="el" href="classarm__compute_1_1_i_memory_region.xhtml#af4cf95f81e1b269a31d2d9a7e0429a24">IMemoryRegion</a>.</p>
<p class="definition">Definition at line <a class="el" href="_memory_region_8h_source.xhtml#l00085">85</a> of file <a class="el" href="_memory_region_8h_source.xhtml">MemoryRegion.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; {</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keywordflow">return</span> _ptr;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; }</div></div><!-- fragment -->
</div>
</div>
<a id="a555561f81b4473f9098e178defb96e53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a555561f81b4473f9098e178defb96e53">&#9670;&nbsp;</a></span>buffer() <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">const void* buffer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the pointer to the allocated data. </p>
<dl class="section return"><dt>Returns</dt><dd>Pointer to the allocated data </dd></dl>
<p>Implements <a class="el" href="classarm__compute_1_1_i_memory_region.xhtml#a19c5c30385ebe5a42755699ac1f90092">IMemoryRegion</a>.</p>
<p class="definition">Definition at line <a class="el" href="_memory_region_8h_source.xhtml#l00089">89</a> of file <a class="el" href="_memory_region_8h_source.xhtml">MemoryRegion.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; {</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="keywordflow">return</span> _ptr;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; }</div></div><!-- fragment -->
</div>
</div>
<a id="aa09a1dba8208c55ec9dd21ce4d4359a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa09a1dba8208c55ec9dd21ce4d4359a5">&#9670;&nbsp;</a></span>extract_subregion()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::unique_ptr&lt;<a class="el" href="classarm__compute_1_1_i_memory_region.xhtml">IMemoryRegion</a>&gt; extract_subregion </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>offset</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">final</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Extract a sub-region from the memory. </p>
<dl class="section warning"><dt>Warning</dt><dd>Ownership is maintained by the parent memory, while a wrapped raw memory region is returned by this function. Thus parent memory should not be released before this.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>Offset to the region </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Size of the region</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A wrapped memory sub-region with no ownership of the underlying memory </dd></dl>
<p>Implements <a class="el" href="classarm__compute_1_1_i_memory_region.xhtml#ae883a66f44b3d41635c4a75cab7dacfb">IMemoryRegion</a>.</p>
<p class="definition">Definition at line <a class="el" href="_memory_region_8h_source.xhtml#l00093">93</a> of file <a class="el" href="_memory_region_8h_source.xhtml">MemoryRegion.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; {</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="keywordflow">if</span>(_ptr != <span class="keyword">nullptr</span> &amp;&amp; (<a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a> &lt; _size) &amp;&amp; (_size - <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a> &gt;= <a class="code" href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a>))</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; <span class="keywordflow">return</span> support::cpp14::make_unique&lt;MemoryRegion&gt;(static_cast&lt;uint8_t *&gt;(_ptr) + <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>, <a class="code" href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">size</a>);</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; }</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; {</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; <span class="keywordflow">return</span> <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; }</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00510">helpers.h:510</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_memory_region_xhtml_a259cb5a711406a8c3e5d937eb9350cca"><div class="ttname"><a href="classarm__compute_1_1_i_memory_region.xhtml#a259cb5a711406a8c3e5d937eb9350cca">arm_compute::IMemoryRegion::size</a></div><div class="ttdeci">size_t size() const</div><div class="ttdoc">Memory region size accessor.</div><div class="ttdef"><b>Definition:</b> <a href="_i_memory_region_8h_source.xhtml#l00073">IMemoryRegion.h:73</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00510">offset()</a>, and <a class="el" href="_i_memory_region_8h_source.xhtml#l00073">IMemoryRegion::size()</a>.</p>
</div>
</div>
<a id="a56244352ef17c3750434e3fd479859cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56244352ef17c3750434e3fd479859cb">&#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_memory_region.xhtml">MemoryRegion</a>&amp; operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_memory_region.xhtml">MemoryRegion</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="a532920766558c751318576ff10974178"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a532920766558c751318576ff10974178">&#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_memory_region.xhtml">MemoryRegion</a>&amp; operator= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_memory_region.xhtml">MemoryRegion</a> &amp;&amp;&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">default</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default move assignment operator. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>arm_compute/runtime/<a class="el" href="_memory_region_8h_source.xhtml">MemoryRegion.h</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_memory_region.xhtml">MemoryRegion</a></li>
<li class="footer">Generated on Thu Mar 5 2020 16:07:14 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>