-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core: rework Tag handling #340
Conversation
Quality Gate failedFailed conditions |
d934665
to
cee286c
Compare
cee286c
to
a2e4a1f
Compare
b86b95a
to
89fa406
Compare
89fa406
to
c91b8d7
Compare
@@ -311,6 +311,12 @@ struct DummyConsumableSpan { | |||
}; | |||
static_assert(ConsumableSpan<DummyConsumableSpan<int>>); | |||
|
|||
template<typename T> | |||
struct DummyConsumablePortSpan: public DummyConsumableSpan<T> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tags etc should be absorbed in the concept ConsumableSpan
etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand.
There are 2 concepts ConsumableSpan
(no tag handling) and ConsumablePortSpan
(the former + added tag handling). DummyConsumableSpan
and DummyConsumablePortSpan
are mock implementations of the respective concepts needed by the machinery of Block::prepareStreams
.
a784c5e
to
ff97be4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great PR and all your effort in making all the unit tests run smoothly. 👍
The changes look good to me. We’ve already discussed some modifications privately, and I worked with this update while attempting to fix a failing test!
I’ve added a few minor comments and suggestions for improvements. The PR can be merged after reviewing the comments.
f294593
to
9c28ab0
Compare
The automatic tag forwarding implemented in Block::workInternal was was not working for ASYNC ports since in this case the Block cannot determine a priori if samples will be consumed and consequently cannot perform an early return ahead of the unconditional tag forwarding and consumption. This change introduces an extension of the ConsumableInputRange, which additionally takes care of consuming all tags up to the first sample of the currently processed chunk. Also all tag merging logic is moved from Port to Block, while the logic for preparing the consumableInput or producableOutput ranges is moved into the Port. Only forward initial tags before starting the flowgraph instead of during initialisation, when the buffers are not connected yet. In CircularBuffer, make PublishableOutputRange pubblish in destructor This makes the PublishableOutputRange behave like the corresponding InputRange by only marking samples for being published and only publishing in the destructor. Evaluate actually processed samples after process bulk was called. Add port unittest and fix off by one problem Change sequence from -1 to 0 to avoid tag offset Signed-off-by: Alexander Krimm <[email protected]>
Signed-off-by: Alexander Krimm <[email protected]>
9c28ab0
to
159bc1f
Compare
Quality Gate failedFailed conditions |
The automatic tag forwarding implemented in Block::workInternal was was not working for ASYNC ports since in this case the Block cannot determine a priori if samples will be consumed and consequently cannot perform an early return ahead of the unconditional tag forwarding and consumption.
This change introduces an extension of the ConsumableInputRange, which additionally takes care of consuming all tags up to the first sample of the currently processed chunk.
Also all tag merging logic is moved from Port to Block, while the logic for preparing the consumableInput or producableOutput ranges is moved into the Port.