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

Use thrust::host_vector instead of std::vector<bool> in tests #1048

Merged
merged 3 commits into from
Apr 7, 2023

Conversation

cwharris
Copy link
Contributor

@cwharris cwharris commented Apr 7, 2023

Description

Updates tests to use thrust::host_vector<bool> instead of std::vector<bool> and in one case std::vector<int> where int was logically bool.

closes #823

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@cwharris cwharris added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Apr 7, 2023
@cwharris cwharris requested a review from a team as a code owner April 7, 2023 15:44
@cwharris cwharris requested review from trxcllnt and isVoid April 7, 2023 15:44
@github-actions github-actions bot added the libcuspatial Relates to the cuSpatial C++ library label Apr 7, 2023
@cwharris
Copy link
Contributor Author

cwharris commented Apr 7, 2023

Another way we could do this is by creating a host_vector_converter class that has an implicit initializer_list constructor and an implicit thrust::host_vector conversion operator, eliminating the need to call a function.

@isVoid
Copy link
Contributor

isVoid commented Apr 7, 2023

Another way we could do this is by creating a host_vector_converter class that has an implicit initializer_list constructor and an implicit thrust::host_vector conversion operator, eliminating the need to call a function.

I'm curious how this is done. Wouldn't you still need to call host_vector_converter ctor somewhere to resolve to the conversion operator?

@cwharris
Copy link
Contributor Author

cwharris commented Apr 7, 2023

@isVoid Yes, you're right. We would have to modify the function signatures or explicitly call the converter constructor. I didn't think this through properly.

@cwharris
Copy link
Contributor Author

cwharris commented Apr 7, 2023

/merge

@rapids-bot rapids-bot bot merged commit 07ba65d into rapidsai:branch-23.06 Apr 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function libcuspatial Relates to the cuSpatial C++ library non-breaking Non-breaking change
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

Avoid vector<bool>, use thrust::host_vector<bool> instead.
2 participants