Skip to content

Commit

Permalink
Addressing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Apr 7, 2019
1 parent 262b5a4 commit fb98f26
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 22 deletions.
5 changes: 0 additions & 5 deletions hpx/parallel/util/transfer.hpp
Expand Up @@ -102,7 +102,6 @@ namespace hpx { namespace parallel { namespace util
typename hpx::util::decay<OutIter>::type
>::type
category;
std::cout << typeid(category).name() << "\n";
return detail::copy_helper<category>::call(first, last, dest);
}

Expand Down Expand Up @@ -150,10 +149,6 @@ namespace hpx { namespace parallel { namespace util
typename hpx::util::decay<OutIter>::type
>::type
category;
#if !defined(HPX_COMPUTE_DEVICE_CODE)
std::cout << typeid(category).name() << "\n";
std::cout << typeid(detail::copy_n_helper<category>).name() << "\n";
#endif
return detail::copy_n_helper<category>::call(first, count, dest);
}

Expand Down
34 changes: 17 additions & 17 deletions tests/unit/computeapi/cuda/transform_compute.cu
Expand Up @@ -44,23 +44,23 @@ void test_transform(executor_type& exec,
target_vector& d_A, target_vector& d_B, target_vector& d_C,
std::vector<int> const& ref)
{
// hpx::parallel::transform(
// hpx::parallel::execution::par.on(exec),
// d_A.begin(), d_A.end(), d_B.begin(), d_C.begin(),
// transform_test());
//
// std::vector<int> h_C(d_C.size());
// hpx::parallel::copy(
// hpx::parallel::execution::par,
// d_C.begin(), d_C.end(), h_C.begin());
//
// HPX_TEST_EQ(h_C.size(), ref.size());
// HPX_TEST_EQ(d_C.size(), ref.size());
// for(std::size_t i = 0; i != ref.size(); ++i)
// {
// HPX_TEST_EQ(h_C[i], ref[i]);
// HPX_TEST_EQ(d_C[i], ref[i]);
// }
hpx::parallel::transform(
hpx::parallel::execution::par.on(exec),
d_A.begin(), d_A.end(), d_B.begin(), d_C.begin(),
transform_test());

std::vector<int> h_C(d_C.size());
hpx::parallel::copy(
hpx::parallel::execution::par,
d_C.begin(), d_C.end(), h_C.begin());

HPX_TEST_EQ(h_C.size(), ref.size());
HPX_TEST_EQ(d_C.size(), ref.size());
for(std::size_t i = 0; i != ref.size(); ++i)
{
HPX_TEST_EQ(h_C[i], ref[i]);
HPX_TEST_EQ(d_C[i], ref[i]);
}
}

int hpx_main(boost::program_options::variables_map& vm)
Expand Down

0 comments on commit fb98f26

Please sign in to comment.