Skip to content

Commit

Permalink
Fixing inspect errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Dec 23, 2016
1 parent fd350a0 commit 3a08360
Show file tree
Hide file tree
Showing 90 changed files with 1,757 additions and 888 deletions.
12 changes: 6 additions & 6 deletions hpx/parallel/algorithms/for_loop.hpp
Expand Up @@ -395,7 +395,7 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v2)
/// when and if to dereference the iterator.
///
/// The execution of for_loop without specifying an execution policy is
/// equivalent to specifying \a parallel::execution::seq as the execution
/// equivalent to specifying \a parallel::execution::seq as the execution
/// policy.
///
/// \tparam I The type of the iteration variable. This could be
Expand Down Expand Up @@ -475,7 +475,7 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v2)
static_assert(sizeof...(Args) >= 1,
"for_loop must be called with at least a function object");

return for_loop(parallel::execution::seq, first, last,
return for_loop(parallel::execution::seq, first, last,
std::forward<Args>(args)...);
}

Expand Down Expand Up @@ -596,7 +596,7 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v2)
/// programmer when and if to dereference the iterator.
///
/// The execution of for_loop without specifying an execution policy is
/// equivalent to specifying \a parallel::execution::seq as the execution
/// equivalent to specifying \a parallel::execution::seq as the execution
/// policy.
///
/// \tparam I The type of the iteration variable. This could be
Expand Down Expand Up @@ -799,7 +799,7 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v2)
/// when and if to dereference the iterator.
///
/// The execution of for_loop without specifying an execution policy is
/// equivalent to specifying \a parallel::execution::seq as the execution
/// equivalent to specifying \a parallel::execution::seq as the execution
/// policy.
///
/// \tparam I The type of the iteration variable. This could be
Expand Down Expand Up @@ -881,7 +881,7 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v2)
static_assert(sizeof...(Args) >= 1,
"for_loop_n must be called with at least a function object");

return for_loop_n(parallel::execution::seq, first, size,
return for_loop_n(parallel::execution::seq, first, size,
std::forward<Args>(args)...);
}

