Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
hyteg
hyteg
Commits
27806cac
Commit
27806cac
authored
Jun 11, 2018
by
Nils Kohl
🌝
Browse files
Improved communication pattern (internal) and timers
parent
479961f9
Pipeline
#9914
passed with stage
in 73 minutes and 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/tinyhhg_core/communication/BufferedCommunication.hpp
View file @
27806cac
...
...
@@ -192,13 +192,15 @@ void BufferedCommunicator::startCommunication()
CommunicationDirection
communicationDirection
=
getCommunicationDirection
<
SenderType
,
ReceiverType
>
();
const
std
::
string
timerString
=
"Communication (setup)"
;
const
std
::
string
timerStringSetup
=
"Communication (setup )"
;
const
std
::
string
timerStringDirect
=
"Communication (direct )"
;
const
std
::
string
timerStringBuffered
=
"Communication (buffered / pack )"
;
startTimer
(
timerString
);
startTimer
(
timerString
Setup
);
if
(
packInfos_
.
empty
()
)
{
stopTimer
(
timerString
);
stopTimer
(
timerString
Setup
);
return
;
}
...
...
@@ -350,16 +352,20 @@ void BufferedCommunicator::startCommunication()
}
// setup
stopTimer
(
timerStringSetup
);
// Buffered communication
startTimer
(
timerStringBuffered
);
bufferSystem
->
startCommunication
();
stopTimer
(
timerStringBuffered
);
// Local communication
startTimer
(
timerStringDirect
);
for
(
auto
&
directCommunicationFunction
:
directCommunicationFunctions_
[
communicationDirection
]
)
{
directCommunicationFunction
();
}
// Buffered communication
bufferSystem
->
startCommunication
();
stopTimer
(
timerString
);
stopTimer
(
timerStringDirect
);
}
template
<
typename
SenderType
,
typename
ReceiverType
>
...
...
@@ -368,7 +374,7 @@ void BufferedCommunicator::endCommunication()
staticAssertCommunicationDirections
<
SenderType
,
ReceiverType
>
();
const
CommunicationDirection
communicationDirection
=
getCommunicationDirection
<
SenderType
,
ReceiverType
>
();
const
std
::
string
timerString
=
"Communication (
wait
)"
;
const
std
::
string
timerString
=
"Communication (
buffered / wait + unpack
)"
;
startTimer
(
timerString
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment