Kilian,

> we are currently working on an hpx application that in turn is a framework
> that executes user-supplied algorithms.
> For this we will represent user-supplied algorithms as a black-box
> implementing the following function:
>
> hpx::future<std::any>
> runAlgorithmAsynchronously(std::vector<std::any> input);
>
> Will hpx run into any problems working with std::any, assuming the stored
> instances behave well with hpx?
> Can we for example still pass the resulting future as an argument to
> remote component actions (and rely on serialization/migration)? (Assuming,
> the stored instance worked with serialization)

Unless you find a way to serialize std::any you will not be able to use it
in this context (local only use in hpx::future<> should be ok, though). That
should be possible to achieve if you exactly know, what type is stored in a
std::any.

For remote operation I'd suggest using hpx::any instead (note that in
earlier versions of HPX you might have to use hpx::util::any). It supports
serialization and is otherwise compatible with std::any. On current master
hpx::any is available as part of the serialization module here:
https://github.com/STEllAR-GROUP/hpx/blob/master/libs/serialization/include/
hpx/any.hpp.

HTH
Regards Hartmut
---------------
http://stellar.cct.lsu.edu
https://github.com/STEllAR-GROUP/hpx




_______________________________________________
hpx-users mailing list
[email protected]
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users

Reply via email to