-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGridPoint_8h_source.html
More file actions
272 lines (270 loc) · 37.1 KB
/
Copy pathGridPoint_8h_source.html
File metadata and controls
272 lines (270 loc) · 37.1 KB
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
<!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.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TAC V0.0.4 @ 2021.04.07: GridPoint.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="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>
<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/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="TACdoxy.css" rel="stylesheet" type="text/css">
<!-- -->
<script type="text/javascript" src="TAC_navtree_hacks.js"></script>
</head>
<body>
<div style="background:#FFDDDD;font-size:120%;text-align:center;margin:0;padding:5px">Please, help us to better know about our user community by answering the following short survey: <a href="https://forms.gle/wpyrxWi18ox9Z5ae9">https://forms.gle/wpyrxWi18ox9Z5ae9</a></div>
<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="projectlogo"><img alt="Logo" src="TAC_Logo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname"><a href="https://jvegh@bitbucket.org/jvegh/timeawarecomputingsimulator">TAC V0.0.4 @ 2021.04.07</a>
</div>
</td>
<td> <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>
</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>
</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&dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('GridPoint_8h_source.html',''); initResizable(); });
/* @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="headertitle">
<div class="title">GridPoint.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="GridPoint_8h.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">/* @author János Végh (jvegh)</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">* @bug No known bugs.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment">*/</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#ifndef GRIDPOINT_H</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#define GRIDPOINT_H</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment">//#include <iostream></span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include <sstream></span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#include "MemoryClustering.h"</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="keyword">using namespace </span>std;</div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="keyword">class </span><a class="code" href="classscHThread.html">scHThread</a>;</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>  </div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classGridPoint.html"> 33</a></span> <span class="keyword">class </span><a class="code" href="classGridPoint.html">GridPoint</a></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">public</span>:</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="comment">// Arranged in a two-dimensional hexagonal grid; with the H HThread, 3 dimensional</span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="classGridPoint.html">GridPoint</a>(<span class="keywordtype">char</span> xx=0,<span class="keywordtype">char</span> yy=0, <a class="code" href="Clustering_8h.html#ad2386d689ac9def8b6c87391d14c00c2">ClusterStatus</a> CS=<a class="code" href="Clustering_8h.html#ad2386d689ac9def8b6c87391d14c00c2a17c465b98aa8146769a195d07ac5dd73">cs_NONE</a>):X(xx),Y(yy){</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  mClusterAddress.HThread = 0,</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  mClusterAddress.Reserved = 0, <span class="comment">//reserved</span></div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  mClusterAddress.Rack= 0,<span class="comment">//Rack</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  mClusterAddress.Topology= 0,<span class="comment">//Topology (like Processor)</span></div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  mClusterAddress.Card= 0,<span class="comment">//Card</span></div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  mClusterAddress.Cluster = MAX_CLUSTERS_LIMIT,<span class="comment">//Cluster</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  mClusterAddress.Member=<a class="code" href="Clustering_8h.html#a37416c0360a3b79ff7111edbcfc6e9c7a30ca2bf0a2cb4f9f5e06fcfe995f1b40">cm_Head</a>,<span class="comment">//Member</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  mClusterAddress.Proxy =<a class="code" href="Clustering_8h.html#a37416c0360a3b79ff7111edbcfc6e9c7a30ca2bf0a2cb4f9f5e06fcfe995f1b40">cm_Head</a>;<span class="comment">//Proxy</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  mClusterAddress.Status = CS;</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="comment">// mMyHThreads = 0; // Initially, no HThreads are</span></div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  }</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keyword">virtual</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  ~<a class="code" href="classGridPoint.html">GridPoint</a>(){}</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  </div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <a class="code" href="structClusterAddress__t.html">ClusterAddress_t</a> </div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classGridPoint.html#ab9305605bd00eb2a0700b051d2968c02"> 53</a></span>  <a class="code" href="classGridPoint.html#ab9305605bd00eb2a0700b051d2968c02">ClusterAddress_Get</a>(<span class="keywordtype">void</span>){ <span class="keywordflow">return</span> mClusterAddress;}</div>
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="keywordtype">void</span> </div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classGridPoint.html#a41341f8840bb8be9afacb9a9bb672684"> 55</a></span>  <a class="code" href="classGridPoint.html#a41341f8840bb8be9afacb9a9bb672684">ClusterAddress_Set</a>(<a class="code" href="structClusterAddress__t.html">ClusterAddress_t</a> CA){ mClusterAddress = CA;}</div>
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  <span class="keywordtype">void</span> </div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classGridPoint.html#a5f975ae074503ba10a6bd0aa5efd6aa1"> 57</a></span>  <a class="code" href="classGridPoint.html#a5f975ae074503ba10a6bd0aa5efd6aa1">ClusterAddressHThread_Set</a>(<span class="keywordtype">int</span> H){ mClusterAddress.HThread = H;}</div>
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <a class="code" href="Clustering_8h.html#ad2386d689ac9def8b6c87391d14c00c2">ClusterStatus</a> </div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classGridPoint.html#aff09c315c692b159d44c9496631aecb2"> 59</a></span>  <a class="code" href="classGridPoint.html#aff09c315c692b159d44c9496631aecb2">ClusterStatus_Get</a>(<span class="keywordtype">void</span>){ <span class="keywordflow">return</span> (<a class="code" href="Clustering_8h.html#ad2386d689ac9def8b6c87391d14c00c2">ClusterStatus</a>)mClusterAddress.Status;}</div>
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordtype">void</span> </div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classGridPoint.html#ae332769bd0c4e8eb7c31075ba6f0bc5e"> 61</a></span>  <a class="code" href="classGridPoint.html#ae332769bd0c4e8eb7c31075ba6f0bc5e">ClusterStatus_Set</a>(<a class="code" href="Clustering_8h.html#ad2386d689ac9def8b6c87391d14c00c2">ClusterStatus</a> CS){ mClusterAddress.Status = (int)CS;}</div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classGridPoint.html#aec208dc2466c9317733b5f7878f4e5bc"> 62</a></span>  int8_t <a class="code" href="classGridPoint.html#aec208dc2466c9317733b5f7878f4e5bc">X</a>, </div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classGridPoint.html#a0754d42eaecab660d4dcfcfaae28cbeb"> 63</a></span>  <a class="code" href="classGridPoint.html#a0754d42eaecab660d4dcfcfaae28cbeb">Y</a>; </div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <a class="code" href="structClusterAddress__t.html">ClusterAddress_t</a></div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classGridPoint.html#a84a8fa5156fe7bc7291f0e5595fc8496"> 65</a></span>  <a class="code" href="classGridPoint.html#a84a8fa5156fe7bc7291f0e5595fc8496">mClusterAddress</a>; </div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keywordtype">int</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  YPosition_Get(<span class="keywordtype">void</span>){ <span class="keywordflow">return</span> Y*2 +moduloN(X,2); }</div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  </div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <span class="keywordtype">bool</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classGridPoint.html#a9539267de255431eb03e6557c8facb56"> 77</a></span>  <a class="code" href="classGridPoint.html#a9539267de255431eb03e6557c8facb56">IsNeighborOf</a>(<a class="code" href="classGridPoint.html">GridPoint</a>* GP)</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  {</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keywordflow">if</span>(!(GP)) <span class="keywordflow">return</span> <span class="keyword">false</span>; <span class="comment">// The candidate GridPoint is outside</span></div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="comment">// Check N and S</span></div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keywordflow">if</span>( (X == GP-><a class="code" href="classGridPoint.html#aec208dc2466c9317733b5f7878f4e5bc">X</a>) && (abs(YPosition_Get() - GP->YPosition_Get()) == 2)) <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="comment">// Check NE, SE, SW, NW positions</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keywordflow">return</span>( (abs(X - GP-><a class="code" href="classGridPoint.html#aec208dc2466c9317733b5f7878f4e5bc">X</a>) == 1) && (abs(YPosition_Get() - GP->YPosition_Get()) == 1) );</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  }</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  </div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  </div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keywordtype">bool</span></div>
<div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="classGridPoint.html#a01c9ffd0620027001625d3f08f174633"> 93</a></span>  <a class="code" href="classGridPoint.html#a01c9ffd0620027001625d3f08f174633">Is2ndNeighborOf</a>(<a class="code" href="classGridPoint.html">GridPoint</a>* GP)</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  {</div>
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordflow">if</span>(!(GP)) <span class="keywordflow">return</span> <span class="keyword">false</span>; <span class="comment">// The candidate GridPoint is outside</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="comment">// Both points are within the grid</span></div>
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="comment">// Check N and S</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="keywordflow">if</span>( (abs(X - GP-><a class="code" href="classGridPoint.html#aec208dc2466c9317733b5f7878f4e5bc">X</a>)== 0) && (abs(YPosition_Get() - GP->YPosition_Get()) == 4)) <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="comment">// Check E and W</span></div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keywordflow">if</span>( (abs(X - GP-><a class="code" href="classGridPoint.html#aec208dc2466c9317733b5f7878f4e5bc">X</a>)== 2) && (abs(YPosition_Get() - GP->YPosition_Get()) == 0)) <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="comment">// Check NNE, SE, SW, NNW positions</span></div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keywordflow">if</span>( (abs(X - GP-><a class="code" href="classGridPoint.html#aec208dc2466c9317733b5f7878f4e5bc">X</a>) == 1) && (abs(YPosition_Get() - GP->YPosition_Get()) == 3) ) <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="comment">// Check NNE, SSE, SSW, NNW positions</span></div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordflow">if</span>( (abs(X - GP-><a class="code" href="classGridPoint.html#aec208dc2466c9317733b5f7878f4e5bc">X</a>) == 2) && (abs(YPosition_Get() - GP->YPosition_Get()) == 2) ) <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="keywordflow">return</span> <span class="keyword">false</span>;</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>  </div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <span class="keywordtype">bool</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classGridPoint.html#a9fd08b588865c71768bf4dad745c425e"> 114</a></span>  <a class="code" href="classGridPoint.html#a9fd08b588865c71768bf4dad745c425e">IsTheSameAs</a>(<a class="code" href="classGridPoint.html">GridPoint</a>* GP)</div>
<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  {</div>
<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordflow">if</span>(!GP) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordflow">return</span> <span class="keyword">this</span> == GP;</div>
<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  }</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keywordtype">bool</span></div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="classGridPoint.html#ab5e0d9e92edd400f93fea53e6bf34b1f"> 125</a></span>  <a class="code" href="classGridPoint.html#ab5e0d9e92edd400f93fea53e6bf34b1f">IsInTheSameClusterAs</a>(<a class="code" href="classGridPoint.html">GridPoint</a>* GP)</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  {</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordflow">if</span>(!GP) <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <span class="keywordflow">return</span> mClusterAddress.Cluster == GP-><a class="code" href="classGridPoint.html#ab9305605bd00eb2a0700b051d2968c02">ClusterAddress_Get</a>().<a class="code" href="structClusterAddress__t.html#a81cb9858407f9b2f289332a8c766dde7">Cluster</a>;</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  }</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  </div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="preprocessor">#if 0</span></div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  </div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keywordtype">string</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  StringOfProxy_Get(<span class="keywordtype">void</span></div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  )</div>
<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  { ostringstream oss;</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <a class="code" href="structClusterAddress__t.html">ClusterAddress_t</a> CA = ClusterAddress_Get();</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keywordflow">if</span>(CA.<a class="code" href="structClusterAddress__t.html#acf14e4884465281332f182b26498e9ba">Proxy</a>) {oss << <span class="stringliteral">":"</span> << ClusterMembers[CA.<a class="code" href="structClusterAddress__t.html#acf14e4884465281332f182b26498e9ba">Proxy</a>].name;}</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordflow">return</span> oss.str();</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  }</div>
<div class="line"><a name="l00144"></a><span class="lineno"> 144</span> <span class="preprocessor">#endif //0</span></div>
<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  </div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <span class="keywordtype">string</span></div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="classGridPoint.html#a7c6b79ffa1a5a1296ca65bfcc3920669"> 150</a></span>  <a class="code" href="classGridPoint.html#a7c6b79ffa1a5a1296ca65bfcc3920669">StringOfThread_Get</a>(</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  )</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  { ostringstream oss;</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <a class="code" href="structClusterAddress__t.html">ClusterAddress_t</a> CA = ClusterAddress_Get();</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span> <span class="comment">// if(CA.HThread)</span></div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  oss << CA.<a class="code" href="structClusterAddress__t.html#a87b21ba8481851ae747abd524e6cc27a">HThread</a>;</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keywordflow">return</span> oss.str();</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>  <span class="keywordtype">string</span></div>
<div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="classGridPoint.html#a0c6f9a6f7f665051311a977b5bf5a866"> 166</a></span>  <a class="code" href="classGridPoint.html#a0c6f9a6f7f665051311a977b5bf5a866">StringOfClusterAddressName_Get</a>(<span class="keywordtype">void</span>)</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  {</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  ostringstream oss;</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  oss << <span class="charliteral">'{'</span> << (int16_t)X << <span class="charliteral">','</span> << (int16_t)YPosition_Get() << <span class="charliteral">'}'</span> << <span class="charliteral">'='</span>;</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  oss << <span class="stringliteral">"("</span> ;</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <a class="code" href="structClusterAddress__t.html">ClusterAddress_t</a> CA = ClusterAddress_Get();</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  oss << CA.<a class="code" href="structClusterAddress__t.html#a81cb9858407f9b2f289332a8c766dde7">Cluster</a> << <span class="stringliteral">"."</span> << ClusterMembers[CA.<a class="code" href="structClusterAddress__t.html#a3f980f3fb8289ab4598b337839ae652a">Member</a>].name;</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keywordflow">if</span>(CA.<a class="code" href="structClusterAddress__t.html#acf14e4884465281332f182b26498e9ba">Proxy</a>) {oss << <span class="stringliteral">":"</span> << ClusterMembers[CA.<a class="code" href="structClusterAddress__t.html#acf14e4884465281332f182b26498e9ba">Proxy</a>].name;}</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span> <span class="comment">// oss << StringOfProxy_Get() << ")";</span></div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="keywordflow">if</span>(CA.<a class="code" href="structClusterAddress__t.html#a87b21ba8481851ae747abd524e6cc27a">HThread</a>) oss << <span class="charliteral">'/'</span> << StringOfThread_Get();</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="keywordflow">return</span> oss.str();</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  }</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  </div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span> };</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  </div>
<div class="line"><a name="l00181"></a><span class="lineno"> 181</span> <span class="preprocessor">#endif // GRIDPOINT_H</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclassGridPoint_html_a01c9ffd0620027001625d3f08f174633"><div class="ttname"><a href="classGridPoint.html#a01c9ffd0620027001625d3f08f174633">GridPoint::Is2ndNeighborOf</a></div><div class="ttdeci">bool Is2ndNeighborOf(GridPoint *GP)</div><div class="ttdoc">Return true if we are a second neighbor of GP.</div><div class="ttdef"><b>Definition:</b> GridPoint.h:93</div></div>
<div class="ttc" id="aclassGridPoint_html_a0754d42eaecab660d4dcfcfaae28cbeb"><div class="ttname"><a href="classGridPoint.html#a0754d42eaecab660d4dcfcfaae28cbeb">GridPoint::Y</a></div><div class="ttdeci">int8_t Y</div><div class="ttdoc">The Y index of the gridpont.</div><div class="ttdef"><b>Definition:</b> GridPoint.h:63</div></div>
<div class="ttc" id="aclassGridPoint_html_a5f975ae074503ba10a6bd0aa5efd6aa1"><div class="ttname"><a href="classGridPoint.html#a5f975ae074503ba10a6bd0aa5efd6aa1">GridPoint::ClusterAddressHThread_Set</a></div><div class="ttdeci">void ClusterAddressHThread_Set(int H)</div><div class="ttdoc">Set the cluster address of the gridpoint.</div><div class="ttdef"><b>Definition:</b> GridPoint.h:57</div></div>
<div class="ttc" id="aclassGridPoint_html"><div class="ttname"><a href="classGridPoint.html">GridPoint</a></div><div class="ttdoc">This class handles the topological information for the modules. Provides a lot of math-only utility f...</div><div class="ttdef"><b>Definition:</b> GridPoint.h:33</div></div>
<div class="ttc" id="aclassGridPoint_html_a0c6f9a6f7f665051311a977b5bf5a866"><div class="ttname"><a href="classGridPoint.html#a0c6f9a6f7f665051311a977b5bf5a866">GridPoint::StringOfClusterAddressName_Get</a></div><div class="ttdeci">string StringOfClusterAddressName_Get(void)</div><div class="ttdoc">Return the string form of our cluster address.</div><div class="ttdef"><b>Definition:</b> GridPoint.h:166</div></div>
<div class="ttc" id="aclassscHThread_html"><div class="ttname"><a href="classscHThread.html">scHThread</a></div><div class="ttdoc">The scHThread class.</div><div class="ttdef"><b>Definition:</b> scHThread.h:138</div></div>
<div class="ttc" id="aclassGridPoint_html_a7c6b79ffa1a5a1296ca65bfcc3920669"><div class="ttname"><a href="classGridPoint.html#a7c6b79ffa1a5a1296ca65bfcc3920669">GridPoint::StringOfThread_Get</a></div><div class="ttdeci">string StringOfThread_Get()</div><div class="ttdoc">Return the string describing the actual thread.</div><div class="ttdef"><b>Definition:</b> GridPoint.h:150</div></div>
<div class="ttc" id="aclassGridPoint_html_aff09c315c692b159d44c9496631aecb2"><div class="ttname"><a href="classGridPoint.html#aff09c315c692b159d44c9496631aecb2">GridPoint::ClusterStatus_Get</a></div><div class="ttdeci">ClusterStatus ClusterStatus_Get(void)</div><div class="ttdoc">Return the status of the gridpoint.</div><div class="ttdef"><b>Definition:</b> GridPoint.h:59</div></div>
<div class="ttc" id="aclassGridPoint_html_a84a8fa5156fe7bc7291f0e5595fc8496"><div class="ttname"><a href="classGridPoint.html#a84a8fa5156fe7bc7291f0e5595fc8496">GridPoint::mClusterAddress</a></div><div class="ttdeci">ClusterAddress_t mClusterAddress</div><div class="ttdoc">The ClusterAddress_t address of the gridpoint.</div><div class="ttdef"><b>Definition:</b> GridPoint.h:65</div></div>
<div class="ttc" id="astructClusterAddress__t_html_a81cb9858407f9b2f289332a8c766dde7"><div class="ttname"><a href="structClusterAddress__t.html#a81cb9858407f9b2f289332a8c766dde7">ClusterAddress_t::Cluster</a></div><div class="ttdeci">uint32_t Cluster</div><div class="ttdoc">The sequence number of the cluster.</div><div class="ttdef"><b>Definition:</b> Clustering.h:62</div></div>
<div class="ttc" id="astructClusterAddress__t_html"><div class="ttname"><a href="structClusterAddress__t.html">ClusterAddress_t</a></div><div class="ttdoc">A GridPoint can be addressed also by its cluster address of type ClusterAddress_t....</div><div class="ttdef"><b>Definition:</b> Clustering.h:58</div></div>
<div class="ttc" id="aClustering_8h_html_ad2386d689ac9def8b6c87391d14c00c2a17c465b98aa8146769a195d07ac5dd73"><div class="ttname"><a href="Clustering_8h.html#ad2386d689ac9def8b6c87391d14c00c2a17c465b98aa8146769a195d07ac5dd73">cs_NONE</a></div><div class="ttdeci">@ cs_NONE</div><div class="ttdoc">not specified (untouched)</div><div class="ttdef"><b>Definition:</b> Clustering.h:25</div></div>
<div class="ttc" id="aclassGridPoint_html_ab9305605bd00eb2a0700b051d2968c02"><div class="ttname"><a href="classGridPoint.html#ab9305605bd00eb2a0700b051d2968c02">GridPoint::ClusterAddress_Get</a></div><div class="ttdeci">ClusterAddress_t ClusterAddress_Get(void)</div><div class="ttdoc">< Return the cluster address of the gridpoint, stored in the matrix</div><div class="ttdef"><b>Definition:</b> GridPoint.h:53</div></div>
<div class="ttc" id="astructClusterAddress__t_html_acf14e4884465281332f182b26498e9ba"><div class="ttname"><a href="structClusterAddress__t.html#acf14e4884465281332f182b26498e9ba">ClusterAddress_t::Proxy</a></div><div class="ttdeci">uint32_t Proxy</div><div class="ttdoc">Reachable through this neighbor (Relative to the core)</div><div class="ttdef"><b>Definition:</b> Clustering.h:61</div></div>
<div class="ttc" id="aclassGridPoint_html_a9539267de255431eb03e6557c8facb56"><div class="ttname"><a href="classGridPoint.html#a9539267de255431eb03e6557c8facb56">GridPoint::IsNeighborOf</a></div><div class="ttdeci">bool IsNeighborOf(GridPoint *GP)</div><div class="ttdoc">Return true if we are an immediate neighbor of GP.</div><div class="ttdef"><b>Definition:</b> GridPoint.h:77</div></div>
<div class="ttc" id="aclassGridPoint_html_a41341f8840bb8be9afacb9a9bb672684"><div class="ttname"><a href="classGridPoint.html#a41341f8840bb8be9afacb9a9bb672684">GridPoint::ClusterAddress_Set</a></div><div class="ttdeci">void ClusterAddress_Set(ClusterAddress_t CA)</div><div class="ttdoc">Set the cluster address of the gridpoint.</div><div class="ttdef"><b>Definition:</b> GridPoint.h:55</div></div>
<div class="ttc" id="aclassGridPoint_html_a9fd08b588865c71768bf4dad745c425e"><div class="ttname"><a href="classGridPoint.html#a9fd08b588865c71768bf4dad745c425e">GridPoint::IsTheSameAs</a></div><div class="ttdeci">bool IsTheSameAs(GridPoint *GP)</div><div class="ttdoc">Return true if GridPoint GP is identical with us.</div><div class="ttdef"><b>Definition:</b> GridPoint.h:114</div></div>
<div class="ttc" id="aclassGridPoint_html_ab5e0d9e92edd400f93fea53e6bf34b1f"><div class="ttname"><a href="classGridPoint.html#ab5e0d9e92edd400f93fea53e6bf34b1f">GridPoint::IsInTheSameClusterAs</a></div><div class="ttdeci">bool IsInTheSameClusterAs(GridPoint *GP)</div><div class="ttdoc">Return true if we and GridPoint GP are in the same cluster.</div><div class="ttdef"><b>Definition:</b> GridPoint.h:125</div></div>
<div class="ttc" id="aClustering_8h_html_a37416c0360a3b79ff7111edbcfc6e9c7a30ca2bf0a2cb4f9f5e06fcfe995f1b40"><div class="ttname"><a href="Clustering_8h.html#a37416c0360a3b79ff7111edbcfc6e9c7a30ca2bf0a2cb4f9f5e06fcfe995f1b40">cm_Head</a></div><div class="ttdeci">@ cm_Head</div><div class="ttdoc">The central gridpoint.</div><div class="ttdef"><b>Definition:</b> Clustering.h:35</div></div>
<div class="ttc" id="astructClusterAddress__t_html_a87b21ba8481851ae747abd524e6cc27a"><div class="ttname"><a href="structClusterAddress__t.html#a87b21ba8481851ae747abd524e6cc27a">ClusterAddress_t::HThread</a></div><div class="ttdeci">uint32_t HThread</div><div class="ttdoc">The 'hardware thread' the module handles.</div><div class="ttdef"><b>Definition:</b> Clustering.h:59</div></div>
<div class="ttc" id="aclassGridPoint_html_aec208dc2466c9317733b5f7878f4e5bc"><div class="ttname"><a href="classGridPoint.html#aec208dc2466c9317733b5f7878f4e5bc">GridPoint::X</a></div><div class="ttdeci">int8_t X</div><div class="ttdoc">The X index of the gridpont.</div><div class="ttdef"><b>Definition:</b> GridPoint.h:62</div></div>
<div class="ttc" id="aClustering_8h_html_ad2386d689ac9def8b6c87391d14c00c2"><div class="ttname"><a href="Clustering_8h.html#ad2386d689ac9def8b6c87391d14c00c2">ClusterStatus</a></div><div class="ttdeci">ClusterStatus</div><div class="ttdoc">The gridpoints can be the head of the cluster, a member of a cluster, or neither (stand-alone)</div><div class="ttdef"><b>Definition:</b> Clustering.h:24</div></div>
<div class="ttc" id="aclassGridPoint_html_ae332769bd0c4e8eb7c31075ba6f0bc5e"><div class="ttname"><a href="classGridPoint.html#ae332769bd0c4e8eb7c31075ba6f0bc5e">GridPoint::ClusterStatus_Set</a></div><div class="ttdeci">void ClusterStatus_Set(ClusterStatus CS)</div><div class="ttdoc">Set the cstatus of the gridpoint.</div><div class="ttdef"><b>Definition:</b> GridPoint.h:61</div></div>
<div class="ttc" id="astructClusterAddress__t_html_a3f980f3fb8289ab4598b337839ae652a"><div class="ttname"><a href="structClusterAddress__t.html#a3f980f3fb8289ab4598b337839ae652a">ClusterAddress_t::Member</a></div><div class="ttdeci">uint32_t Member</div><div class="ttdef"><b>Definition:</b> Clustering.h:60</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_e05d7e2b1ecd646af5bb94391405f3b5.html">modules</a></li><li class="navelem"><a class="el" href="dir_245247ea24478951905c43d9abcfc398.html">BASIC</a></li><li class="navelem"><a class="el" href="dir_1d1d4084525b8db6f67fc3a8c723c59b.html">include</a></li><li class="navelem"><a class="el" href="GridPoint_8h.html">GridPoint.h</a></li>
<li class="footer">Generated on Wed Apr 7 2021 15:24:23 for TAC V0.0.4 @ 2021.04.07 by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
</ul>
</div>
</body>
</html>