]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
It does not make sense to test WorkStream with both empty worker and copier. Adjust...
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Jan 2014 20:19:13 +0000 (20:19 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 10 Jan 2014 20:19:13 +0000 (20:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@32190 0785d39b-7218-0410-832d-ea1e28bc413d

tests/base/work_stream_04.cc

index c760c2c523353e5f0031b9ca17ef91996e57ba77..ebda814629d77d09675991510c98c029a4a4578a 100644 (file)
@@ -30,16 +30,34 @@ struct ScratchData
 {};
 
 
+void foo (const std::vector<unsigned int>::iterator,
+          ScratchData&,
+          unsigned int&)
+{
+}
+
+void bar (const unsigned int&)
+{
+}
+
 void test ()
 {
   std::vector<unsigned int> v;
   for (unsigned int i=0; i<20; ++i)
     v.push_back (i);
 
+  // first run with only a worker
+  WorkStream::run (v.begin(), v.end(),
+                   &foo,
+                   std_cxx1x::function<void(const unsigned int&)>(),
+                   ScratchData(),
+                   0U);
+  
+  // next run with only a copier
   WorkStream::run (v.begin(), v.end(),
                    std_cxx1x::function<void(const std::vector<unsigned int>::iterator,
                                             ScratchData&,unsigned int&)>(),
-                   std_cxx1x::function<void(const unsigned int&)>(),
+                   &bar,
                    ScratchData(),
                    0U);
 }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.