Expand Down Expand Up @@ -1006,7 +1006,7 @@ namespace hpx { namespace parallel { HPX_INLINE_NAMESPACE(v2)
/// programmer when and if to dereference the iterator.
///
/// The execution of for_loop without specifying an execution policy is
/// equivalent to specifying \a parallel::execution::seq as the execution
/// equivalent to specifying \a parallel::execution::seq as the execution
/// policy.
///
/// \tparam I The type of the iteration variable. This could be
Expand Down
12 changes: 8 additions & 4 deletions tests/performance/local/partitioned_vector_foreach.cpp
Expand Up @@ -108,11 +108,13 @@ int hpx_main(boost::program_options::variables_map& vm)
{
hpx::partitioned_vector<int> v(vector_size, hpx::container_layout(2));

hpx::cout << "hpx::partitioned_vector<int>(execution::seq, container_layout(2)): "
hpx::cout << "hpx::partitioned_vector<int>(execution::seq, "
"container_layout(2)): "
<< foreach_vector(hpx::parallel::execution::seq, v) /
double(seq_ref)
<< "\n";
hpx::cout << "hpx::partitioned_vector<int>(execution::par, container_layout(2)): "
hpx::cout << "hpx::partitioned_vector<int>(execution::par, "
"container_layout(2)): "
<< foreach_vector(hpx::parallel::execution::par.with(cs), v) /
double(par_ref) //-V106
<< "\n";
Expand All @@ -121,11 +123,13 @@ int hpx_main(boost::program_options::variables_map& vm)
{
hpx::partitioned_vector<int> v(vector_size, hpx::container_layout(10));

hpx::cout << "hpx::partitioned_vector<int>(execution::seq, container_layout(10)): "
hpx::cout << "hpx::partitioned_vector<int>(execution::seq, "
"container_layout(10)): "
<< foreach_vector(hpx::parallel::execution::seq, v) /
double(seq_ref)
<< "\n";
hpx::cout << "hpx::partitioned_vector<int>(execution::par, container_layout(10)): "
hpx::cout << "hpx::partitioned_vector<int>(execution::par, "
"container_layout(10)): "
<< foreach_vector(hpx::parallel::execution::par.with(cs), v) /
double(par_ref) //-V106
<< "\n";
Expand Down
59 changes: 36 additions & 23 deletions tests/regressions/parallel/scan_different_inits.cpp
Expand Up @@ -14,7 +14,8 @@
#include <string>
#include <vector>

// FIXME: Intel 15 currently can not compile this code. This needs to be fixed. See #1408
// FIXME: Intel 15 currently can not compile this code. This needs to be fixed.
// See #1408
#if !(defined(HPX_INTEL_VERSION) && HPX_INTEL_VERSION == 1500)
void test_zero()
{
Expand Down Expand Up @@ -60,25 +61,31 @@ void test_async_zero()
std::vector<int> b, c, d, e, f, g;

Fut_Iter f_inc_add =
inclusive_scan(execution::par(execution::task), a.begin(), a.end(), b.begin(), 100,
[](int bar, int baz){ return bar+baz; });
inclusive_scan(execution::par(execution::task),
a.begin(), a.end(), b.begin(), 100,
[](int bar, int baz){ return bar+baz; });
Fut_Iter f_inc_mult =
inclusive_scan(execution::par(execution::task), a.begin(), a.end(), c.begin(), 10,
[](int bar, int baz){ return bar*baz; });
inclusive_scan(execution::par(execution::task),
a.begin(), a.end(), c.begin(), 10,
[](int bar, int baz){ return bar*baz; });
Fut_Iter f_exc_add =
exclusive_scan(execution::par(execution::task), a.begin(), a.end(), d.begin(), 100,
[](int bar, int baz){ return bar+baz; });
exclusive_scan(execution::par(execution::task),
a.begin(), a.end(), d.begin(), 100,
[](int bar, int baz){ return bar+baz; });
Fut_Iter f_exc_mult =
exclusive_scan(execution::par(execution::task), a.begin(), a.end(), e.begin(), 10,
[](int bar, int baz){ return bar*baz; });
exclusive_scan(execution::par(execution::task),
a.begin(), a.end(), e.begin(), 10,
[](int bar, int baz){ return bar*baz; });
Fut_Iter f_transform_inc =
transform_inclusive_scan(execution::par(execution::task), a.begin(), a.end(), f.begin(),
[](int foo){ return foo - 3; }, 10,
[](int bar, int baz){ return 2*bar+2*baz; });
transform_inclusive_scan(execution::par(execution::task),
a.begin(), a.end(), f.begin(),
[](int foo){ return foo - 3; }, 10,
[](int bar, int baz){ return 2*bar+2*baz; });
Fut_Iter f_transform_exc =
transform_exclusive_scan(execution::par(execution::task), a.begin(), a.end(), g.begin(),
[](int foo){ return foo - 3; }, 10,
[](int bar, int baz){ return 2*bar+2*baz; });
transform_exclusive_scan(execution::par(execution::task),
a.begin(), a.end(), g.begin(),
[](int foo){ return foo - 3; }, 10,
[](int bar, int baz){ return 2*bar+2*baz; });


HPX_TEST(f_inc_add.get() == b.begin());
Expand Down Expand Up @@ -161,19 +168,25 @@ void test_async_one(std::vector<int> a)
auto fun_conv = [](int foo){ return foo - 3; };

Fut_Iter f_inc_add =
inclusive_scan(execution::par(execution::task), a.begin(), a.end(), b.begin(), 10, fun_add);
inclusive_scan(execution::par(execution::task),
a.begin(), a.end(), b.begin(), 10, fun_add);
Fut_Iter f_inc_mult =
inclusive_scan(execution::par(execution::task), a.begin(), a.end(), c.begin(), 10, fun_mult);
inclusive_scan(execution::par(execution::task),
a.begin(), a.end(), c.begin(), 10, fun_mult);
Fut_Iter f_exc_add =
exclusive_scan(execution::par(execution::task), a.begin(), a.end(), d.begin(), 10, fun_add);
exclusive_scan(execution::par(execution::task),
a.begin(), a.end(), d.begin(), 10, fun_add);
Fut_Iter f_exc_mult =
exclusive_scan(execution::par(execution::task), a.begin(), a.end(), e.begin(), 10, fun_mult);
exclusive_scan(execution::par(execution::task),
a.begin(), a.end(), e.begin(), 10, fun_mult);
Fut_Iter f_transform_inc =
transform_inclusive_scan(execution::par(execution::task), a.begin(), a.end(), f.begin(),
fun_conv, 10, fun_add);
transform_inclusive_scan(execution::par(execution::task),
a.begin(), a.end(), f.begin(),
fun_conv, 10, fun_add);
Fut_Iter f_transform_exc =
transform_exclusive_scan(execution::par(execution::task), a.begin(), a.end(), g.begin(),
fun_conv, 10, fun_add);
transform_exclusive_scan(execution::par(execution::task),
a.begin(), a.end(), g.begin(),
fun_conv, 10, fun_add);

hpx::parallel::v1::detail::sequential_inclusive_scan(
a.begin(), a.end(), b_ans.begin(), 10, fun_add);
Expand Down
12 changes: 8 additions & 4 deletions tests/unit/parallel/algorithms/adjacentdifference_bad_alloc.cpp
Expand Up @@ -103,18 +103,22 @@ void test_adjacent_difference_bad_alloc()
test_adjacent_difference_bad_alloc(execution::seq, IteratorTag());
test_adjacent_difference_bad_alloc(execution::par, IteratorTag());

test_adjacent_difference_bad_alloc_async(execution::seq(execution::task), IteratorTag());
test_adjacent_difference_bad_alloc_async(execution::par(execution::task), IteratorTag());
test_adjacent_difference_bad_alloc_async(execution::seq(execution::task),
IteratorTag());
test_adjacent_difference_bad_alloc_async(execution::par(execution::task),
IteratorTag());

#if defined(HPX_HAVE_GENERIC_EXECUTION_POLICY)
test_adjacent_difference_bad_alloc(execution_policy(execution::seq),
IteratorTag());
test_adjacent_difference_bad_alloc(execution_policy(execution::par),
IteratorTag());

test_adjacent_difference_bad_alloc(execution_policy(execution::seq(execution::task)),
test_adjacent_difference_bad_alloc(
execution_policy(execution::seq(execution::task)),
IteratorTag());
test_adjacent_difference_bad_alloc(execution_policy(execution::par(execution::task)),
test_adjacent_difference_bad_alloc(
execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
}
Expand Down
18 changes: 12 additions & 6 deletions tests/unit/parallel/algorithms/adjacentdifference_exception.cpp
Expand Up @@ -106,16 +106,22 @@ void test_adjacent_difference_exception()
test_adjacent_difference_exception(execution::seq, IteratorTag());
test_adjacent_difference_exception(execution::par, IteratorTag());

test_adjacent_difference_exception_async(execution::seq(execution::task), IteratorTag());
test_adjacent_difference_exception_async(execution::par(execution::task), IteratorTag());
test_adjacent_difference_exception_async(execution::seq(execution::task),
IteratorTag());
test_adjacent_difference_exception_async(execution::par(execution::task),
IteratorTag());

#if defined(HPX_HAVE_GENERIC_EXECUTION_POLICY)
test_adjacent_difference_exception(execution_policy(execution::seq), IteratorTag());
test_adjacent_difference_exception(execution_policy(execution::par), IteratorTag());
test_adjacent_difference_exception(execution_policy(execution::seq),
IteratorTag());
test_adjacent_difference_exception(execution_policy(execution::par),
IteratorTag());

test_adjacent_difference_exception(execution_policy(execution::seq(execution::task)),
test_adjacent_difference_exception(
execution_policy(execution::seq(execution::task)),
IteratorTag());
test_adjacent_difference_exception(execution_policy(execution::par(execution::task)),
test_adjacent_difference_exception(
execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
}
Expand Down
12 changes: 8 additions & 4 deletions tests/unit/parallel/algorithms/all_of.cpp
Expand Up @@ -232,8 +232,10 @@ void test_all_of_exception()
test_all_of_exception(execution_policy(execution::seq), IteratorTag());
test_all_of_exception(execution_policy(execution::par), IteratorTag());

test_all_of_exception(execution_policy(execution::seq(execution::task)), IteratorTag());
test_all_of_exception(execution_policy(execution::par(execution::task)), IteratorTag());
test_all_of_exception(execution_policy(execution::seq(execution::task)),
IteratorTag());
test_all_of_exception(execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
}

Expand Down Expand Up @@ -336,8 +338,10 @@ void test_all_of_bad_alloc()
test_all_of_bad_alloc(execution_policy(execution::seq), IteratorTag());
test_all_of_bad_alloc(execution_policy(execution::par), IteratorTag());

test_all_of_bad_alloc(execution_policy(execution::seq(execution::task)), IteratorTag());
test_all_of_bad_alloc(execution_policy(execution::par(execution::task)), IteratorTag());
test_all_of_bad_alloc(execution_policy(execution::seq(execution::task)),
IteratorTag());
test_all_of_bad_alloc(execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
}

Expand Down
12 changes: 8 additions & 4 deletions tests/unit/parallel/algorithms/any_of.cpp
Expand Up @@ -232,8 +232,10 @@ void test_any_of_exception()
test_any_of_exception(execution_policy(execution::seq), IteratorTag());
test_any_of_exception(execution_policy(execution::par), IteratorTag());

test_any_of_exception(execution_policy(execution::seq(execution::task)), IteratorTag());
test_any_of_exception(execution_policy(execution::par(execution::task)), IteratorTag());
test_any_of_exception(execution_policy(execution::seq(execution::task)),
IteratorTag());
test_any_of_exception(execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
}

Expand Down Expand Up @@ -336,8 +338,10 @@ void test_any_of_bad_alloc()
test_any_of_bad_alloc(execution_policy(execution::seq), IteratorTag());
test_any_of_bad_alloc(execution_policy(execution::par), IteratorTag());

test_any_of_bad_alloc(execution_policy(execution::seq(execution::task)), IteratorTag());
test_any_of_bad_alloc(execution_policy(execution::par(execution::task)), IteratorTag());
test_any_of_bad_alloc(execution_policy(execution::seq(execution::task)),
IteratorTag());
test_any_of_bad_alloc(execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
}

Expand Down
6 changes: 4 additions & 2 deletions tests/unit/parallel/algorithms/copyif_bad_alloc.cpp
Expand Up @@ -108,8 +108,10 @@ void test_copy_if_bad_alloc()
test_copy_if_bad_alloc(execution_policy(execution::seq), IteratorTag());
test_copy_if_bad_alloc(execution_policy(execution::par), IteratorTag());

test_copy_if_bad_alloc(execution_policy(execution::seq(execution::task)), IteratorTag());
test_copy_if_bad_alloc(execution_policy(execution::par(execution::task)), IteratorTag());
test_copy_if_bad_alloc(execution_policy(execution::seq(execution::task)),
IteratorTag());
test_copy_if_bad_alloc(execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
}

Expand Down
6 changes: 4 additions & 2 deletions tests/unit/parallel/algorithms/copyif_exception.cpp
Expand Up @@ -109,8 +109,10 @@ void test_copy_if_exception()
test_copy_if_exception(execution_policy(execution::seq), IteratorTag());
test_copy_if_exception(execution_policy(execution::par), IteratorTag());

test_copy_if_exception(execution_policy(execution::seq(execution::task)), IteratorTag());
test_copy_if_exception(execution_policy(execution::par(execution::task)), IteratorTag());
test_copy_if_exception(execution_policy(execution::seq(execution::task)),
IteratorTag());
test_copy_if_exception(execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
}

Expand Down
18 changes: 12 additions & 6 deletions tests/unit/parallel/algorithms/copyn.cpp
Expand Up @@ -158,8 +158,10 @@ void test_copy_n()
test_copy_n_outiter(execution_policy(execution::par), IteratorTag());
test_copy_n_outiter(execution_policy(execution::par_unseq), IteratorTag());

test_copy_n_outiter(execution_policy(execution::seq(execution::task)), IteratorTag());
test_copy_n_outiter(execution_policy(execution::par(execution::task)), IteratorTag());
test_copy_n_outiter(execution_policy(execution::seq(execution::task)),
IteratorTag());
test_copy_n_outiter(execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
}

Expand Down Expand Up @@ -266,8 +268,10 @@ void test_copy_n_exception()
test_copy_n_exception(execution_policy(execution::seq), IteratorTag());
test_copy_n_exception(execution_policy(execution::par), IteratorTag());

test_copy_n_exception(execution_policy(execution::seq(execution::task)), IteratorTag());
test_copy_n_exception(execution_policy(execution::par(execution::task)), IteratorTag());
test_copy_n_exception(execution_policy(execution::seq(execution::task)),
IteratorTag());
test_copy_n_exception(execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
}

Expand Down Expand Up @@ -373,8 +377,10 @@ void test_copy_n_bad_alloc()
test_copy_n_bad_alloc(execution_policy(execution::seq), IteratorTag());
test_copy_n_bad_alloc(execution_policy(execution::par), IteratorTag());

test_copy_n_bad_alloc(execution_policy(execution::seq(execution::task)), IteratorTag());
test_copy_n_bad_alloc(execution_policy(execution::par(execution::task)), IteratorTag());
test_copy_n_bad_alloc(execution_policy(execution::seq(execution::task)),
IteratorTag());
test_copy_n_bad_alloc(execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
}

Expand Down
12 changes: 8 additions & 4 deletions tests/unit/parallel/algorithms/count.cpp
Expand Up @@ -60,8 +60,10 @@ void test_count_exception()
test_count_exception(execution_policy(execution::seq), IteratorTag());
test_count_exception(execution_policy(execution::par), IteratorTag());

test_count_exception(execution_policy(execution::seq(execution::task)), IteratorTag());
test_count_exception(execution_policy(execution::par(execution::task)), IteratorTag());
test_count_exception(execution_policy(execution::seq(execution::task)),
IteratorTag());
test_count_exception(execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
}

Expand Down Expand Up @@ -91,8 +93,10 @@ void test_count_bad_alloc()
test_count_bad_alloc(execution_policy(execution::seq), IteratorTag());
test_count_bad_alloc(execution_policy(execution::par), IteratorTag());

test_count_bad_alloc(execution_policy(execution::seq(execution::task)), IteratorTag());
test_count_bad_alloc(execution_policy(execution::par(execution::task)), IteratorTag());
test_count_bad_alloc(execution_policy(execution::seq(execution::task)),
IteratorTag());
test_count_bad_alloc(execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
}

Expand Down

0 comments on commit 3a08360

Please sign in to comment.