User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Core - Data Processing - Multiplexer


Multiplexers

Figure 13: Multiplex processing.
multiplex.eps

If an operation in the pipeline is particularly slow, we may wish to process the data in parallel. This can be done with a multiplexer, shown in Figure 13. Together with separate processing threads it can be used to run any number of processing steps in parallel. The multiplexer ensures that each `Put' and `Get' from the corresponding sub-processes match, ensuring that the order of the data is preserved. The example given bellow creates 3 threads to do the offset and scaling operation in parallel. Figure 14 shows the structure created, with some slight simplifications.

DPIFileC<RealT>("in.dat") »= DPMultiplex(3,DPBufferC<RealT>(2) » DPOffsetScale(4.0,2.0) »= DPBufferC<RealT>(2)) »= DPOFileC<RealT>("out.dat");

Figure 14: Example of multiplexed processing.
ex_multiplex.eps

Normal classes:

 DPMultiplexC Multiplex an operation.

Normal functions:

 DPMultiplex(IntT,const DPIOPortC &) Create a multiplexer.
 DPMultiplex(const SArray1dC> &) Create a multiplexer.
Maintainer:Charles Galambos, Documentation by CxxDoc: Tue Aug 13 10:00:52 2002