Exemplo n.º 1
0
void all_of_tests(std::vector<hpx::id_type>& localities)
{
    hpx::partitioned_vector<T> xvalues(
        SIZE, T(0), hpx::container_layout(localities));
    initialize(xvalues);

    test_all(hpx::parallel::execution::seq, xvalues, op8(), false);
    test_all(hpx::parallel::execution::par, xvalues, op8(), false);
    test_all_async(
        hpx::parallel::execution::seq(hpx::parallel::execution::task), xvalues,
        op8(), false);
    test_all_async(
        hpx::parallel::execution::par(hpx::parallel::execution::task), xvalues,
        op8(), false);

    test_all(hpx::parallel::execution::seq, xvalues, op5(), false);
    test_all(hpx::parallel::execution::par, xvalues, op5(), false);
    test_all_async(
        hpx::parallel::execution::seq(hpx::parallel::execution::task), xvalues,
        op5(), false);
    test_all_async(
        hpx::parallel::execution::par(hpx::parallel::execution::task), xvalues,
        op5(), false);

    test_all(hpx::parallel::execution::seq, xvalues, op0(), true);
    test_all(hpx::parallel::execution::par, xvalues, op0(), true);
    test_all_async(
        hpx::parallel::execution::seq(hpx::parallel::execution::task), xvalues,
        op0(), true);
    test_all_async(
        hpx::parallel::execution::par(hpx::parallel::execution::task), xvalues,
        op0(), true);
}
Exemplo n.º 2
0
unsigned int dynamic_object_exprt::get_instance() const
{
  return std::stoul(id2string(to_constant_expr(op0()).get_value()));
}
Exemplo n.º 3
0
void dynamic_object_exprt::set_instance(unsigned int instance)
{
  op0()=from_integer(instance, typet(ID_natural));
}