Skip to content

Commit

Permalink
Rename some copying_test source files .cu to .cpp (#8527)
Browse files Browse the repository at this point in the history
Found these files could be changed from .cu to .cpp while working on a different PR.

- cpp/tests/copying/gather_struct_tests.cu
- cpp/tests/copying/gather_str_tests.cu
- cpp/tests/copying/gather_tests.cu
- cpp/tests/copying/gather_list_tests.cu
- cpp/tests/copying/pack_tets.cu

This PR renames these files and makes minimal updates (e.g removes unneeded includes of .cuh files) to make these compile and run as .cpp source files.

Authors:
  - David Wendt (https://github.com/davidwendt)

Approvers:
  - Vukasin Milovanovic (https://github.com/vuule)
  - Nghia Truong (https://github.com/ttnghia)

URL: #8527
  • Loading branch information
davidwendt authored Jun 18, 2021
1 parent d8a3e60 commit 7850b5e
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 124 deletions.
10 changes: 5 additions & 5 deletions cpp/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,12 @@ ConfigureTest(COPYING_TEST
copying/copy_range_tests.cpp
copying/copy_tests.cu
copying/detail_gather_tests.cu
copying/gather_struct_tests.cu
copying/gather_tests.cu
copying/gather_str_tests.cu
copying/gather_list_tests.cu
copying/gather_list_tests.cpp
copying/gather_str_tests.cpp
copying/gather_struct_tests.cpp
copying/gather_tests.cpp
copying/get_value_tests.cpp
copying/pack_tests.cu
copying/pack_tests.cpp
copying/sample_tests.cpp
copying/scatter_tests.cpp
copying/scatter_list_tests.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include <cudf/column/column_view.hpp>
#include <cudf/copying.hpp>
#include <cudf/detail/gather.cuh>
#include <cudf/detail/gather.hpp>
#include <cudf/detail/iterator.cuh>
#include <cudf/lists/lists_column_view.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <tests/strings/utilities.h>
#include <cudf/column/column_view.hpp>
#include <cudf/copying.hpp>
#include <cudf/detail/gather.cuh>
#include <cudf/detail/gather.hpp>
#include <cudf/table/table.hpp>
#include <cudf/table/table_view.hpp>
Expand All @@ -26,8 +25,6 @@
#include <cudf_test/cudf_gtest.hpp>
#include <cudf_test/table_utilities.hpp>

#include <rmm/device_uvector.hpp>

class GatherTestStr : public cudf::test::BaseFixture {
};

Expand Down Expand Up @@ -133,11 +130,11 @@ TEST_F(GatherTestStr, GatherEmptyMapStringsColumn)
{
cudf::column_view zero_size_strings_column(
cudf::data_type{cudf::type_id::STRING}, 0, nullptr, nullptr, 0);
rmm::device_uvector<cudf::size_type> gather_map{0, rmm::cuda_stream_default};
cudf::test::fixed_width_column_wrapper<cudf::size_type> gather_map;
auto results = cudf::detail::gather(cudf::table_view({zero_size_strings_column}),
gather_map.begin(),
gather_map.end(),
cudf::out_of_bounds_policy::NULLIFY);
gather_map,
cudf::out_of_bounds_policy::NULLIFY,
cudf::detail::negative_index_policy::NOT_ALLOWED);
cudf::test::expect_strings_empty(results->get_column(0).view());
}

Expand All @@ -146,11 +143,10 @@ TEST_F(GatherTestStr, GatherZeroSizeStringsColumn)
cudf::column_view zero_size_strings_column(
cudf::data_type{cudf::type_id::STRING}, 0, nullptr, nullptr, 0);
cudf::test::fixed_width_column_wrapper<int32_t> gather_map({0});
cudf::column_view gather_view = gather_map;
cudf::test::strings_column_wrapper expected{std::pair<std::string, bool>{"", false}};
auto results = cudf::detail::gather(cudf::table_view({zero_size_strings_column}),
gather_view.begin<int32_t>(),
gather_view.end<int32_t>(),
cudf::out_of_bounds_policy::NULLIFY);
gather_map,
cudf::out_of_bounds_policy::NULLIFY,
cudf::detail::negative_index_policy::NOT_ALLOWED);
CUDF_TEST_EXPECT_COLUMNS_EQUAL(expected, results->get_column(0).view());
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <cudf/column/column_factories.hpp>
#include <cudf/copying.hpp>
#include <cudf/detail/iterator.cuh>
#include <cudf/detail/utilities/device_operators.cuh>
#include <cudf/lists/lists_column_view.hpp>
#include <cudf/null_mask.hpp>
#include <cudf/structs/structs_column_view.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

#include <cudf/column/column_view.hpp>
#include <cudf/copying.hpp>
#include <cudf/detail/gather.cuh>
#include <cudf/detail/gather.hpp>
#include <cudf/detail/iterator.cuh>
#include <cudf/table/table.hpp>
#include <cudf/table/table_view.hpp>
Expand Down
Loading

0 comments on commit 7850b5e

Please sign in to comment.