Skip to content

Commit

Permalink
Revert change
Browse files Browse the repository at this point in the history
  • Loading branch information
codereport committed Nov 24, 2021
1 parent fbce0d4 commit b2179a5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion cpp/tests/transform/row_bit_count_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,18 @@ TEST_F(RowBitCount, StringsWithNulls)
CUDF_TEST_EXPECT_COLUMNS_EQUAL(expected, *result);
}

namespace {

/**
* @brief __device__ functor to multiply input by 2, defined out of line because __device__ lambdas
* cannot be defined in a TEST_F().
*/
struct times_2 {
int32_t __device__ operator()(int32_t i) const { return i * 2; }
};

} // namespace

TEST_F(RowBitCount, StructsWithLists_RowsExceedingASingleBlock)
{
// Tests that `row_bit_count()` can handle struct<list<int32_t>> with more
Expand All @@ -236,7 +248,7 @@ TEST_F(RowBitCount, StructsWithLists_RowsExceedingASingleBlock)
thrust::tabulate(thrust::device,
list_offsets_view.begin<offset_type>(),
list_offsets_view.end<offset_type>(),
[] __device__ (auto e) { return e * 2; });
times_2{});

// List<int32_t> = {{0,1}, {2,3}, {4,5}, ..., {2*(num_rows-1), 2*num_rows-1}};
auto lists_column = make_lists_column(num_rows, std::move(list_offsets), std::move(ints), 0, {});
Expand Down

0 comments on commit b2179a5

Please sign in to comment.