Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract debug_utilities.hpp/cu from column_utilities.hpp/cu #13720

Merged
merged 32 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5e69cb2
Add new file in cmake
ttnghia Jul 18, 2023
c22317d
Extract print code
ttnghia Jul 18, 2023
edb5e4b
Replace stream
ttnghia Jul 18, 2023
c6bcdd5
WIP
ttnghia Jul 18, 2023
7f44d5e
Add comments
ttnghia Jul 18, 2023
5698705
Cleanup headers
ttnghia Jul 18, 2023
70aaeb9
Remove declaration
ttnghia Jul 18, 2023
1e8a158
Cleanup
ttnghia Jul 18, 2023
422b793
Cleanup
ttnghia Jul 18, 2023
45824ba
Rename namespace
ttnghia Jul 18, 2023
cc57d6d
Add comment
ttnghia Jul 18, 2023
01a5f0e
Remove parameter
ttnghia Jul 18, 2023
4cf2007
Add comment about usage
ttnghia Jul 19, 2023
d7bff67
Update meta.yaml
ttnghia Jul 19, 2023
851300c
Update meta.yaml
ttnghia Jul 19, 2023
ee09eb6
Change comment
ttnghia Jul 19, 2023
761a842
Fix struct test
ttnghia Jul 19, 2023
e7df8fb
Control adding source file by cmake
ttnghia Jul 19, 2023
58447f9
Revert "Control adding source file by cmake"
ttnghia Jul 19, 2023
6485ffc
Merge branch 'branch-23.08' into debug_utils
ttnghia Jul 19, 2023
1ed6980
Fix column_utility_tests.cpp
ttnghia Jul 19, 2023
25ccbac
Merge branch 'branch-23.10' into debug_utils
ttnghia Aug 11, 2023
ecebebd
Merge branch 'branch-23.10' into debug_utils
ttnghia Aug 26, 2023
b37b373
Merge branch 'branch-23.12' into debug_utils
ttnghia Oct 16, 2023
abbe5cf
Merge branch 'branch-23.12' into debug_utils
ttnghia Oct 16, 2023
df6e608
Merge branch 'branch-23.12' into debug_utils
ttnghia Oct 17, 2023
3ae27f3
Merge branch 'branch-23.12' into debug_utils
ttnghia Oct 18, 2023
ecbeef9
Use macro to detect gtest
ttnghia Oct 19, 2023
b6e2782
Merge branch 'branch-23.12' into debug_utils
ttnghia Oct 19, 2023
048d8cb
Remove header check
ttnghia Oct 20, 2023
cb6b874
Merge branch 'branch-23.12' into debug_utils
ttnghia Oct 20, 2023
ae2dd49
Extract debug tests
ttnghia Oct 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,7 @@ if(CUDF_BUILD_TESTUTIL)
tests/io/metadata_utilities.cpp
tests/utilities/base_fixture.cpp
tests/utilities/column_utilities.cu
tests/utilities/debug_utilities.cu
tests/utilities/table_utilities.cu
tests/utilities/tdigest_utilities.cu
)
Expand Down
33 changes: 0 additions & 33 deletions cpp/include/cudf_test/column_utilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,39 +140,6 @@ void expect_equal_buffers(void const* lhs, void const* rhs, std::size_t size_byt
*/
void expect_column_empty(cudf::column_view const& col);

/**
* @brief Formats a column view as a string
*
* @param col The column view
* @param delimiter The delimiter to put between strings
*/
std::string to_string(cudf::column_view const& col, std::string const& delimiter);

/**
* @brief Formats a null mask as a string
*
* @param null_mask The null mask buffer
* @param null_mask_size Size of the null mask (in rows)
*/
std::string to_string(std::vector<bitmask_type> const& null_mask, size_type null_mask_size);

/**
* @brief Convert column values to a host vector of strings
*
* @param col The column view
*/
std::vector<std::string> to_strings(cudf::column_view const& col);

/**
* @brief Print a column view to an ostream
*
* @param os The output stream
* @param col The column view
*/
void print(cudf::column_view const& col,
std::ostream& os = std::cout,
std::string const& delimiter = ",");

/**
* @brief Copy the null bitmask from a column view to a host vector
*
Expand Down
47 changes: 47 additions & 0 deletions cpp/include/cudf_test/debug_utilities.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright (c) 2020-2023, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#include <cudf/column/column_view.hpp>
#include <cudf/null_mask.hpp>

namespace cudf::test {

/**
* @brief Formats a column view as a string
*
* @param col The input column view
* @param delimiter The delimiter to put between strings
*/
std::string to_string(cudf::column_view const& col, std::string const& delimiter);

/**
* @brief Convert column values to a host vector of strings
*
* @param col The input column view
*/
std::vector<std::string> to_strings(cudf::column_view const& col);

/**
* @brief Print a column view to an ostream
*
* @param col The input column view
* @param os The output stream
*/
void print(cudf::column_view const& col, std::ostream& os = std::cout);

} // namespace cudf::test
85 changes: 0 additions & 85 deletions cpp/include/cudf_test/detail/column_utilities.hpp

This file was deleted.

1 change: 1 addition & 0 deletions cpp/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ ConfigureTest(
ConfigureTest(
UTILITIES_TEST
utilities_tests/type_list_tests.cpp
utilities_tests/column_debug_tests.cpp
utilities_tests/column_utilities_tests.cpp
utilities_tests/column_wrapper_tests.cpp
utilities_tests/lists_column_wrapper_tests.cpp
Expand Down
1 change: 1 addition & 0 deletions cpp/tests/groupby/structs_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <cudf_test/base_fixture.hpp>
#include <cudf_test/column_wrapper.hpp>
#include <cudf_test/debug_utilities.hpp>
davidwendt marked this conversation as resolved.
Show resolved Hide resolved
#include <cudf_test/iterator_utilities.hpp>
#include <cudf_test/type_lists.hpp>

Expand Down
Loading