diff --git a/cpp/include/cudf/detail/utilities/stream_pool.hpp b/cpp/include/cudf/detail/utilities/stream_pool.hpp index dfe028bc5b7..70e63ae21bd 100644 --- a/cpp/include/cudf/detail/utilities/stream_pool.hpp +++ b/cpp/include/cudf/detail/utilities/stream_pool.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023-2024, NVIDIA CORPORATION. + * Copyright (c) 2023-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,11 @@ class cuda_stream_pool { // matching type used in rmm::cuda_stream_pool::get_stream(stream_id) using stream_id_type = std::size_t; - virtual ~cuda_stream_pool() = default; + virtual ~cuda_stream_pool() = default; + cuda_stream_pool(cuda_stream_pool const&) = delete; + cuda_stream_pool(cuda_stream_pool&&) = delete; + cuda_stream_pool& operator=(cuda_stream_pool const&) = delete; + cuda_stream_pool& operator=(cuda_stream_pool&&) = delete; /** * @brief Get a `cuda_stream_view` of a stream in the pool. @@ -76,6 +80,9 @@ class cuda_stream_pool { * @return the number of stream objects in the pool */ [[nodiscard]] virtual std::size_t get_stream_pool_size() const = 0; + + protected: + cuda_stream_pool() = default; }; /** diff --git a/cpp/include/cudf/join/sort_merge_join.hpp b/cpp/include/cudf/join/sort_merge_join.hpp index c7f572d4525..a82d293d656 100644 --- a/cpp/include/cudf/join/sort_merge_join.hpp +++ b/cpp/include/cudf/join/sort_merge_join.hpp @@ -44,6 +44,12 @@ namespace CUDF_EXPORT cudf { */ class sort_merge_join { public: + sort_merge_join() = delete; + sort_merge_join(sort_merge_join const&) = delete; + sort_merge_join(sort_merge_join&&) = delete; + sort_merge_join& operator=(sort_merge_join const&) = delete; + sort_merge_join& operator=(sort_merge_join&&) = delete; + /** * @brief Construct a sort-merge join object that pre-processes the right table * on creation, and can be used on subsequent join operations with multiple diff --git a/cpp/include/cudf/strings/regex/regex_program.hpp b/cpp/include/cudf/strings/regex/regex_program.hpp index 1bf1c26f471..f6fc4e8cc3f 100644 --- a/cpp/include/cudf/strings/regex/regex_program.hpp +++ b/cpp/include/cudf/strings/regex/regex_program.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024, NVIDIA CORPORATION. + * Copyright (c) 2022-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,14 +54,16 @@ struct regex_program { regex_flags flags = regex_flags::DEFAULT, capture_groups capture = capture_groups::EXTRACT); - regex_program() = delete; + regex_program() = delete; + regex_program(regex_program const&) = delete; + regex_program& operator=(regex_program const&) = delete; /** * @brief Move constructor * * @param other Object to move from */ - regex_program(regex_program&& other); + regex_program(regex_program&& other) noexcept; /** * @brief Move operator assignment @@ -69,7 +71,7 @@ struct regex_program { * @param other Object to move from * @return this object */ - regex_program& operator=(regex_program&& other); + regex_program& operator=(regex_program&& other) noexcept; /** * @brief Return the pattern used to create this instance diff --git a/cpp/src/io/avro/reader_impl.cu b/cpp/src/io/avro/reader_impl.cu index 50186a7a910..63334fe382d 100644 --- a/cpp/src/io/avro/reader_impl.cu +++ b/cpp/src/io/avro/reader_impl.cu @@ -117,6 +117,11 @@ class metadata : public file_metadata { public: explicit metadata(datasource* const src) : source(src) {} + metadata(metadata const&) = delete; + metadata& operator=(metadata const&) = delete; + metadata(metadata&&) = delete; + metadata& operator=(metadata&&) = delete; + /** * @brief Initializes the parser and filters down to a subset of rows * diff --git a/cpp/src/io/json/nested_json.hpp b/cpp/src/io/json/nested_json.hpp index 8e5f8d51acb..bf7069a9b8c 100644 --- a/cpp/src/io/json/nested_json.hpp +++ b/cpp/src/io/json/nested_json.hpp @@ -144,6 +144,11 @@ struct device_json_column { // Type used to count number of rows using row_offset_t = size_type; + device_json_column(device_json_column const&) = delete; + device_json_column& operator=(device_json_column const&) = delete; + device_json_column(device_json_column&&) = default; + device_json_column& operator=(device_json_column&&) = default; + // The inferred type of this column (list, struct, or value/string column) json_col_t type = json_col_t::Unknown; diff --git a/cpp/src/io/orc/aggregate_orc_metadata.hpp b/cpp/src/io/orc/aggregate_orc_metadata.hpp index fe9453f35dc..5e222673989 100644 --- a/cpp/src/io/orc/aggregate_orc_metadata.hpp +++ b/cpp/src/io/orc/aggregate_orc_metadata.hpp @@ -64,6 +64,11 @@ class aggregate_orc_metadata { aggregate_orc_metadata(std::vector> const& sources, rmm::cuda_stream_view stream); + aggregate_orc_metadata(aggregate_orc_metadata const&) = delete; + aggregate_orc_metadata& operator=(aggregate_orc_metadata const&) = delete; + aggregate_orc_metadata(aggregate_orc_metadata&&) = delete; + aggregate_orc_metadata& operator=(aggregate_orc_metadata&&) = delete; + [[nodiscard]] auto get_col_type(int col_idx) const { return per_file_metadata[0].ff.types[col_idx]; diff --git a/cpp/src/io/orc/orc.hpp b/cpp/src/io/orc/orc.hpp index b4130f21e9d..6455017edf8 100644 --- a/cpp/src/io/orc/orc.hpp +++ b/cpp/src/io/orc/orc.hpp @@ -614,6 +614,11 @@ class metadata { public: explicit metadata(datasource* const src, rmm::cuda_stream_view stream); + metadata(metadata const&) = delete; + metadata& operator=(metadata const&) = delete; + metadata(metadata&&) = default; + metadata& operator=(metadata&&) = default; + [[nodiscard]] auto get_total_rows() const { return ff.numberOfRows; } [[nodiscard]] size_type get_num_stripes() const { return ff.stripes.size(); } [[nodiscard]] size_type get_num_columns() const { return ff.types.size(); } @@ -671,7 +676,7 @@ class metadata { Metadata md; std::vector stripefooters; std::unique_ptr decompressor; - datasource* const source; + datasource* source; private: struct column_parent { diff --git a/cpp/src/io/orc/reader_impl.hpp b/cpp/src/io/orc/reader_impl.hpp index 31ad754a48f..432dabf3a5f 100644 --- a/cpp/src/io/orc/reader_impl.hpp +++ b/cpp/src/io/orc/reader_impl.hpp @@ -80,6 +80,11 @@ class reader_impl { rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr); + reader_impl(reader_impl const&) = delete; + reader_impl& operator=(reader_impl const&) = delete; + reader_impl(reader_impl&&) = delete; + reader_impl& operator=(reader_impl&&) = delete; + /** * @copydoc cudf::io::orc::detail::reader::read */ diff --git a/cpp/src/io/orc/reader_impl_chunking.hpp b/cpp/src/io/orc/reader_impl_chunking.hpp index 54ed6e041da..be687d1c47c 100644 --- a/cpp/src/io/orc/reader_impl_chunking.hpp +++ b/cpp/src/io/orc/reader_impl_chunking.hpp @@ -128,6 +128,13 @@ struct orc_stream_info { * @brief Struct storing intermediate processing data loaded from data sources. */ struct file_intermediate_data { + file_intermediate_data() = default; + + file_intermediate_data(file_intermediate_data const&) = delete; + file_intermediate_data& operator=(file_intermediate_data const&) = delete; + file_intermediate_data(file_intermediate_data&&) = default; + file_intermediate_data& operator=(file_intermediate_data&&) = default; + int64_t rows_to_skip; int64_t rows_to_read; std::vector selected_stripes; diff --git a/cpp/src/io/orc/writer_impl.hpp b/cpp/src/io/orc/writer_impl.hpp index 82217355911..372696a120a 100644 --- a/cpp/src/io/orc/writer_impl.hpp +++ b/cpp/src/io/orc/writer_impl.hpp @@ -249,6 +249,11 @@ class writer::impl { */ ~impl(); + impl(impl const&) = delete; + impl& operator=(impl const&) = delete; + impl(impl&&) = delete; + impl& operator=(impl&&) = delete; + /** * @brief Writes a single subtable as part of a larger ORC file/table write. * diff --git a/cpp/src/io/parquet/reader_impl.hpp b/cpp/src/io/parquet/reader_impl.hpp index 6a6cfea53e6..75cbf349bd8 100644 --- a/cpp/src/io/parquet/reader_impl.hpp +++ b/cpp/src/io/parquet/reader_impl.hpp @@ -113,6 +113,11 @@ class reader_impl { rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr); + reader_impl(reader_impl const&) = delete; + reader_impl& operator=(reader_impl const&) = delete; + reader_impl(reader_impl&&) = delete; + reader_impl& operator=(reader_impl&&) = delete; + /** * @copydoc cudf::io::chunked_parquet_reader::has_next */ diff --git a/cpp/src/io/parquet/reader_impl_chunking.hpp b/cpp/src/io/parquet/reader_impl_chunking.hpp index 81ab03f4b41..4d86c2a1258 100644 --- a/cpp/src/io/parquet/reader_impl_chunking.hpp +++ b/cpp/src/io/parquet/reader_impl_chunking.hpp @@ -27,6 +27,13 @@ namespace cudf::io::parquet::detail { * all passes/chunks in the file. */ struct file_intermediate_data { + file_intermediate_data() = default; + + file_intermediate_data(file_intermediate_data const&) = delete; + file_intermediate_data& operator=(file_intermediate_data const&) = delete; + file_intermediate_data(file_intermediate_data&&) = default; + file_intermediate_data& operator=(file_intermediate_data&&) = default; + // all row groups to read std::vector row_groups{}; @@ -77,6 +84,13 @@ struct row_range { * @brief Passes are broken down into subpasses based on temporary memory constraints. */ struct subpass_intermediate_data { + subpass_intermediate_data() = default; + + subpass_intermediate_data(subpass_intermediate_data const&) = delete; + subpass_intermediate_data& operator=(subpass_intermediate_data const&) = delete; + subpass_intermediate_data(subpass_intermediate_data&&) = default; + subpass_intermediate_data& operator=(subpass_intermediate_data&&) = default; + rmm::device_buffer decomp_page_data; rmm::device_buffer level_decode_data{}; @@ -118,6 +132,13 @@ struct subpass_intermediate_data { * rowgroups may represent less than all of the rowgroups to be read for the file. */ struct pass_intermediate_data { + pass_intermediate_data() = default; + + pass_intermediate_data(pass_intermediate_data const&) = delete; + pass_intermediate_data& operator=(pass_intermediate_data const&) = delete; + pass_intermediate_data(pass_intermediate_data&&) = default; + pass_intermediate_data& operator=(pass_intermediate_data&&) = default; + std::vector raw_page_data; // rowgroup, chunk and page information for the current pass. diff --git a/cpp/src/io/parquet/reader_impl_helpers.hpp b/cpp/src/io/parquet/reader_impl_helpers.hpp index 5e8e35ad4a2..982ae244870 100644 --- a/cpp/src/io/parquet/reader_impl_helpers.hpp +++ b/cpp/src/io/parquet/reader_impl_helpers.hpp @@ -337,6 +337,11 @@ class aggregate_reader_metadata { bool has_cols_from_mismatched_srcs, bool read_page_indexes = true); + aggregate_reader_metadata(aggregate_reader_metadata const&) = delete; + aggregate_reader_metadata& operator=(aggregate_reader_metadata const&) = delete; + aggregate_reader_metadata(aggregate_reader_metadata&&) = delete; + aggregate_reader_metadata& operator=(aggregate_reader_metadata&&) = delete; + [[nodiscard]] RowGroup const& get_row_group(size_type row_group_index, size_type src_idx) const; /** diff --git a/cpp/src/io/parquet/writer_impl.hpp b/cpp/src/io/parquet/writer_impl.hpp index 550fd5bc8ac..3bd6f68ba78 100644 --- a/cpp/src/io/parquet/writer_impl.hpp +++ b/cpp/src/io/parquet/writer_impl.hpp @@ -82,6 +82,11 @@ class writer::impl { */ ~impl(); + impl(impl const&) = delete; + impl& operator=(impl const&) = delete; + impl(impl&&) = delete; + impl& operator=(impl&&) = delete; + /** * @brief Initializes the states before writing. */ diff --git a/cpp/src/io/text/bgzip_data_chunk_source.cu b/cpp/src/io/text/bgzip_data_chunk_source.cu index 314ea389ccd..7b710f98fe5 100644 --- a/cpp/src/io/text/bgzip_data_chunk_source.cu +++ b/cpp/src/io/text/bgzip_data_chunk_source.cu @@ -87,6 +87,11 @@ class bgzip_data_chunk_reader : public data_chunk_reader { static constexpr std::size_t default_offset_alloc = 1 << 16; // 64k offset allocation, resized on demand + decompression_blocks(decompression_blocks const&) = delete; + decompression_blocks& operator=(decompression_blocks const&) = delete; + decompression_blocks(decompression_blocks&&) = default; + decompression_blocks& operator=(decompression_blocks&&) = default; + cudaEvent_t event; cudf::detail::host_vector h_compressed_blocks; cudf::detail::host_vector h_compressed_offsets; diff --git a/cpp/src/io/text/device_data_chunks.hpp b/cpp/src/io/text/device_data_chunks.hpp index 3f971ae147a..63a782e38fa 100644 --- a/cpp/src/io/text/device_data_chunks.hpp +++ b/cpp/src/io/text/device_data_chunks.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022, NVIDIA CORPORATION. + * Copyright (c) 2022-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +36,11 @@ class device_uvector_data_chunk : public device_data_chunk { public: device_uvector_data_chunk(rmm::device_uvector&& data) : _data(std::move(data)) {} + device_uvector_data_chunk(device_uvector_data_chunk const&) = delete; + device_uvector_data_chunk& operator=(device_uvector_data_chunk const&) = delete; + device_uvector_data_chunk(device_uvector_data_chunk&&) = default; + device_uvector_data_chunk& operator=(device_uvector_data_chunk&&) = default; + [[nodiscard]] char const* data() const override { return _data.data(); } [[nodiscard]] std::size_t size() const override { return _data.size(); } operator device_span() const override { return _data; } diff --git a/cpp/src/strings/regex/regex_program.cpp b/cpp/src/strings/regex/regex_program.cpp index 28950d52afc..243c534d541 100644 --- a/cpp/src/strings/regex/regex_program.cpp +++ b/cpp/src/strings/regex/regex_program.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2023, NVIDIA CORPORATION. + * Copyright (c) 2022-2025, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,9 +32,9 @@ std::unique_ptr regex_program::create(std::string_view pattern, return std::unique_ptr(p); } -regex_program::~regex_program() = default; -regex_program::regex_program(regex_program&& other) = default; -regex_program& regex_program::operator=(regex_program&& other) = default; +regex_program::~regex_program() = default; +regex_program::regex_program(regex_program&& other) noexcept = default; +regex_program& regex_program::operator=(regex_program&& other) noexcept = default; regex_program::regex_program(std::string_view pattern, regex_flags flags, capture_groups capture) : _pattern(pattern), diff --git a/java/src/main/native/src/DataSourceHelperJni.cpp b/java/src/main/native/src/DataSourceHelperJni.cpp index 13bb581ff91..1df5526ad8d 100644 --- a/java/src/main/native/src/DataSourceHelperJni.cpp +++ b/java/src/main/native/src/DataSourceHelperJni.cpp @@ -66,7 +66,7 @@ class host_buffer_done_callback { explicit host_buffer_done_callback(JavaVM* jvm, jobject ds, long id) : jvm(jvm), ds(ds), id(id) {} host_buffer_done_callback(host_buffer_done_callback const& other) = delete; - host_buffer_done_callback(host_buffer_done_callback&& other) + host_buffer_done_callback(host_buffer_done_callback&& other) noexcept : jvm(other.jvm), ds(other.ds), id(other.id) { other.jvm = nullptr;