My typical application reads an input file line by line, performs a time-consuming process on each line, and then writes an output file line by line. I've successfully used TBB, with a pipeline and a concurrent line queue on the input, to achieve a major parallel processing speedup. I'd like to try the next such similar application using Cilk.
A TBB pipeline with three filters, serial input, parallel transform, and a serial output filter has parallelism not only by having multiple middle filters running at once, but also by having in the pipeline at the same time one or more input and output filters.
Can this even be done with Cilk? I may have a cilk_for operating on multiple lines at once, but the reading of the input file and writing of the output file appear to have to be done serially, and not at the same time as the parallel processing.
Is a TBB pipeline inherently more parallel than Cilk?
Worst case might be a TBB pipeline with 8 serial filters in sequence. TBB would overlap all the processing using 8 processors, but could Cilk? Theoretically dataflow architecture is extremely powerful