-
Notifications
You must be signed in to change notification settings - Fork 0
/
buffer_8hpp_source.html
155 lines (153 loc) · 20.6 KB
/
buffer_8hpp_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcudaisp: /builds/ridgerun/rnd/libcudaisp/rr/include/libcudaisp/buffer.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libcudaisp
 <span id="projectnumber">0.1.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_4308c347a8925fe03bb0c6144b7007d3.html">rr</a></li><li class="navelem"><a class="el" href="dir_fa3db636adf90fe59970a0aa671df06e.html">include</a></li><li class="navelem"><a class="el" href="dir_6c7c75103029e69b04aae0fd900161b1.html">libcudaisp</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">buffer.hpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="buffer_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (C) 2023 RidgeRun, LLC (http://www.ridgerun.com)</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * All Rights Reserved.</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Author: Nicolas Morua <[email protected]></span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * The contents of this software are proprietary and confidential to RidgeRun,</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * LLC. No part of this program may be photocopied, reproduced or translated</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * into another programming language without prior written consent of</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * RidgeRun, LLC. The user is free to modify the source code after obtaining</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * a software license from RidgeRun. All source code changes must be provided</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * back to RidgeRun without any encumbrance.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> */</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  </div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#ifndef RR_INCLUDE_LIBCUDAISP_BUFFER_HPP_</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#define RR_INCLUDE_LIBCUDAISP_BUFFER_HPP_</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>  </div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include "<a class="code" href="cudatype_8hpp.html">libcudaisp/cudatype.hpp</a>"</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "<a class="code" href="format_8hpp.html">libcudaisp/format.hpp</a>"</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "<a class="code" href="include_2libcudaisp_2runtimeerror_8hpp.html">libcudaisp/runtimeerror.hpp</a>"</span></div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  </div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include <array></span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="preprocessor">#include <memory></span></div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  </div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">namespace </span><a class="code" href="namespacerr.html">rr</a> {</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classrr_1_1_buffer.html"> 33</a></span> <span class="keyword">class </span><a class="code" href="classrr_1_1_buffer.html">Buffer</a> {</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="classrr_1_1_buffer.html#aa006347e779b07ef7f2920f1e82c98f2"> 35</a></span>  <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classrr_1_1_buffer.html#aa006347e779b07ef7f2920f1e82c98f2">kMaxPlanes</a> = 4;</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="classrr_1_1_buffer.html#a13b2f9ce2961e338bef69fd30b354c7f">Buffer</a>(uint8_t* <a class="code" href="classrr_1_1_buffer.html#af8748b72a0b4e1a2f98ecef1b82edd1b">data</a>, <span class="keyword">const</span> <a class="code" href="namespacerr.html#a05bc1f95198518551bf0ad21b4b0c690">Format</a> <a class="code" href="classrr_1_1_buffer.html#a0b0025abfd9268a127c0fa6a72c8e8c0">format</a>, <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classrr_1_1_buffer.html#a0615ebc0c0122db72db738f70a50c998">planes</a>,</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="keyword">const</span> std::array<int, Buffer::kMaxPlanes> <a class="code" href="classrr_1_1_buffer.html#a6342a8dabfb5f2e8b272a3b06adc6835">strides</a>, <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classrr_1_1_buffer.html#a1a5d669725ee40435a454efec278e8c0">width</a>,</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classrr_1_1_buffer.html#afc8f2440e464de5a2a5f6e759aa62048">height</a>, <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classrr_1_1_buffer.html#af10fa8da9d0212e50182aaa303bf81b9">size</a>);</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <a class="code" href="classrr_1_1_buffer.html#a13b2f9ce2961e338bef69fd30b354c7f">Buffer</a>(uint8_t* <a class="code" href="classrr_1_1_buffer.html#af8748b72a0b4e1a2f98ecef1b82edd1b">data</a>, <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classrr_1_1_buffer.html#af10fa8da9d0212e50182aaa303bf81b9">size</a>);</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keyword">virtual</span> <a class="code" href="classrr_1_1_runtime_error.html">RuntimeError</a> <a class="code" href="classrr_1_1_buffer.html#a36893fba9dc376e05f841fd6d2d62005">SetBufferInfo</a>(</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keyword">const</span> <a class="code" href="namespacerr.html#a05bc1f95198518551bf0ad21b4b0c690">Format</a> <a class="code" href="classrr_1_1_buffer.html#a0b0025abfd9268a127c0fa6a72c8e8c0">format</a>, <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classrr_1_1_buffer.html#a0615ebc0c0122db72db738f70a50c998">planes</a>,</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="keyword">const</span> std::array<int, Buffer::kMaxPlanes> <a class="code" href="classrr_1_1_buffer.html#a6342a8dabfb5f2e8b272a3b06adc6835">strides</a>, <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classrr_1_1_buffer.html#a1a5d669725ee40435a454efec278e8c0">width</a>,</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="classrr_1_1_buffer.html#afc8f2440e464de5a2a5f6e759aa62048">height</a>);</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <span class="keyword">virtual</span> uint8_t* <a class="code" href="classrr_1_1_buffer.html#af8748b72a0b4e1a2f98ecef1b82edd1b">data</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keyword">virtual</span> <a class="code" href="namespacerr.html#a05bc1f95198518551bf0ad21b4b0c690">Format</a> <a class="code" href="classrr_1_1_buffer.html#a0b0025abfd9268a127c0fa6a72c8e8c0">format</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classrr_1_1_buffer.html#a0615ebc0c0122db72db738f70a50c998">planes</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keyword">virtual</span> std::array<int, Buffer::kMaxPlanes> <a class="code" href="classrr_1_1_buffer.html#a6342a8dabfb5f2e8b272a3b06adc6835">strides</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classrr_1_1_buffer.html#a1a5d669725ee40435a454efec278e8c0">width</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classrr_1_1_buffer.html#afc8f2440e464de5a2a5f6e759aa62048">height</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keyword">virtual</span> <span class="keywordtype">size_t</span> <a class="code" href="classrr_1_1_buffer.html#af10fa8da9d0212e50182aaa303bf81b9">size</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keyword">virtual</span> <a class="code" href="classrr_1_1_buffer.html#a03d3f12dbd7ccc72eb998b01b19f6a36">~Buffer</a>();</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  </div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keyword">private</span>:</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  uint8_t* data_;</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <a class="code" href="namespacerr.html#a05bc1f95198518551bf0ad21b4b0c690">Format</a> format_;</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordtype">int</span> planes_;</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  std::array<int, Buffer::kMaxPlanes> strides_;</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordtype">int</span> width_;</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="keywordtype">int</span> height_;</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="keywordtype">size_t</span> size_;</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> };</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> } <span class="comment">// namespace rr</span></div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  </div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> <span class="preprocessor">#endif // RR_INCLUDE_LIBCUDAISP_BUFFER_HPP_</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclassrr_1_1_buffer_html_a03d3f12dbd7ccc72eb998b01b19f6a36"><div class="ttname"><a href="classrr_1_1_buffer.html#a03d3f12dbd7ccc72eb998b01b19f6a36">rr::Buffer::~Buffer</a></div><div class="ttdeci">virtual ~Buffer()</div><div class="ttdoc">Destroys the Buffer object.</div><div class="ttdef"><b>Definition:</b> buffer.cpp:181</div></div>
<div class="ttc" id="aclassrr_1_1_buffer_html"><div class="ttname"><a href="classrr_1_1_buffer.html">rr::Buffer</a></div><div class="ttdoc">This class contains data containers.</div><div class="ttdef"><b>Definition:</b> buffer.hpp:33</div></div>
<div class="ttc" id="aformat_8hpp_html"><div class="ttname"><a href="format_8hpp.html">format.hpp</a></div></div>
<div class="ttc" id="aclassrr_1_1_buffer_html_a36893fba9dc376e05f841fd6d2d62005"><div class="ttname"><a href="classrr_1_1_buffer.html#a36893fba9dc376e05f841fd6d2d62005">rr::Buffer::SetBufferInfo</a></div><div class="ttdeci">virtual RuntimeError SetBufferInfo(const Format format, const int planes, const std::array< int, Buffer::kMaxPlanes > strides, const int width, const int height)</div><div class="ttdoc">Sets general buffer information.</div><div class="ttdef"><b>Definition:</b> buffer.cpp:112</div></div>
<div class="ttc" id="aclassrr_1_1_runtime_error_html"><div class="ttname"><a href="classrr_1_1_runtime_error.html">rr::RuntimeError</a></div><div class="ttdoc">Implements the error handling class.</div><div class="ttdef"><b>Definition:</b> runtimeerror.hpp:27</div></div>
<div class="ttc" id="aclassrr_1_1_buffer_html_af10fa8da9d0212e50182aaa303bf81b9"><div class="ttname"><a href="classrr_1_1_buffer.html#af10fa8da9d0212e50182aaa303bf81b9">rr::Buffer::size</a></div><div class="ttdeci">virtual size_t size() const</div><div class="ttdoc">Method to obtain the size of Buffer memory.</div><div class="ttdef"><b>Definition:</b> buffer.cpp:179</div></div>
<div class="ttc" id="aclassrr_1_1_buffer_html_a0b0025abfd9268a127c0fa6a72c8e8c0"><div class="ttname"><a href="classrr_1_1_buffer.html#a0b0025abfd9268a127c0fa6a72c8e8c0">rr::Buffer::format</a></div><div class="ttdeci">virtual Format format() const</div><div class="ttdoc">Method to obtain image format.</div><div class="ttdef"><b>Definition:</b> buffer.cpp:167</div></div>
<div class="ttc" id="anamespacerr_html"><div class="ttname"><a href="namespacerr.html">rr</a></div><div class="ttdoc">RR Namespace.</div><div class="ttdef"><b>Definition:</b> runtimeerror.cpp:16</div></div>
<div class="ttc" id="aclassrr_1_1_buffer_html_a13b2f9ce2961e338bef69fd30b354c7f"><div class="ttname"><a href="classrr_1_1_buffer.html#a13b2f9ce2961e338bef69fd30b354c7f">rr::Buffer::Buffer</a></div><div class="ttdeci">Buffer(uint8_t *data, const Format format, const int planes, const std::array< int, Buffer::kMaxPlanes > strides, const int width, const int height, const size_t size)</div><div class="ttdoc">Constructs a Buffer instance.</div><div class="ttdef"><b>Definition:</b> buffer.cpp:48</div></div>
<div class="ttc" id="aclassrr_1_1_buffer_html_aa006347e779b07ef7f2920f1e82c98f2"><div class="ttname"><a href="classrr_1_1_buffer.html#aa006347e779b07ef7f2920f1e82c98f2">rr::Buffer::kMaxPlanes</a></div><div class="ttdeci">static const int kMaxPlanes</div><div class="ttdef"><b>Definition:</b> buffer.hpp:35</div></div>
<div class="ttc" id="aclassrr_1_1_buffer_html_af8748b72a0b4e1a2f98ecef1b82edd1b"><div class="ttname"><a href="classrr_1_1_buffer.html#af8748b72a0b4e1a2f98ecef1b82edd1b">rr::Buffer::data</a></div><div class="ttdeci">virtual uint8_t * data() const</div><div class="ttdoc">Method to obtain data from shared memory region.</div><div class="ttdef"><b>Definition:</b> buffer.cpp:165</div></div>
<div class="ttc" id="aclassrr_1_1_buffer_html_a0615ebc0c0122db72db738f70a50c998"><div class="ttname"><a href="classrr_1_1_buffer.html#a0615ebc0c0122db72db738f70a50c998">rr::Buffer::planes</a></div><div class="ttdeci">virtual int planes() const</div><div class="ttdoc">Method to obtain image planes.</div><div class="ttdef"><b>Definition:</b> buffer.cpp:169</div></div>
<div class="ttc" id="aclassrr_1_1_buffer_html_afc8f2440e464de5a2a5f6e759aa62048"><div class="ttname"><a href="classrr_1_1_buffer.html#afc8f2440e464de5a2a5f6e759aa62048">rr::Buffer::height</a></div><div class="ttdeci">virtual int height() const</div><div class="ttdoc">Method to obtain image height dimension.</div><div class="ttdef"><b>Definition:</b> buffer.cpp:177</div></div>
<div class="ttc" id="aclassrr_1_1_buffer_html_a6342a8dabfb5f2e8b272a3b06adc6835"><div class="ttname"><a href="classrr_1_1_buffer.html#a6342a8dabfb5f2e8b272a3b06adc6835">rr::Buffer::strides</a></div><div class="ttdeci">virtual std::array< int, Buffer::kMaxPlanes > strides() const</div><div class="ttdoc">Method to obtain image strides.</div><div class="ttdef"><b>Definition:</b> buffer.cpp:171</div></div>
<div class="ttc" id="aclassrr_1_1_buffer_html_a1a5d669725ee40435a454efec278e8c0"><div class="ttname"><a href="classrr_1_1_buffer.html#a1a5d669725ee40435a454efec278e8c0">rr::Buffer::width</a></div><div class="ttdeci">virtual int width() const</div><div class="ttdoc">Method to obtain image width dimension.</div><div class="ttdef"><b>Definition:</b> buffer.cpp:175</div></div>
<div class="ttc" id="acudatype_8hpp_html"><div class="ttname"><a href="cudatype_8hpp.html">cudatype.hpp</a></div></div>
<div class="ttc" id="ainclude_2libcudaisp_2runtimeerror_8hpp_html"><div class="ttname"><a href="include_2libcudaisp_2runtimeerror_8hpp.html">runtimeerror.hpp</a></div></div>
<div class="ttc" id="anamespacerr_html_a05bc1f95198518551bf0ad21b4b0c690"><div class="ttname"><a href="namespacerr.html#a05bc1f95198518551bf0ad21b4b0c690">rr::Format</a></div><div class="ttdeci">Format</div><div class="ttdoc">This class contains different image formats.</div><div class="ttdef"><b>Definition:</b> format.hpp:24</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Mar 14 2023 20:22:00 for libcudaisp by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>