Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Gaudi
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Gaudi
Gaudi
Commits
453ab802
There was a problem fetching the pipeline summary.
Commit
453ab802
authored
8 years ago
by
Marco Clemencic
Browse files
Options
Downloads
Plain Diff
Fix DataHandleHolderVisitor
See merge request
!268
parents
2cb0c7bf
a3d9432c
No related branches found
No related tags found
1 merge request
!268
Fix DataHandleHolderVisitor
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
GaudiKernel/src/Lib/DataHandleHolderVisitor.cpp
+39
-37
39 additions, 37 deletions
GaudiKernel/src/Lib/DataHandleHolderVisitor.cpp
with
39 additions
and
37 deletions
GaudiKernel/src/Lib/DataHandleHolderVisitor.cpp
+
39
−
37
View file @
453ab802
...
...
@@ -6,53 +6,55 @@
#include
<typeinfo>
namespace
{
using
std
::
make_tuple
;
using
std
::
make_tuple
;
}
DHHVisitor
::
DHHVisitor
(
DataObjIDColl
&
ido
,
DataObjIDColl
&
odo
)
:
m_ido
(
ido
),
m_odo
(
odo
)
:
m_ido
(
ido
),
m_odo
(
odo
)
{
}
void
DHHVisitor
::
visit
(
const
IDataHandleHolder
*
v
)
{
if
(
!
v
)
{
return
;
}
if
(
!
v
)
{
return
;
}
// Loop over inputs and outputs of handles, extra dependiencies and objects to
// collect all of them.
// Handles and extra dependencies are those of a specific algorith or tool, while
// the collection of data objects also contains those of the tree of tools and
// algorithms below it.
// Loop over inputs and outputs of handles, extra dependiencies and objects to
// collect all of them.
// Handles and extra dependencies are those of a specific algorith or tool, while
// the collection of data objects also contains those of the tree of tools and
// algorithms below it.
// Loop over input handles and output handles and store those with with non-empty keys
// in the container of input objects passed to us and the others in a container of those
// we ignore for debug purposes. To avoid multiple for loops, make some tuples and loop
// over those.
for
(
auto
&
hs
:
{
make_tuple
(
v
->
inputHandles
(),
std
::
ref
(
m_ido
),
std
::
ref
(
m_ign_i
)),
make_tuple
(
v
->
outputHandles
(),
std
::
ref
(
m_odo
),
std
::
ref
(
m_ign_o
))})
{
for
(
const
auto
&
h
:
std
::
get
<
0
>
(
hs
))
{
if
(
!
h
->
objKey
().
empty
())
{
std
::
get
<
1
>
(
hs
).
emplace
(
h
->
fullKey
());
}
else
{
std
::
get
<
2
>
(
hs
).
emplace
(
h
->
fullKey
());
}
// Loop over input handles and output handles and store those with with non-empty keys
// in the container of input objects passed to us and the others in a container of those
// we ignore for debug purposes. To avoid multiple for loops, make some tuples and loop
// over those.
for
(
auto
&
hs
:
{
make_tuple
(
v
->
inputHandles
(),
std
::
ref
(
m_ido
),
std
::
ref
(
m_ign_i
)),
make_tuple
(
v
->
outputHandles
(),
std
::
ref
(
m_odo
),
std
::
ref
(
m_ign_o
))})
{
for
(
const
auto
&
h
:
std
::
get
<
0
>
(
hs
))
{
if
(
!
h
->
objKey
().
empty
())
{
std
::
get
<
1
>
(
hs
).
emplace
(
h
->
fullKey
());
}
else
{
std
::
get
<
2
>
(
hs
).
emplace
(
h
->
fullKey
());
}
}
}
}
// The containers of handles are a different type than the on of input deps and input
// objects, so we need another loop here.
// NOTE: perhaps a view from range v3 can be used to also avoid this second loop.
for
(
auto
&
hs
:
{
make_tuple
(
v
->
extraInputDeps
(),
std
::
ref
(
m_ido
),
std
::
ref
(
m_ign_i
)),
make_tuple
(
v
->
extraOutputDeps
(),
std
::
ref
(
m_odo
),
std
::
ref
(
m_ign_o
)),
make_tuple
(
v
->
inputDataObjs
(),
std
::
ref
(
m_ido
),
std
::
ref
(
m_ign_i
)),
make_tuple
(
v
->
outputDataObjs
(),
std
::
ref
(
m_odo
),
std
::
ref
(
m_ign_o
))})
{
for
(
const
auto
&
h
:
std
::
get
<
0
>
(
hs
))
{
if
(
!
h
.
key
().
empty
())
{
std
::
get
<
1
>
(
hs
).
emplace
(
h
.
fullKey
());
}
else
{
std
::
get
<
2
>
(
hs
).
emplace
(
h
.
fullKey
());
}
// The containers of handles are a different type than the on of input deps and input
// objects, so we need another loop here.
// NOTE: perhaps a view from range v3 can be used to also avoid this second loop.
for
(
auto
&
hs
:
{
make_tuple
(
v
->
extraInputDeps
(),
std
::
ref
(
m_ido
),
std
::
ref
(
m_ign_i
)),
make_tuple
(
v
->
extraOutputDeps
(),
std
::
ref
(
m_odo
),
std
::
ref
(
m_ign_o
)),
make_tuple
(
v
->
inputDataObjs
(),
std
::
ref
(
m_ido
),
std
::
ref
(
m_ign_i
)),
make_tuple
(
v
->
outputDataObjs
(),
std
::
ref
(
m_odo
),
std
::
ref
(
m_ign_o
))
})
{
for
(
const
auto
&
h
:
std
::
get
<
0
>
(
hs
))
{
if
(
!
h
.
key
().
empty
())
{
std
::
get
<
1
>
(
hs
).
emplace
(
h
);
}
else
{
std
::
get
<
2
>
(
hs
).
emplace
(
h
);
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment