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

Change cudf::scalar copy and move constructors to protected #8857

Merged
merged 5 commits into from
Jul 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
28 changes: 14 additions & 14 deletions cpp/include/cudf/scalar/scalar.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,10 @@ namespace cudf {
*/
class scalar {
public:
virtual ~scalar() = default;
scalar(scalar&& other) = default;

virtual ~scalar() = default;
scalar& operator=(scalar const& other) = delete;
scalar& operator=(scalar&& other) = delete;

/**
* @brief Construct a new scalar object by deep copying another.
*
* @param other The scalar to copy.
* @param stream CUDA stream used for device memory operations.
* @param mr Device memory resource to use for device memory allocation.
*/
scalar(scalar const& other,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());

/**
* @brief Returns the scalar's logical value type.
*/
Expand Down Expand Up @@ -103,6 +90,19 @@ class scalar {

scalar() = delete;

scalar(scalar&& other) = default;

/**
* @brief Construct a new scalar object by deep copying another.
*
* @param other The scalar to copy.
* @param stream CUDA stream used for device memory operations.
* @param mr Device memory resource to use for device memory allocation.
*/
scalar(scalar const& other,
rmm::cuda_stream_view stream = rmm::cuda_stream_default,
rmm::mr::device_memory_resource* mr = rmm::mr::get_current_device_resource());

/**
* @brief Construct a new scalar object.
*
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/binaryop/binop-fixture.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct BinaryOperationTest : public cudf::test::BaseFixture {
cudf::test::UniformRandomGenerator<uint8_t> rand_gen(r_min, r_max);
uint8_t size = rand_gen.generate();
std::string str{"ஔⒶbc⁂∰ൠ \tنж水✉♪✿™"};
return cudf::scalar_type_t<T>(string_view(str.data(), size));
return cudf::scalar_type_t<T>(str.substr(0, size));
}
};

Expand Down