1313#include < cudf_test/random.hpp>
1414#include < cudf_test/testing_main.hpp>
1515
16+ #include < cudf/detail/utilities/buffer_factories.hpp>
17+ #include < cudf/detail/utilities/vector_factories.hpp>
1618#include < cudf/io/json.hpp>
1719#include < cudf/scalar/scalar.hpp>
1820#include < cudf/utilities/default_stream.hpp>
@@ -635,10 +637,10 @@ TEST_F(JsonParserTest, ExtractColumn)
635637 cudf::io::json_reader_options default_options{};
636638
637639 std::string const input = R"( [{"a":0.0, "b":1.0}, {"a":0.1, "b":1.1}, {"a":0.2, "b":1.2}] )" ;
638- auto const d_input = cudf::detail::make_device_uvector_async (
639- cudf::host_span<char const >{input.c_str (), input.size ()},
640- stream,
641- cudf::get_current_device_resource_ref ());
640+ auto const d_input =
641+ cudf::detail::make_device_buffer_async (cudf:: host_span<char const >{input.c_str (), input.size ()},
642+ stream,
643+ cudf::get_current_device_resource_ref ());
642644 // Get the JSON's tree representation
643645 auto const cudf_table = json_parser (d_input, default_options, stream, mr);
644646
@@ -843,12 +845,12 @@ TEST_F(JsonTest, PostProcessTokenStream)
843845 thrust::copy (input.cbegin (), input.cend (), token_tuples);
844846
845847 // Initialize device-side test data
846- auto const d_offsets = cudf::detail::make_device_uvector_async (
848+ auto const d_offsets = cudf::detail::make_device_buffer_async (
847849 cudf::host_span<token_index_t const >{offsets.data (), offsets.size ()},
848850 stream,
849851 cudf::get_current_device_resource_ref ());
850- auto const d_tokens = cudf::detail::make_device_uvector_async (
851- tokens, stream, cudf::get_current_device_resource_ref ());
852+ auto const d_tokens =
853+ cudf::detail::make_device_buffer_async ( tokens, stream, cudf::get_current_device_resource_ref ());
852854
853855 // Run system-under-test
854856 auto [d_filtered_tokens, d_filtered_indices] =
@@ -892,7 +894,7 @@ TEST_P(JsonDelimiterParamTest, UTF_JSON)
892894 {"a":1,"b":Infinity,"c":[null], "d": {"year":-600,"author": "Kaniyan"}}])" ;
893895 std::replace (ascii_pass.begin (), ascii_pass.end (), ' \n ' , delimiter);
894896
895- auto const d_ascii_pass = cudf::detail::make_device_uvector (
897+ auto const d_ascii_pass = cudf::detail::make_device_buffer (
896898 cudf::host_span<char const >{ascii_pass.c_str (), ascii_pass.size ()},
897899 stream,
898900 cudf::get_current_device_resource_ref ());
@@ -909,7 +911,7 @@ TEST_P(JsonDelimiterParamTest, UTF_JSON)
909911 {"a":1,"b":Infinity,"c":[null], "d": {"year":-600,"author": "filip ʒakotɛ"}}])" ;
910912 std::replace (utf_failed.begin (), utf_failed.end (), ' \n ' , delimiter);
911913
912- auto const d_utf_failed = cudf::detail::make_device_uvector (
914+ auto const d_utf_failed = cudf::detail::make_device_buffer (
913915 cudf::host_span<char const >{utf_failed.c_str (), utf_failed.size ()},
914916 stream,
915917 cudf::get_current_device_resource_ref ());
@@ -926,10 +928,10 @@ TEST_P(JsonDelimiterParamTest, UTF_JSON)
926928 {"a":1,"b":NaN,"c":[null, null], "d": {"year": 2, "author": "filip ʒakotɛ"}}])" ;
927929 std::replace (utf_pass.begin (), utf_pass.end (), ' \n ' , delimiter);
928930
929- auto const d_utf_pass = cudf::detail::make_device_uvector (
930- cudf::host_span<char const >{utf_pass.c_str (), utf_pass.size ()},
931- stream,
932- cudf::get_current_device_resource_ref ());
931+ auto const d_utf_pass =
932+ cudf::detail::make_device_buffer (cudf:: host_span<char const >{utf_pass.c_str (), utf_pass.size ()},
933+ stream,
934+ cudf::get_current_device_resource_ref ());
933935 CUDF_EXPECT_NO_THROW (json_parser (d_utf_pass, default_options, stream, mr));
934936}
935937
@@ -947,10 +949,10 @@ TEST_F(JsonParserTest, ExtractColumnWithQuotes)
947949 options.enable_keep_quotes (true );
948950
949951 std::string const input = R"( [{"a":"0.0", "b":1.0}, {"b":1.1}, {"b":2.1, "a":"2.0"}] )" ;
950- auto const d_input = cudf::detail::make_device_uvector_async (
951- cudf::host_span<char const >{input.c_str (), input.size ()},
952- stream,
953- cudf::get_current_device_resource_ref ());
952+ auto const d_input =
953+ cudf::detail::make_device_buffer_async (cudf:: host_span<char const >{input.c_str (), input.size ()},
954+ stream,
955+ cudf::get_current_device_resource_ref ());
954956 // Get the JSON's tree representation
955957 auto const cudf_table = json_parser (d_input, options, stream, mr);
956958
@@ -990,7 +992,7 @@ TEST_F(JsonParserTest, ExpectFailMixStructAndList)
990992
991993 // libcudf does not currently support a mix of lists and structs.
992994 for (auto const & input : inputs_fail) {
993- auto const d_input = cudf::detail::make_device_uvector_async (
995+ auto const d_input = cudf::detail::make_device_buffer_async (
994996 cudf::host_span<char const >{input.c_str (), input.size ()},
995997 stream,
996998 cudf::get_current_device_resource_ref ());
@@ -999,7 +1001,7 @@ TEST_F(JsonParserTest, ExpectFailMixStructAndList)
9991001 }
10001002
10011003 for (auto const & input : inputs_succeed) {
1002- auto const d_input = cudf::detail::make_device_uvector_async (
1004+ auto const d_input = cudf::detail::make_device_buffer_async (
10031005 cudf::host_span<char const >{input.c_str (), input.size ()},
10041006 stream,
10051007 cudf::get_current_device_resource_ref ());
@@ -1021,9 +1023,9 @@ TEST_F(JsonParserTest, EmptyString)
10211023
10221024 std::string const input = R"( [])" ;
10231025 auto const d_input =
1024- cudf::detail::make_device_uvector (cudf::host_span<char const >{input.c_str (), input.size ()},
1025- stream,
1026- cudf::get_current_device_resource_ref ());
1026+ cudf::detail::make_device_buffer (cudf::host_span<char const >{input.c_str (), input.size ()},
1027+ stream,
1028+ cudf::get_current_device_resource_ref ());
10271029 // Get the JSON's tree representation
10281030 auto const cudf_table = json_parser (d_input, default_options, stream, mr);
10291031
@@ -1410,9 +1412,9 @@ TEST_F(JsonTest, RejectsUnquotedValuesWithInvalidLeadingChar)
14101412 token_t ::StructEnd,
14111413 token_t ::LineEnd};
14121414 std::vector<cuio_json::SymbolOffsetT> token_indices{0 , 0 , 1 , 3 , 5 , 6 , 6 , 6 , 7 };
1413- auto d_tokens = cudf::detail::make_device_uvector_async (
1415+ auto d_tokens = cudf::detail::make_device_buffer_async (
14141416 tokens, stream, cudf::get_current_device_resource_ref ());
1415- auto d_token_indices = cudf::detail::make_device_uvector_async (
1417+ auto d_token_indices = cudf::detail::make_device_buffer_async (
14161418 token_indices, stream, cudf::get_current_device_resource_ref ());
14171419
14181420 cuio_json::detail::validate_token_stream (d_input, d_tokens, d_token_indices, opts, stream);
0 commit comments