Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executor changes cause compilation failures #2695

Closed
biddisco opened this issue Jun 13, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@biddisco
Copy link
Contributor

commented Jun 13, 2017

The following snippet no longer compiles after recent executor changes

    hpx::threads::executors::default_executor high_priority_executor(
        hpx::threads::thread_priority_critical);
    
    hpx::parallel::static_chunk_size fixed(1);
    hpx::parallel::for_loop_strided(
        hpx::parallel::execution::par.with(fixed).on(high_priority_executor), 0, 100, 2,
        [&](int i) {
            std::cout << "for loop i " << i << std::endl;
        });
@hkaiser

This comment has been minimized.

Copy link
Member

commented Jun 17, 2017

Could you add the full source code and the compilation error you're seeing, please?
The following snippet does compile fine for me:

#include <hpx/hpx.hpp>
#include <hpx/hpx_init.hpp>

#include <hpx/include/parallel_executors.hpp>
#include <hpx/include/parallel_algorithm.hpp>

///////////////////////////////////////////////////////////////////////////////
int hpx_main(int argc, char* argv[])
{
    hpx::threads::executors::default_executor high_priority_executor(
        hpx::threads::thread_priority_critical);

    hpx::parallel::static_chunk_size fixed(1);
    hpx::parallel::for_loop_strided(
        hpx::parallel::execution::par.with(fixed).on(high_priority_executor),
        0, 100, 2,
        [&](int i) {
            std::cout << "for loop i " << i << std::endl;
        });

    return hpx::finalize();
}

int main(int argc, char* argv[])
{
    return hpx::init(argc, argv);
}
@biddisco

This comment has been minimized.

Copy link
Contributor Author

commented Jun 17, 2017

The compilation failure was caused by a missing

#include <hpx/include/parallel_executors.hpp>

in my test. This is not a bug. Closing it.

@biddisco biddisco closed this Jun 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.