This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
ffnamespace:tutorial [2015/09/08 15:02] torquati |
ffnamespace:tutorial [2015/09/08 16:52] torquati |
||
---|---|---|---|
Line 4: | Line 4: | ||
===== Tutorial ===== | ===== Tutorial ===== | ||
- | * [[http://calvados.di.unipi.it/storage/tutorial/html/tutorial.html|Single HTML file]] (version August 2014) | + | * [[http://calvados.di.unipi.it/storage/tutorial/html/tutorial.html|Single HTML file]] (version September 2015) |
- | * [[http://calvados.di.unipi.it/storage/tutorial/fftutorial.pdf|PDF file]] (version September 2014) | + | * [[http://calvados.di.unipi.it/storage/tutorial/fftutorial.pdf|PDF file]] (version September 2015) |
- | * [[http://calvados.di.unipi.it/storage/tutorial/fftutorial_source_code.tgz | Tests and examples - source code tarball]] (version September 2014) | + | * [[http://calvados.di.unipi.it/storage/tutorial/fftutorial_source_code.tgz | Tests and examples - source code tarball]] (version September 2015) |
===== Very short Tutorial ===== | ===== Very short Tutorial ===== | ||
Line 73: | Line 73: | ||
int main() { | int main() { | ||
- | std::vector<std::unique_ptr<ff_node> > W = { // the farm has 2 workers | + | std::vector<std::unique_ptr<ff_node> > W; |
- | make_unique<thirdStage>(), | + | // the farm has 2 workers |
- | make_unique<thirdStage>() | + | W.push_back( make_unique<thirdStage>()); |
- | }; | + | W.push_back( make_unique<thirdStage>()); |
+ | | ||
ff_Pipe<> pipe(make_unique<firstStage>(), | ff_Pipe<> pipe(make_unique<firstStage>(), | ||
make_unique<ff_node_F<fftask_t> >(secondStage), | make_unique<ff_node_F<fftask_t> >(secondStage), | ||
- | make_unique<ff_Farm<fftask_f> >(std::move(W)) | + | make_unique<ff_Farm<fftask_t> >(std::move(W)) |
); | ); | ||
if (pipe.run_and_wait_end()<0) error("running pipe"); | if (pipe.run_and_wait_end()<0) error("running pipe"); |