On 7/16/25 05:04, Gerald Marewo wrote:
I have a basic idea of the WorkStream concept for multi-threading.
However, I am struggling to make sense of the 4th argument to the function
WorkStream::run, i.e,
std::function<void(const EstimateCopyData &)>()
My understanding is that this is a function from the standard C++ library with
a template parameter and no input arguments. How is the template parameter
interpreted here?
Gerald:
the syntax C++ uses is admittedly not helpful, but that argument represents a
function that takes an object of type EstimateCopyData as input and does
something with it. WorkStream in essence takes two functions as argument:
* A function that does the work and puts the results into an intermediate
object
* A function that takes the information from the intermediate object and puts
it into the final place.
The function you mention is the one that does the second operation.
If you want more information: The documentation of the WorkStream class links
to a paper that discusses the design of this class.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
www: http://www.math.colostate.edu/~bangerth/
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/dealii/0a8b0924-d4e4-4f8f-be84-d88a1ce8cafa%40colostate.edu.