Community
cancel
Showing results for 
Search instead for 
Did you mean: 
softarts
Beginner
54 Views

will(or can) pipeline do this ?

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 ?



0 Kudos
3 Replies
Alexey_K_Intel3
Employee
54 Views

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 ?




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.
softarts
Beginner
54 Views


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?
Alexey_K_Intel3
Employee
54 Views

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?
Basically, yes, since only linear pipelines are supported for the moment.

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