Skip to content

Commit

Permalink
use rmm::exec_policy instead of thrust::device
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwendt committed Apr 15, 2021
1 parent 4736b2d commit 5bf0b9f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cpp/tests/transform/row_bit_count_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@

#include <cudf/column/column.hpp>
#include <cudf/column/column_view.hpp>
#include <cudf/detail/copy.hpp>
#include <cudf/strings/detail/utilities.hpp>
#include <cudf/transform.hpp>
#include <cudf/types.hpp>
#include <cudf_test/base_fixture.hpp>
#include <cudf_test/column_utilities.hpp>
#include <cudf_test/column_wrapper.hpp>
#include <cudf_test/type_lists.hpp>

#include <thrust/execution_policy.h>
#include <rmm/exec_policy.hpp>

using namespace cudf;

Expand All @@ -47,7 +45,7 @@ TYPED_TEST(RowBitCountTyped, SimpleTypes)
// expect size of the type per row
auto expected = make_fixed_width_column(data_type{type_id::INT32}, 16);
cudf::mutable_column_view mcv(*expected);
thrust::fill(thrust::device,
thrust::fill(rmm::exec_policy(rmm::cuda_stream_default),
mcv.begin<size_type>(),
mcv.end<size_type>(),
sizeof(device_storage_type_t<T>) * CHAR_BIT);
Expand All @@ -70,7 +68,7 @@ TYPED_TEST(RowBitCountTyped, SimpleTypesWithNulls)
// expect size of the type + 1 bit per row
auto expected = make_fixed_width_column(data_type{type_id::INT32}, 16);
cudf::mutable_column_view mcv(*expected);
thrust::fill(thrust::device,
thrust::fill(rmm::exec_policy(rmm::cuda_stream_default),
mcv.begin<size_type>(),
mcv.end<size_type>(),
(sizeof(device_storage_type_t<T>) * CHAR_BIT) + 1);
Expand Down Expand Up @@ -490,7 +488,7 @@ TEST_F(RowBitCount, Table)
auto expected = cudf::make_fixed_width_column(data_type{type_id::INT32}, t.num_rows());
cudf::mutable_column_view mcv(*expected);
thrust::transform(
thrust::device,
rmm::exec_policy(rmm::cuda_stream_default),
thrust::make_counting_iterator(0),
thrust::make_counting_iterator(0) + t.num_rows(),
mcv.begin<size_type>(),
Expand Down

0 comments on commit 5bf0b9f

Please sign in to comment.