-
Notifications
You must be signed in to change notification settings - Fork 0
/
DataStream_8h_source.html
281 lines (279 loc) · 39.6 KB
/
DataStream_8h_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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<!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.5"/>
<title>isce3: isce/cxx/isce3/cuda/io/DataStream.h 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/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.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 style="padding-left: 0.5em;">
<div id="projectname">isce3
 <span id="projectnumber">0.1.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="sphinx/html/index.html"><span>Python classes</span></a></li>
<li><a href="https://github-fn.jpl.nasa.gov/isce-3/isce/issues/"><span>Issue Tracker</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_404e96cc334514cbeb4d3a6830fc20a4.html">isce</a></li><li class="navelem"><a class="el" href="dir_242328b4dda42afcab822a3a2c9e5d23.html">cxx</a></li><li class="navelem"><a class="el" href="dir_25ad1bde3345b7504bdf331e9ef506fd.html">isce3</a></li><li class="navelem"><a class="el" href="dir_f4c25f90434c04f04bf31e4a71946cd1.html">cuda</a></li><li class="navelem"><a class="el" href="dir_dd5ca023624f6d6cb9c8d60ab712c1d5.html">io</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">DataStream.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor"></span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="preprocessor">#include <isce3/cuda/core/Event.h></span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include <isce3/cuda/core/Stream.h></span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="preprocessor">#include <isce3/io/Raster.h></span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include <string></span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include <thrust/host_vector.h></span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include <thrust/system/cuda/experimental/pinned_allocator.h></span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="keyword">namespace </span>isce3 { <span class="keyword">namespace </span>cuda { <span class="keyword">namespace </span>io {</div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> </div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment">// thrust::host_vector whose data buffer uses page-locked memory</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">using</span> pinned_host_vector = thrust::host_vector<T,</div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  thrust::system::cuda::experimental::pinned_allocator<T>>;</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="comment">// callback for asynchronously writing to files via std::ofstream</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="classisce3_1_1cuda_1_1io_1_1fstreamCallback.html"> 18</a></span> <span class="keyword">class </span><a class="code" href="classisce3_1_1cuda_1_1io_1_1fstreamCallback.html">fstreamCallback</a> {</div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="keyword">private</span>:</div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  <a class="code" href="classisce3_1_1cuda_1_1io_1_1fstreamCallback.html">fstreamCallback</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <a class="code" href="classisce3_1_1cuda_1_1io_1_1fstreamCallback.html">fstreamCallback</a>(<span class="keyword">const</span> std::string * filename,</div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> * buffer,</div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  std::size_t offset,</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  std::size_t count);</div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <span class="comment">// interface for cudaStreamAddCallback</span></div>
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <span class="comment">// casts *obj* to (fstreamCallback *) and calls write()</span></div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keyword">static</span></div>
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="keywordtype">void</span> CUDART_CB cb_write(cudaStream_t, cudaError_t, <span class="keywordtype">void</span> * obj);</div>
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <span class="comment">// write the contents of *buffer* to file at *filename* via std::ofstream</span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordtype">void</span> write();</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> </div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="keyword">const</span> std::string * filename;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keyword">const</span> <span class="keywordtype">char</span> * buffer;</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  std::size_t offset;</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  std::size_t count;</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html">FileDataStream</a>;</div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span> };</div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment">// callback for asynchronously writing to Raster objects</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classisce3_1_1cuda_1_1io_1_1RasterCallback.html"> 44</a></span> <span class="keyword">class </span><a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterCallback.html">RasterCallback</a> {</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="keyword">private</span>:</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterCallback.html">RasterCallback</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> </div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterCallback.html">RasterCallback</a>(<a class="code" href="classisce3_1_1io_1_1Raster.html">isce3::io::Raster</a> * raster,</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordtype">char</span> * buffer,</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  std::size_t col,</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  std::size_t row,</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  std::size_t width,</div>
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  std::size_t length);</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div>
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="comment">// interface for cudaStreamAddCallback</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="comment">// casts *obj* to (RasterCallback *) and calls setBlock()</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keyword">static</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="keywordtype">void</span> CUDART_CB cb_setBlock(cudaStream_t, cudaError_t, <span class="keywordtype">void</span> * obj);</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="comment">// forwards members as arguments to Raster::setBlock()</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordtype">void</span> setBlock();</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <a class="code" href="classisce3_1_1io_1_1Raster.html">isce3::io::Raster</a> * raster;</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordtype">char</span> * buffer;</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  std::size_t col;</div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  std::size_t row;</div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  std::size_t width;</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  std::size_t length;</div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html">RasterDataStream</a>;</div>
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> };</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> </div>
<div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html"> 79</a></span> <span class="keyword">class </span><a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html">FileDataStream</a> {</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="keyword">public</span>:</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html">FileDataStream</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> </div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html">FileDataStream</a>(<span class="keyword">const</span> std::string & <a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a8adcd10fa203468c82016c2b1665ff4a">filename</a>,</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <a class="code" href="classisce3_1_1cuda_1_1core_1_1Stream.html">isce3::cuda::core::Stream</a> <a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a69a723cda6e77df28f0479cfd989d18d">stream</a>,</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  std::size_t <a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a16c2da503dc5150b901918caa22a657b">buffer_size</a> = 0);</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keyword">const</span> std::string & <a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a8adcd10fa203468c82016c2b1665ff4a">filename</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span> </div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keywordtype">void</span> <a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#ac841e1e4231074c239119bda65842657">set_filename</a>(<span class="keyword">const</span> std::string &);</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <a class="code" href="classisce3_1_1cuda_1_1core_1_1Stream.html">isce3::cuda::core::Stream</a> <a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a69a723cda6e77df28f0479cfd989d18d">stream</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordtype">void</span> <a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a61900bf6f2914749042c50040bf0ea48">set_stream</a>(<a class="code" href="classisce3_1_1cuda_1_1core_1_1Stream.html">isce3::cuda::core::Stream</a> stream);</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div>
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  std::size_t <a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a16c2da503dc5150b901918caa22a657b">buffer_size</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> </div>
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="keywordtype">void</span> <a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#acc16c32aec3d2e2150a4fcfb1e01c1bd">resize_buffer</a>(std::size_t buffer_size);</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordtype">void</span> <a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a9e9a3332033148dc1085b5b4f0b966f3">load</a>(<span class="keywordtype">void</span> * dst, std::size_t offset, std::size_t count);</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span> </div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <span class="keywordtype">void</span> <a class="code" href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a301f3c0969f1909fa36e78cd460a1a9d">store</a>(<span class="keyword">const</span> <span class="keywordtype">void</span> * src, std::size_t offset, std::size_t count);</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span> </div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span> <span class="keyword">private</span>:</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  std::string _filename;</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <a class="code" href="classisce3_1_1cuda_1_1core_1_1Stream.html">isce3::cuda::core::Stream</a> _stream = 0;</div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <a class="code" href="classisce3_1_1cuda_1_1core_1_1Event.html">isce3::cuda::core::Event</a> _mutex;</div>
<div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  pinned_host_vector<char> _buffer;</div>
<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <a class="code" href="classisce3_1_1cuda_1_1io_1_1fstreamCallback.html">fstreamCallback</a> _callback;</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span> };</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span> </div>
<div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html"> 154</a></span> <span class="keyword">class </span><a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html">RasterDataStream</a> {</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span> <span class="keyword">public</span>:</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html">RasterDataStream</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span> </div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html">RasterDataStream</a>(<a class="code" href="classisce3_1_1io_1_1Raster.html">isce3::io::Raster</a> * <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a54cb52e5d4d2f7c6675a22485306db6a">raster</a>,</div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <a class="code" href="classisce3_1_1cuda_1_1core_1_1Stream.html">isce3::cuda::core::Stream</a> <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a569a0ee75bc423621a7040de2945b5c0">stream</a>,</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  std::size_t <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a906c4ec0f854c5e1407648c85f578065">buffer_size</a> = 0);</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span> </div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <a class="code" href="classisce3_1_1io_1_1Raster.html">isce3::io::Raster</a> * <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a54cb52e5d4d2f7c6675a22485306db6a">raster</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> </div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keywordtype">void</span> <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a50d2240596759f377812e6a5e9843356">set_raster</a>(<a class="code" href="classisce3_1_1io_1_1Raster.html">isce3::io::Raster</a> *);</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span> </div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <a class="code" href="classisce3_1_1cuda_1_1core_1_1Stream.html">isce3::cuda::core::Stream</a> <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a569a0ee75bc423621a7040de2945b5c0">stream</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span> </div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordtype">void</span> <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a1ede1439a548dca7632b2b799d6f60d5">set_stream</a>(<a class="code" href="classisce3_1_1cuda_1_1core_1_1Stream.html">isce3::cuda::core::Stream</a> stream);</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span> </div>
<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  std::size_t <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a906c4ec0f854c5e1407648c85f578065">buffer_size</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00183"></a><span class="lineno"> 183</span> </div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordtype">void</span> <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a8a22138746a99374278358dc628c6e1f">resize_buffer</a>(std::size_t buffer_size);</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span> </div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="keywordtype">void</span> <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#af404b40b29fd2fd23e12ce2d580f345c">load</a>(T * dst,</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  std::size_t col,</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  std::size_t row,</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  std::size_t width,</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  std::size_t length);</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span> </div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="keyword">template</span><<span class="keyword">typename</span> T></div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="keywordtype">void</span> <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a0446ba5f26d51874c6a61ef6a3ac23fb">store</a>(<span class="keyword">const</span> T * src,</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  std::size_t col,</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  std::size_t row,</div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  std::size_t width,</div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  std::size_t length);</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span> </div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span> <span class="keyword">private</span>:</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <a class="code" href="classisce3_1_1io_1_1Raster.html">isce3::io::Raster</a> * _raster;</div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <a class="code" href="classisce3_1_1cuda_1_1core_1_1Stream.html">isce3::cuda::core::Stream</a> _stream = 0;</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <a class="code" href="classisce3_1_1cuda_1_1core_1_1Event.html">isce3::cuda::core::Event</a> _mutex;</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  pinned_host_vector<char> _buffer;</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <a class="code" href="classisce3_1_1cuda_1_1io_1_1RasterCallback.html">RasterCallback</a> _callback;</div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span> };</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span> </div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span> }}}</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span> </div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span> <span class="preprocessor">#define ISCE_CUDA_IO_DATASTREAM_ICC</span></div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span> <span class="preprocessor"></span><span class="preprocessor">#include "DataStream.icc"</span></div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span> <span class="preprocessor">#undef ISCE_CUDA_IO_DATASTREAM_ICC</span></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1RasterCallback_html"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1RasterCallback.html">isce3::cuda::io::RasterCallback</a></div><div class="ttdef"><b>Definition:</b> DataStream.h:44</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1RasterDataStream_html_a569a0ee75bc423621a7040de2945b5c0"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a569a0ee75bc423621a7040de2945b5c0">isce3::cuda::io::RasterDataStream::stream</a></div><div class="ttdeci">isce3::cuda::core::Stream stream() const </div><div class="ttdoc">Get associated CUDA stream object. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:226</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1RasterDataStream_html_a0446ba5f26d51874c6a61ef6a3ac23fb"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a0446ba5f26d51874c6a61ef6a3ac23fb">isce3::cuda::io::RasterDataStream::store</a></div><div class="ttdeci">void store(const T *src, std::size_t col, std::size_t row, std::size_t width, std::size_t length)</div><div class="ttdoc">Write a block of data from the current device to the Raster asynchronously. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:285</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1FileDataStream_html"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html">isce3::cuda::io::FileDataStream</a></div><div class="ttdoc">Utility class for asynchronously reading/writing between files and device memory. ...</div><div class="ttdef"><b>Definition:</b> DataStream.h:79</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1FileDataStream_html_a69a723cda6e77df28f0479cfd989d18d"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a69a723cda6e77df28f0479cfd989d18d">isce3::cuda::io::FileDataStream::stream</a></div><div class="ttdeci">isce3::cuda::core::Stream stream() const </div><div class="ttdoc">Get associated CUDA stream object. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:108</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1RasterDataStream_html_a906c4ec0f854c5e1407648c85f578065"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a906c4ec0f854c5e1407648c85f578065">isce3::cuda::io::RasterDataStream::buffer_size</a></div><div class="ttdeci">std::size_t buffer_size() const </div><div class="ttdoc">Get stream buffer size in bytes. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:241</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1FileDataStream_html_a61900bf6f2914749042c50040bf0ea48"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a61900bf6f2914749042c50040bf0ea48">isce3::cuda::io::FileDataStream::set_stream</a></div><div class="ttdeci">void set_stream(isce3::cuda::core::Stream stream)</div><div class="ttdoc">Set CUDA stream. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:114</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1RasterDataStream_html_a1ede1439a548dca7632b2b799d6f60d5"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a1ede1439a548dca7632b2b799d6f60d5">isce3::cuda::io::RasterDataStream::set_stream</a></div><div class="ttdeci">void set_stream(isce3::cuda::core::Stream stream)</div><div class="ttdoc">Set CUDA stream. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:232</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1FileDataStream_html_ac841e1e4231074c239119bda65842657"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#ac841e1e4231074c239119bda65842657">isce3::cuda::io::FileDataStream::set_filename</a></div><div class="ttdeci">void set_filename(const std::string &)</div><div class="ttdoc">Set path to file. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:99</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1fstreamCallback_html"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1fstreamCallback.html">isce3::cuda::io::fstreamCallback</a></div><div class="ttdef"><b>Definition:</b> DataStream.h:18</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1RasterDataStream_html"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html">isce3::cuda::io::RasterDataStream</a></div><div class="ttdoc">Utility class for asynchronously reading/writing between Rasters and device memory. </div><div class="ttdef"><b>Definition:</b> DataStream.h:154</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1FileDataStream_html_a9e9a3332033148dc1085b5b4f0b966f3"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a9e9a3332033148dc1085b5b4f0b966f3">isce3::cuda::io::FileDataStream::load</a></div><div class="ttdeci">void load(void *dst, std::size_t offset, std::size_t count)</div><div class="ttdoc">Read data and copy to the current device asynchronously. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:138</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1FileDataStream_html_a301f3c0969f1909fa36e78cd460a1a9d"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a301f3c0969f1909fa36e78cd460a1a9d">isce3::cuda::io::FileDataStream::store</a></div><div class="ttdeci">void store(const void *src, std::size_t offset, std::size_t count)</div><div class="ttdoc">Write data from the current device to the file asynchronously. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:173</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1core_1_1Event_html"><div class="ttname"><a href="classisce3_1_1cuda_1_1core_1_1Event.html">isce3::cuda::core::Event</a></div><div class="ttdoc">Thin RAII wrapper around cudaEvent_t. </div><div class="ttdef"><b>Definition:</b> Event.h:8</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1RasterDataStream_html_a54cb52e5d4d2f7c6675a22485306db6a"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a54cb52e5d4d2f7c6675a22485306db6a">isce3::cuda::io::RasterDataStream::raster</a></div><div class="ttdeci">isce3::io::Raster * raster() const </div><div class="ttdoc">Get pointer to Raster object. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:211</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1FileDataStream_html_acc16c32aec3d2e2150a4fcfb1e01c1bd"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#acc16c32aec3d2e2150a4fcfb1e01c1bd">isce3::cuda::io::FileDataStream::resize_buffer</a></div><div class="ttdeci">void resize_buffer(std::size_t buffer_size)</div><div class="ttdoc">Set stream buffer size in bytes. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:129</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1FileDataStream_html_a8adcd10fa203468c82016c2b1665ff4a"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a8adcd10fa203468c82016c2b1665ff4a">isce3::cuda::io::FileDataStream::filename</a></div><div class="ttdeci">const std::string & filename() const </div><div class="ttdoc">Get path to file. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:93</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1FileDataStream_html_a16c2da503dc5150b901918caa22a657b"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1FileDataStream.html#a16c2da503dc5150b901918caa22a657b">isce3::cuda::io::FileDataStream::buffer_size</a></div><div class="ttdeci">std::size_t buffer_size() const </div><div class="ttdoc">Get stream buffer size in bytes. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:123</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1RasterDataStream_html_a50d2240596759f377812e6a5e9843356"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a50d2240596759f377812e6a5e9843356">isce3::cuda::io::RasterDataStream::set_raster</a></div><div class="ttdeci">void set_raster(isce3::io::Raster *)</div><div class="ttdoc">Set raster. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:217</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1RasterDataStream_html_af404b40b29fd2fd23e12ce2d580f345c"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#af404b40b29fd2fd23e12ce2d580f345c">isce3::cuda::io::RasterDataStream::load</a></div><div class="ttdeci">void load(T *dst, std::size_t col, std::size_t row, std::size_t width, std::size_t length)</div><div class="ttdoc">Read a block of data from the Raster and copy to the current device asynchronously. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:257</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1io_1_1RasterDataStream_html_a8a22138746a99374278358dc628c6e1f"><div class="ttname"><a href="classisce3_1_1cuda_1_1io_1_1RasterDataStream.html#a8a22138746a99374278358dc628c6e1f">isce3::cuda::io::RasterDataStream::resize_buffer</a></div><div class="ttdeci">void resize_buffer(std::size_t buffer_size)</div><div class="ttdoc">Set stream buffer size in bytes. </div><div class="ttdef"><b>Definition:</b> DataStream.icc:247</div></div>
<div class="ttc" id="classisce3_1_1io_1_1Raster_html"><div class="ttname"><a href="classisce3_1_1io_1_1Raster.html">isce3::io::Raster</a></div><div class="ttdoc">Data structure meant to handle Raster I/O operations. </div><div class="ttdef"><b>Definition:</b> Raster.h:34</div></div>
<div class="ttc" id="classisce3_1_1cuda_1_1core_1_1Stream_html"><div class="ttname"><a href="classisce3_1_1cuda_1_1core_1_1Stream.html">isce3::cuda::core::Stream</a></div><div class="ttdoc">Thin RAII wrapper around cudaStream_t. </div><div class="ttdef"><b>Definition:</b> Stream.h:10</div></div>
</div><!-- fragment --></div><!-- contents -->
<hr>
Generated for ISCE3.0 by
<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.8.5.
</body>
</html>