- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the pipeline like this: A->B->C->D
can we let programskip the C under some situations, that means the program will call D right after B ?
can we let programskip the C under some situations, that means the program will call D right after B ?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - softarts
the pipeline like this: A->B->C->D
can we let programskip the C under some situations, that means the program will call D right after B ?
can we let programskip the C under some situations, that means the program will call D right after B ?
Thereare no special means for that in tbb::pipeline
To me, the easiest way seems to make the decision in the very beginning of C, just passing the data to D if no processing is required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Alexey Kukanov (Intel)
Thereare no special means for that in tbb::pipeline
To me, the easiest way seems to make the decision in the very beginning of C, just passing the data to D if no processing is required.
think about packet process program,
PacketInput->analyse->calltrace->output
both PacketInput & output are serial executed,analyse and calltrace can be parallelly executed.
but packet from same ip/session should be passed to same calltrace filter
so how to let analyse filter choose the destinate filter,calltrace 1 or calltrace 2?
the developer should be responsible for these logic code?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - softarts
think about packet process program,
PacketInput->analyse->calltrace->output
both PacketInput & output are serial executed,analyse and calltrace can be parallelly executed.
but packet from same ip/session should be passed to same calltrace filter
so how to let analyse filter choose the destinate filter,calltrace 1 or calltrace 2?
the developer should be responsible for these logic code?
PacketInput->analyse->calltrace->output
both PacketInput & output are serial executed,analyse and calltrace can be parallelly executed.
but packet from same ip/session should be passed to same calltrace filter
so how to let analyse filter choose the destinate filter,calltrace 1 or calltrace 2?
the developer should be responsible for these logic code?
The developer is responsible for making a decision of which filter to call, anyway. And the decision is done at runtime depending on a particular data item. It also allows the developer to choose desired way to organize the logic code, depending on the problem. Might bea simple switch statement insidethe filter is enough; or might be some hierarchy of processing classes can be established, and the filter would just call a virtual method on an object passed to it; etc.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page