Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
athena
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
atlas
athena
Merge requests
!20897
Monitored: Remove backwards compatible code
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Monitored: Remove backwards compatible code
fwinkl/athena:monitored_remove_legacy
into
master
Overview
3
Commits
1
Pipelines
1
Changes
9
Merged
Frank Winklmeier
requested to merge
fwinkl/athena:monitored_remove_legacy
into
master
6 years ago
Overview
3
Commits
1
Pipelines
1
Changes
9
Expand
remove C++14 backwards-compatible code
remove deprecation warnings in defineHistogram
improve unit tests
Edited
6 years ago
by
Frank Winklmeier
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
3f24ca33
1 commit,
6 years ago
9 files
+
144
−
239
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
9
Search (e.g. *.vue) (Ctrl+P)
Control/AthenaMonitoring/AthenaMonitoring/MonitoredCollection.h
+
3
−
40
Options
@@ -13,10 +13,6 @@
namespace
Monitored
{
/**
* Monitoring of (double-convertable) collections
*/
// Forward declares
template
<
class
T
>
class
ValuesCollection
;
template
<
class
T
>
class
ObjectsCollection
;
@@ -54,30 +50,10 @@ namespace Monitored {
*/
template
<
class
T
>
ObjectsCollection
<
T
>
Collection
(
std
::
string
name
,
const
T
&
collection
,
std
::
function
<
double
(
const
typename
ObjectsCollection
<
T
>::
const_value_type
&
)
>
converterToDouble
)
{
std
::
function
<
double
(
const
typename
ObjectsCollection
<
T
>::
const_value_type
&
)
>
converterToDouble
)
{
return
ObjectsCollection
<
T
>
(
std
::
move
(
name
),
collection
,
std
::
move
(
converterToDouble
));
}
// TEMPORARY: for backwards compatibility
namespace
MonitoredCollection
{
template
<
class
T
>
[[
deprecated
(
"Use Monitored::Collection instead (see MR athena!20403)"
)]]
ValuesCollection
<
T
>
declare
(
std
::
string
name
,
const
T
&
collection
)
{
return
ValuesCollection
<
T
>
(
std
::
move
(
name
),
collection
);
}
template
<
class
T
>
[[
deprecated
(
"Use Monitored::Collection instead (see MR athena!20403)"
)]]
ObjectsCollection
<
T
>
declare
(
std
::
string
name
,
const
T
&
collection
,
std
::
function
<
double
(
const
typename
ObjectsCollection
<
T
>::
const_value_type
&
)
>
converterToDouble
)
{
return
ObjectsCollection
<
T
>
(
std
::
move
(
name
),
collection
,
std
::
move
(
converterToDouble
));
}
}
// namespace MonitoredCollection
namespace
detail
{
/// Get element type for containers
template
<
typename
T
>
struct
get_value_type
{
typedef
typename
T
::
value_type
value_type
;
};
@@ -103,9 +79,6 @@ namespace Monitored {
/// @brief . \if empty doc string required due to doxygen bug 787131 \endif
friend
ValuesCollection
<
T
>
Collection
<
T
>
(
std
::
string
name
,
const
T
&
collection
);
// TEMPORARY: for backwards compatibility
friend
ValuesCollection
<
T
>
MonitoredCollection
::
declare
<
T
>
(
std
::
string
name
,
const
T
&
collection
);
ValuesCollection
(
ValuesCollection
&&
)
=
default
;
@@ -138,24 +111,14 @@ namespace Monitored {
// fails to match the friend.
template
<
class
U
>
friend
ObjectsCollection
<
U
>
Collection
(
std
::
string
name
,
const
U
&
collection
,
std
::
function
<
double
(
const
typename
ObjectsCollection
<
U
>::
const_value_type
&
)
>
converterToDouble
);
// TEMPORARY: for backwards compatibility
template
<
class
U
>
friend
ObjectsCollection
<
U
>
MonitoredCollection
::
declare
(
std
::
string
name
,
const
U
&
collection
,
std
::
function
<
double
(
const
typename
ObjectsCollection
<
U
>::
const_value_type
&
)
>
converterToDouble
);
std
::
function
<
double
(
const
typename
ObjectsCollection
<
U
>::
const_value_type
&
)
>
converterToDouble
);
ObjectsCollection
(
ObjectsCollection
&&
)
=
default
;
const
std
::
vector
<
double
>
getVectorRepresentation
()
const
override
{
// Could be replaced with std::size in C++17
auto
N
=
std
::
distance
(
std
::
begin
(
m_collection
),
std
::
end
(
m_collection
));
// Reserve space and fill vector
std
::
vector
<
double
>
result
;
result
.
reserve
(
N
);
result
.
reserve
(
std
::
size
(
m_collection
)
);
for
(
auto
value
:
m_collection
)
result
.
push_back
(
m_converterToDouble
(
value
));
return
result
;
Loading