Re: [hpx-users] Delayed execution of tasks

2017-09-11 Thread Kor de Jong
On 11/09/2017 14:04, Hartmut Kaiser wrote:
> A future which was created as deferred will be executed only if future::get
> is called:
>
> hpx::future f = hpx::async(hpx::launch::deferred, []() {...});
> //...
> f.get(); // <-- this triggers the execution of the lambda.
>
> FWIW, you can also pass the deferred launch policy to dataflow and
> future::then, if needed.

Ah, yes, I now remember having seen that before. Thank you very much.

Kor de Jong
___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


Re: [hpx-users] Error compiling with gcc 7.2

2017-09-11 Thread Hartmut Kaiser

> I've got the following error compiling hpc ver 1.0 with gcc 7.2. Compiling
> with gcc 6.1 is working.

HPX V1.0 was released quite a while ago (and definitely before gcc 7.2),
thus we don't (can't) support this compiler with HPX V1.0. May I ask you to
try top of master from the git repository instead
(https://github.com/STEllAR-GROUP/hpx)? Many things have been fixed since
the release.

Regards Hartmut
---
http://boost-spirit.com
http://stellar.cct.lsu.edu



___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


Re: [hpx-users] Delayed execution of tasks

2017-09-11 Thread Hartmut Kaiser

> I have just started using HPX in a project and while discussing this
> with colleagues a question came up:
> 
> Given a task tree, is it possible to delay the execution of the tasks
> until it is certain that the end-result is required (for example,
> because it is written to disk)?
> 
> In my project, it is possible that parts of the task tree don't need to
> be executed. This decision can only be made at run time, after a part of
> the task tree has already been created.
> 
> I can imagine that somehow executing tasks can be delayed until
> future.get() is called, for example.

A future which was created as deferred will be executed only if future::get
is called:

hpx::future f = hpx::async(hpx::launch::deferred, []() {...});
//...
f.get(); // <-- this triggers the execution of the lambda.

FWIW, you can also pass the deferred launch policy to dataflow and
future::then, if needed.

HTH
Regards Hartmut
---
http://boost-spirit.com
http://stellar.cct.lsu.edu



___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users


[hpx-users] Delayed execution of tasks

2017-09-11 Thread Kor de Jong
Dear all,

I have just started using HPX in a project and while discussing this 
with colleagues a question came up:

Given a task tree, is it possible to delay the execution of the tasks 
until it is certain that the end-result is required (for example, 
because it is written to disk)?

In my project, it is possible that parts of the task tree don't need to 
be executed. This decision can only be made at run time, after a part of 
the task tree has already been created.

I can imagine that somehow executing tasks can be delayed until 
future.get() is called, for example.

Kor de Jong
___
hpx-users mailing list
hpx-users@stellar.cct.lsu.edu
https://mail.cct.lsu.edu/mailman/listinfo/hpx-users