-
Notifications
You must be signed in to change notification settings - Fork 7
/
geopm::IOGroup.3.html
472 lines (423 loc) · 47 KB
/
geopm::IOGroup.3.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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
<!DOCTYPE html>
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>geopm::IOGroup(3) – provides system values and settings — GEOPM documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=9bcbadda"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="geopm::MPIComm(3) – implementation of Comm using MPI" href="geopm%3A%3AMPIComm.3.html" />
<link rel="prev" title="geopm::Helper – common helper methods" href="geopm%3A%3AHelper.3.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home">
GEOPM
<img src="https://geopm.github.io/images/geopm-logo-clear.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="overview.html">Getting Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="user_guides.html">User Guides</a></li>
<li class="toctree-l1"><a class="reference internal" href="contrib.html">Contributor Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="devel.html">Developer Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="publications.html">Publications</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="reference.html">Reference Manual</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="reference.html#geopm-manual-pages">GEOPM Manual Pages</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="geopm.7.html">geopm(7) – Global Extensible Open Power Manager</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio.7.html">geopm_pio(7) – GEOPM PlatformIO interface</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio_cnl.7.html">geopm_pio_cnl(7) – Signals and controls for Compute Node Linux Board-Level Metrics</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio_const_config.7.html">geopm_pio_const_config(7) – Signals for ConstConfigIOGroup</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio_cpuinfo.7.html">geopm_pio_cpuinfo(7) – Signals and controls for the CPUInfoIOGroup</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio_dcgm.7.html">geopm_pio_dcgm(7) – IOGroup providing signals and controls for NVIDIA GPUs</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio_levelzero.7.html">geopm_pio_levelzero(7) – IOGroup providing signals and controls for Intel GPUs</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio_msr.7.html">geopm_pio_msr(7) – Signals and controls for Model Specific Registers (MSRs)</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio_nvml.7.html">geopm_pio_nvml(7) – IOGroup providing signals and controls for NVIDIA GPUs</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio_profile.7.html">geopm_pio_profile(7) – Signals and controls for the ProfileIOGroup</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio_service.7.html">geopm_pio_service(7) – Signals and controls for the ServiceIOGroup</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio_sst.7.html">geopm_pio_sst(7) – Signals and controls for Intel Speed Select Technology</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio_sysfs.7.html">geopm_pio_sysfs(7) – Signals and controls for sysfs attributes</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio_time.7.html">geopm_pio_time(7) – Signals and controls for Time IO Group</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopmaccess.1.html">geopmaccess(1) – Access management for the GEOPM Service</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopmadmin.1.html">geopmadmin(1) – tool for GEOPM system administrators</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopmagent.1.html">geopmagent(1) – query agent information and create static policies</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopmbench.1.html">geopmbench(1) – synthetic benchmark application</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopmctl.1.html">geopmctl(1) – GEOPM runtime control application</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopmendpoint.1.html">geopmendpoint(1) – command line tool for dynamic policy control</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopmexporter.1.html">geopmexporter(1) – Prometheus exporter for GEOPM metrics</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopmlaunch.1.html">geopmlaunch(1) – application launch wrapper</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopmread.1.html">geopmread(1) – query platform information</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopmsession.1.html">geopmsession(1) – Command line interface for the GEOPM service batch read features</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopmwrite.1.html">geopmwrite(1) – modify platform state</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopmdpy.7.html">geopmdpy(7) – global extensible open power manager python daemon package</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopmpy.7.html">geopmpy(7) – global extensible open power manager python package</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_agent.3.html">geopm_agent(3) – query information about available agents</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_ctl.3.html">geopm_ctl(3) – GEOPM runtime control thread</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_daemon.3.html">geopm_daemon(3) – helpers for GEOPM daemons</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_endpoint.3.html">geopm_endpoint(3) – dynamic policy control for resource management</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_error.3.html">geopm_error(3) – error code descriptions</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_field.3.html">geopm_agent(3) – query information about available agents</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_fortran.3.html">geopm_fortran(3) – GEOPM fortran interface</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_hash.3.html">geopm_hash(3) – helper methods for encoding</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_imbalancer.3.html">geopm_imbalancer(3) – set artificial runtime imbalance</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_pio.3.html">geopm_pio(3) – interfaces to query and modify platform</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_policystore.3.html">geopm_policystore(3) – GEOPM resource policy store interface</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_prof.3.html">geopm_prof(3) – application profiling interfaces</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_sched.3.html">geopm_sched(3) – interface with Linux scheduler</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_time.3.html">geopm_time(3) – helper methods for time</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_topo.3.html">geopm_topo(3) – query platform component topology</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_version.3.html">geopm_version(3) – GEOPM library version</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3AAgent.3.html">geopm::Agent(3) – GEOPM agent plugin interface</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3AAgg.3.html">geopm::Agg(3) – data aggregation functions</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3ACNLIOGroup.3.html">geopm::CNLIOGroup(3) – IOGroup for interaction with Compute Node Linux</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3ACPUActivityAgent.3.html">geopm::CPUActivityAgent(3) – agent for selecting CPU frequency based on CPU compute activity</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3ACircularBuffer.3.html">geopm::CircularBuffer(3) – generic circular buffer</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3AComm.3.html">geopm::Comm(3) – communication abstractions</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3ACpuinfoIOGroup.3.html">geopm::CpuinfoIOGroup(3) – IOGroup for CPU frequency limits</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3ADaemon.3.html">geopm::Daemon(3) – GEOPM daemon helper methods</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3AEndpoint.3.html">geopm::Endpoint(3) – GEOPM endpoint interface</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3AException.3.html">geopm::Exception(3) – custom GEOPM exceptions</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3AGPUActivityAgent.3.html">geopm::GPUActivityAgent(3) – agent for selecting GPU frequency based on GPU compute activity</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3AHelper.3.html">geopm::Helper – common helper methods</a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#">geopm::IOGroup(3) – provides system values and settings</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#namespaces">Namespaces</a></li>
<li class="toctree-l4"><a class="reference internal" href="#synopsis">Synopsis</a></li>
<li class="toctree-l4"><a class="reference internal" href="#description">Description</a></li>
<li class="toctree-l4"><a class="reference internal" href="#terms">Terms</a></li>
<li class="toctree-l4"><a class="reference internal" href="#factory-accessor">Factory Accessor</a></li>
<li class="toctree-l4"><a class="reference internal" href="#class-methods">Class Methods</a></li>
<li class="toctree-l4"><a class="reference internal" href="#example">Example</a></li>
<li class="toctree-l4"><a class="reference internal" href="#see-also">See Also</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3AMPIComm.3.html">geopm::MPIComm(3) – implementation of Comm using MPI</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3AMSRIO.3.html">geopm::MSRIO(3) – methods for reading and writing MSRs</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3AMSRIOGroup.3.html">geopm::MSRIOGroup – IOGroup providing MSR-based signals and controls</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3AMonitorAgent.3.html">geopm::MonitorAgent – agent that enforces no policies</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3APlatformIO.3.html">geopm::PlatformIO(3) – GEOPM platform interface</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3APlatformTopo.3.html">geopm::PlatformTopo(3) – platform topology information</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3APluginFactory.3.html">geopm::PluginFactory(3) – abstract factory for plugins</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3APowerBalancer.3.html">geopm::PowerBalancer(3) – balances power according to epoch runtime</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3APowerBalancerAgent.3.html">geopm::PowerBalancerAgent(3) – agent optimizing performance under a power cap</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3APowerGovernor.3.html">geopm::PowerGovernor(3) – enforces a power limit</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3APowerGovernorAgent.3.html">geopm::PowerGovernorAgent(3) – agent that enforces a power cap</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3AProfileIOGroup.3.html">geopm::ProfileIOGroup(3) – IOGroup providing application signals</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3ASampleAggregator.3.html">geopm::SampleAggregator(3) – per-region aggregated signal data</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3ASharedMemory.3.html">geopm::SharedMemory(3) – abstractions for shared memory</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm%3A%3ATimeIOGroup.3.html">geopm::TimeIOGroup(3) – IOGroup providing time signals</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_report.7.html">geopm_report(7) – GEOPM summary report file</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_agent_cpu_activity.7.html">geopm_agent_cpu_activity(7) – agent for selecting CPU frequency based on CPU compute activity</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_agent_ffnet.7.html">geopm_agent_ffnet(7) – agent for adjusting frequencies based on application behavior</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_agent_frequency_map.7.html">geopm_agent_frequency_map(7) – agent for running regions at user selected frequencies</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_agent_gpu_activity.7.html">geopm_agent_gpu_activity(7) – agent for selecting GPU frequency based on GPU compute activity</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_agent_monitor.7.html">geopm_agent_monitor(7) – agent implementation for aggregating statistics</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_agent_power_balancer.7.html">geopm_agent_power_balancer(7) – agent optimizes performance under a power cap</a></li>
<li class="toctree-l3"><a class="reference internal" href="geopm_agent_power_governor.7.html">geopm_agent_power_governor(7) – agent enforces a power cap</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#doxygen-pages">Doxygen Pages</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="releases.html">Releases</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">GEOPM</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item"><a href="reference.html">Reference Manual</a></li>
<li class="breadcrumb-item active">geopm::IOGroup(3) – provides system values and settings</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/geopm::IOGroup.3.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="geopm-iogroup-3-provides-system-values-and-settings">
<h1>geopm::IOGroup(3) – provides system values and settings<a class="headerlink" href="#geopm-iogroup-3-provides-system-values-and-settings" title="Link to this heading"></a></h1>
<section id="namespaces">
<h2>Namespaces<a class="headerlink" href="#namespaces" title="Link to this heading"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">IOGroup</span></code> class and the <code class="docutils literal notranslate"><span class="pre">iogroup_factory()</span></code> singleton accessor
function are members of the <code class="docutils literal notranslate"><span class="pre">namespace</span> <span class="pre">geopm</span></code>, but the full names,
<code class="docutils literal notranslate"><span class="pre">geopm::IOGroup</span></code> and <code class="docutils literal notranslate"><span class="pre">geopm::iogroup_factory()</span></code>, have been abbreviated
in this manual. Similarly, the <code class="docutils literal notranslate"><span class="pre">std::</span></code> namespace specifier has been
omitted from the interface definitions for the following standard
types: <code class="docutils literal notranslate"><span class="pre">std::vector</span></code>, <code class="docutils literal notranslate"><span class="pre">std::string</span></code>, <code class="docutils literal notranslate"><span class="pre">std::set</span></code>, and <code class="docutils literal notranslate"><span class="pre">std::function</span></code>,
to enable better rendering of this manual.</p>
</section>
<section id="synopsis">
<h2>Synopsis<a class="headerlink" href="#synopsis" title="Link to this heading"></a></h2>
<p>#include <a class="reference external" href="https://github.com/geopm/geopm/blob/dev/libgeopmd/include/geopm/IOGroup.hpp"><geopm/IOGroup.hpp></a></p>
<p>Link with <code class="docutils literal notranslate"><span class="pre">-lgeopmd</span></code></p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span><span class="n">PluginFactory</span><span class="o"><</span><span class="n">IOGroup</span><span class="o">></span><span class="w"> </span><span class="o">&</span><span class="n">iogroup_factory</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
<span class="k">static</span><span class="w"> </span><span class="n">vector</span><span class="o"><</span><span class="n">string</span><span class="o">></span><span class="w"> </span><span class="n">IOGroup</span><span class="o">::</span><span class="n">iogroup_names</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
<span class="k">static</span><span class="w"> </span><span class="n">unique_ptr</span><span class="o"><</span><span class="n">IOGroup</span><span class="o">></span><span class="w"> </span><span class="n">IOGroup</span><span class="o">::</span><span class="n">make_unique</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">iogroup_name</span><span class="p">);</span>
<span class="n">set</span><span class="o"><</span><span class="n">string</span><span class="o">></span><span class="w"> </span><span class="n">IOGroup</span><span class="o">::</span><span class="n">signal_names</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span>
<span class="n">set</span><span class="o"><</span><span class="n">string</span><span class="o">></span><span class="w"> </span><span class="n">IOGroup</span><span class="o">::</span><span class="n">control_names</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span>
<span class="kt">bool</span><span class="w"> </span><span class="nf">IOGroup::is_valid_signal</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">signal_name</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span>
<span class="kt">bool</span><span class="w"> </span><span class="nf">IOGroup::is_valid_control</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">control_name</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span>
<span class="kt">int</span><span class="w"> </span><span class="nf">IOGroup::signal_domain_type</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">signal_name</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span>
<span class="kt">int</span><span class="w"> </span><span class="nf">IOGroup::control_domain_type</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">control_name</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span>
<span class="kt">int</span><span class="w"> </span><span class="nf">IOGroup::push_signal</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">signal_name</span><span class="p">,</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">domain_type</span><span class="p">,</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">domain_idx</span><span class="p">);</span>
<span class="kt">int</span><span class="w"> </span><span class="nf">IOGroup::push_control</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">control_name</span><span class="p">,</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">domain_type</span><span class="p">,</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">domain_idx</span><span class="p">);</span>
<span class="kt">void</span><span class="w"> </span><span class="nf">IOGroup::read_batch</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
<span class="kt">void</span><span class="w"> </span><span class="nf">IOGroup::write_batch</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
<span class="kt">double</span><span class="w"> </span><span class="nf">IOGroup::sample</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">sample_idx</span><span class="p">);</span>
<span class="kt">void</span><span class="w"> </span><span class="nf">IOGroup::adjust</span><span class="p">(</span><span class="kt">int</span><span class="w"> </span><span class="n">control_idx</span><span class="p">,</span>
<span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">setting</span><span class="p">);</span>
<span class="kt">double</span><span class="w"> </span><span class="nf">IOGroup::read_signal</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">signal_name</span><span class="p">,</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">domain_type</span><span class="p">,</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">domain_idx</span><span class="p">);</span>
<span class="kt">void</span><span class="w"> </span><span class="nf">IOGroup::write_control</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">control_name</span><span class="p">,</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">domain_type</span><span class="p">,</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">domain_idx</span><span class="p">,</span>
<span class="w"> </span><span class="kt">double</span><span class="w"> </span><span class="n">setting</span><span class="p">);</span>
<span class="kt">void</span><span class="w"> </span><span class="nf">IOGroup::save_control</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
<span class="kt">void</span><span class="w"> </span><span class="nf">IOGroup::restore_control</span><span class="p">(</span><span class="kt">void</span><span class="p">);</span>
<span class="n">function</span><span class="o"><</span><span class="kt">double</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">vector</span><span class="o"><</span><span class="kt">double</span><span class="o">></span><span class="w"> </span><span class="o">&</span><span class="p">)</span><span class="o">></span><span class="w"> </span><span class="n">IOGroup</span><span class="o">::</span><span class="n">agg_function</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">signal_name</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span>
<span class="n">function</span><span class="o"><</span><span class="n">string</span><span class="p">(</span><span class="kt">double</span><span class="p">)</span><span class="o">></span><span class="w"> </span><span class="n">IOGroup</span><span class="o">::</span><span class="n">format_function</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">signal_name</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span>
<span class="n">string</span><span class="w"> </span><span class="nf">IOGroup::signal_description</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">signal_name</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span>
<span class="n">string</span><span class="w"> </span><span class="nf">IOGroup::control_description</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">control_name</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span>
<span class="kt">int</span><span class="w"> </span><span class="nf">IOGroup::signal_behavior</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">signal_name</span><span class="p">)</span><span class="w"> </span><span class="k">const</span><span class="p">;</span>
<span class="kt">void</span><span class="w"> </span><span class="nf">IOGroup::save_control</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">save_path</span><span class="p">);</span>
<span class="kt">void</span><span class="w"> </span><span class="nf">IOGroup::restore_control</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">save_path</span><span class="p">);</span>
<span class="k">static</span><span class="w"> </span><span class="n">IOGroup</span><span class="o">::</span><span class="n">m_units_e</span><span class="w"> </span><span class="nf">IOGroup::string_to_units</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">str</span><span class="p">);</span>
<span class="k">static</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="nf">IOGroup::units_to_string</span><span class="p">(</span><span class="kt">int</span><span class="p">);</span>
<span class="k">static</span><span class="w"> </span><span class="n">IOGroup</span><span class="o">::</span><span class="n">m_signal_behavior_e</span><span class="w"> </span><span class="nf">IOGroup::string_to_behavior</span><span class="p">(</span><span class="k">const</span><span class="w"> </span><span class="n">string</span><span class="w"> </span><span class="o">&</span><span class="n">str</span><span class="p">);</span>
</pre></div>
</div>
</section>
<section id="description">
<h2>Description<a class="headerlink" href="#description" title="Link to this heading"></a></h2>
<p>The <code class="docutils literal notranslate"><span class="pre">IOGroup</span></code> class is an abstract pure virtual class that defines the high
level interface employed by plugins for sample input and control output. An
<code class="docutils literal notranslate"><span class="pre">Agent</span></code>, provided by the <a class="reference internal" href="geopm%3A%3AAgent.3.html"><span class="doc">geopm::Agent(3)</span></a> class, will define one or more
IOGroups in order to:</p>
<ol class="arabic simple">
<li><p>Acquire the necessary sample data required for the Agent.</p></li>
<li><p>Perform the necessary control operations as specified by the Agent.</p></li>
</ol>
<p>Classes may derive from the <code class="docutils literal notranslate"><span class="pre">IOGroup</span></code> class in order to provide an <code class="docutils literal notranslate"><span class="pre">Agent</span></code> with
additional sample data or control hooks other than what is provided by GEOPM.
The pure virtual methods in this interface must be implemented by every
IOGroup. If an IOGroup provides only signals, the methods related to controls
can have empty or degenerate implementations; the reverse is also true if an
IOGroup only provides controls. In these cases, ensure that <code class="docutils literal notranslate"><span class="pre">is_valid_signal()</span></code>
or <code class="docutils literal notranslate"><span class="pre">is_valid_control()</span></code> returns false as appropriate, and that <code class="docutils literal notranslate"><span class="pre">signal_names()</span></code> or
<code class="docutils literal notranslate"><span class="pre">control_names()</span></code> returns an empty set.
GEOPM provides a number of built-in IOGroups for the most common
usages. The list of built-in IOGroups is as follows:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">CpuinfoIOGroup</span></code>:
Provides constants for CPU frequency limits. Discussed in
<a class="reference internal" href="geopm%3A%3ACpuinfoIOGroup.3.html"><span class="doc">geopm::CpuinfoIOGroup(3)</span></a>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">MSRIOGroup</span></code>:
Provides signals and controls based on MSRs. Discussed in
<a class="reference internal" href="geopm%3A%3AMSRIOGroup.3.html"><span class="doc">geopm::MSRIOGroup(3)</span></a>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">ProfileIOGroup</span></code>:
Provides signals from the application. Discussed in
<a class="reference internal" href="geopm%3A%3AProfileIOGroup.3.html"><span class="doc">geopm::ProfileIOGroup(3)</span></a>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">TimeIOGroup</span></code>:
Provides a signal for the current time. Discussed in
<a class="reference internal" href="geopm%3A%3ATimeIOGroup.3.html"><span class="doc">geopm::TimeIOGroup(3)</span></a>.</p></li>
</ul>
<p>The APIs discussed in <a class="reference internal" href="geopm%3A%3APlatformIO.3.html"><span class="doc">geopm::PlatformIO(3)</span></a> with regard to signals and
controls are ultimately fulfilled by the individual IOGroups that implement
this interface.</p>
<p>If multiple IOGroups define signals or controls that have the same name, the
IOGroup that is loaded last will override the others. This effectively means
that the last loaded IOGroup that defines a signal or control will fulfill
requests for that signal or control.</p>
</section>
<section id="terms">
<h2>Terms<a class="headerlink" href="#terms" title="Link to this heading"></a></h2>
<p>Below are some definitions of terms that are used to describe different parts
of the IOGroup interface. Understanding these terms will help to interpret the
documentation about how to extend IOGroups.</p>
<ul class="simple">
<li><p><em>signal</em>:
Named parameter in SI units that can be measured.</p></li>
<li><p><em>control</em> :
Named parameter in SI units that can be set.</p></li>
<li><p><em>domain</em>:
The discrete component within a compute node where a signal or control is
applicable. For more information see <a class="reference internal" href="geopm%3A%3APlatformTopo.3.html"><span class="doc">geopm::PlatformTopo(3)</span></a>.</p></li>
</ul>
</section>
<section id="factory-accessor">
<h2>Factory Accessor<a class="headerlink" href="#factory-accessor" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">iogroup_factory()</span></code>:
This method returns the singleton accessor for the <code class="docutils literal notranslate"><span class="pre">IOGroupFactory</span></code>.
Calling this method will create the factory if it does not already exist.
If this method is creating the factory, loading of the built-in IOGroups
will be attempted. For more information see <a class="reference internal" href="geopm%3A%3APlatformIO.3.html"><span class="doc">geopm::PlatformIO(3)</span></a>
and/or <a class="reference internal" href="geopm%3A%3APluginFactory.3.html"><span class="doc">geopm::PluginFactory(3)</span></a>.</p></li>
</ul>
</section>
<section id="class-methods">
<h2>Class Methods<a class="headerlink" href="#class-methods" title="Link to this heading"></a></h2>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">iogroup_names()</span></code>:
Provides the list of the IOGroups that are available in the factory.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">make_unique()</span></code>:
Returns a <code class="docutils literal notranslate"><span class="pre">unique_ptr</span></code> to a new IOGroup object,
uses the IOGroup factory to create an object of that type.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">signal_names()</span></code>:
Provides the list of all signals provided by the <code class="docutils literal notranslate"><span class="pre">IOGroup</span></code>. The
set of strings that are returned can be passed as a <code class="docutils literal notranslate"><span class="pre">signal_name</span></code>
to all of the <code class="docutils literal notranslate"><span class="pre">IOGroup</span></code> methods that accept a <code class="docutils literal notranslate"><span class="pre">signal_name</span></code> as an
input parameter.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">control_names()</span></code>:
Provides the list of all controls provided by the <code class="docutils literal notranslate"><span class="pre">IOGroup</span></code>. The set of
strings that are returned can be passed as a <code class="docutils literal notranslate"><span class="pre">control_name</span></code> to all of the
<code class="docutils literal notranslate"><span class="pre">IOGroup</span></code> methods that accept a <code class="docutils literal notranslate"><span class="pre">control_name</span></code> as an input parameter.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">is_valid_signal()</span></code>:
Tests if the <em>signal_name</em> refers to a signal supported by the
<code class="docutils literal notranslate"><span class="pre">IOGroup</span></code>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">is_valid_control()</span></code>:
Test if the <em>control_name</em> refers to a control supported by the
<code class="docutils literal notranslate"><span class="pre">IOGroup</span></code>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">signal_domain_type()</span></code>:
Query the domain for a named signal.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">control_domain_type()</span></code>:
Query the domain for a named control.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">push_signal()</span></code>:
Add a signal to the list of signals that is read by <code class="docutils literal notranslate"><span class="pre">read_batch()</span></code>
and sampled by <code class="docutils literal notranslate"><span class="pre">sample()</span></code>. This method should return a unique index
for each signal that can be utilized when calling <code class="docutils literal notranslate"><span class="pre">sample()</span></code>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">push_control()</span></code>:
Add a control to the list of controls that is written by
<code class="docutils literal notranslate"><span class="pre">write_batch()</span></code> and configured with <code class="docutils literal notranslate"><span class="pre">adjust()</span></code>. This method should
return a unique index for each control that can be utilized when calling
<code class="docutils literal notranslate"><span class="pre">control()</span></code>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">read_batch()</span></code>:
Read all pushed signals from the platform so that the next call to
<code class="docutils literal notranslate"><span class="pre">sample()</span></code> will reflect the updated data. The intention is that
<code class="docutils literal notranslate"><span class="pre">read_batch()</span></code> will read the all of the <code class="docutils literal notranslate"><span class="pre">IOGroup</span></code>‘s signals into memory once
per call.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">write_batch()</span></code>:
Write all of the pushed controls so that values previously given
to <code class="docutils literal notranslate"><span class="pre">adjust()</span></code> are written to the platform.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">sample()</span></code>:
Retrieve a signal value from the data read by the last call to
<code class="docutils literal notranslate"><span class="pre">read_batch()</span></code> for a particular signal previously pushed with
<code class="docutils literal notranslate"><span class="pre">push_signal()</span></code>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">adjust()</span></code>:
Adjust a setting for a particular control that was previously
pushed with <code class="docutils literal notranslate"><span class="pre">push_control()</span></code>. This adjustment will be written to
the platform on the next call to <code class="docutils literal notranslate"><span class="pre">write_batch()</span></code>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">read_signal()</span></code>:
Read from platform and interpret into SI units a signal given its
name and domain. Does <em>not</em> modify the values stored by calling
<code class="docutils literal notranslate"><span class="pre">read_batch()</span></code>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">write_control()</span></code>:
Interpret the setting and write setting to the platform. Does <em>not</em>
modify the values stored by calling <code class="docutils literal notranslate"><span class="pre">adjust()</span></code>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">save_control()</span></code>:
Save the state of all controls so that any subsequent changes made
through the IOGroup can be undone with a call to the <code class="docutils literal notranslate"><span class="pre">restore()</span></code> method.
Also has an overloaded version which takes the <em>save_path</em>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">restore_control()</span></code>:
Restore all controls to values recorded in previous call to the <code class="docutils literal notranslate"><span class="pre">save()</span></code> method.
Also has an overloaded version which takes the <em>save_path</em>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">agg_function()</span></code>:
Returns a function that should be used when aggregating a signal
of the type <em>signal_name</em>. For more information see
<a class="reference internal" href="geopm%3A%3AAgg.3.html"><span class="doc">geopm::Agg(3)</span></a>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">format_function()</span></code>:
Returns a function that can be used to convert a signal of the
type <em>signal_name</em> into a human readable string representation.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">signal_description()</span></code>:
Returns a description of the signal. This string can be used by
tools to generate help text for users of the IOGroup.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">control_description()</span></code>:
Returns a description of the control. This string can be used by
tools to generate help text for users of the IOGroup.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">signal_behavior()</span></code>:
Returns one of the <code class="docutils literal notranslate"><span class="pre">IOGroup::signal_behavior_e</span></code> values which
describes about how a signal will change as a function of time.
This can be used when generating reports to decide how to
summarize a signal’s value for the entire application run.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">string_to_units()</span></code>:
Convert a <code class="docutils literal notranslate"><span class="pre">string</span></code> to the corresponding <code class="docutils literal notranslate"><span class="pre">m_units_e</span></code> value</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">units_to_string()</span></code>:
Convert the <code class="docutils literal notranslate"><span class="pre">m_units_e</span></code> value to the corresponding <code class="docutils literal notranslate"><span class="pre">string</span></code>.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">string_to_behavior()</span></code>:
Convert a <code class="docutils literal notranslate"><span class="pre">string</span></code> to the corresponding <code class="docutils literal notranslate"><span class="pre">m_signal_behavior_e</span></code> value</p></li>
</ul>
</section>
<section id="example">
<h2>Example<a class="headerlink" href="#example" title="Link to this heading"></a></h2>
<p>Please see the <a class="reference external" href="https://github.com/geopm/geopm/tree/dev/tutorial/iogroup">GEOPM IOGroup
tutorial</a> for more
information. That code is located in the GEOPM source under tutorial/iogroup.</p>
<p>Further documentation for this module can be found in the
<a class="reference external" href="https://geopm.github.io/geopm-service-dox/classgeopm_1_1_i_o_group.html">doxygen page</a>.</p>
</section>
<section id="see-also">
<h2>See Also<a class="headerlink" href="#see-also" title="Link to this heading"></a></h2>
<p><a class="reference internal" href="geopm.7.html"><span class="doc">geopm(7)</span></a>,
<a class="reference internal" href="geopm%3A%3AAgg.3.html"><span class="doc">geopm::Agg(3)</span></a>,
<a class="reference internal" href="geopm%3A%3ACpuinfoIOGroup.3.html"><span class="doc">geopm::CpuinfoIOGroup(3)</span></a>,
<a class="reference internal" href="geopm%3A%3AMSRIOGroup.3.html"><span class="doc">geopm::MSRIOGroup(3)</span></a>,
<a class="reference internal" href="geopm%3A%3APlatformIO.3.html"><span class="doc">geopm::PlatformIO(3)</span></a>,
<a class="reference internal" href="geopm%3A%3ATimeIOGroup.3.html"><span class="doc">geopm::TimeIOGroup(3)</span></a></p>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="geopm%3A%3AHelper.3.html" class="btn btn-neutral float-left" title="geopm::Helper – common helper methods" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="geopm%3A%3AMPIComm.3.html" class="btn btn-neutral float-right" title="geopm::MPIComm(3) – implementation of Comm using MPI" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>
<div role="contentinfo">
<p>© Copyright 2015 - 2024 Intel Corporation. All rights reserved..</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>