]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make work without threads
authorkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 26 Aug 2013 10:04:44 +0000 (10:04 +0000)
committerkronbichler <kronbichler@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 26 Aug 2013 10:04:44 +0000 (10:04 +0000)
git-svn-id: https://svn.dealii.org/trunk@30494 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/work_stream.h

index 6fa10464db1ef7b44496221fc57e6d69db117031..d06f06cbec9ed24df154d05611c5275cb2241382 100644 (file)
@@ -790,8 +790,13 @@ namespace WorkStream
 
     for (Iterator i=begin; i!=end; ++i)
       {
-        worker (i, scratch_data, copy_data);
-        copier (copy_data);
+        if (static_cast<const std_cxx1x::function<void (const Iterator &,
+                                                        ScratchData &,
+                                                        CopyData &)> >(worker))
+          worker (i, scratch_data, copy_data);
+        if (static_cast<const std_cxx1x::function<void (const CopyData &)> >
+            (copier))
+          copier (copy_data);
       }
 #endif
   }

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.