Skip to content

Commit 4b9584b

Browse files
committed
Follow rule of three in sycl headers
1 parent 0a3a324 commit 4b9584b

File tree

5 files changed

+10
-2
lines changed

5 files changed

+10
-2
lines changed

sycl/include/sycl/detail/common.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ class __SYCL_EXPORT tls_code_loc_t {
131131
/// @details If a previous populated TLS entry exists, this constructor will
132132
/// capture the informationa and allow you to query the information later.
133133
tls_code_loc_t();
134+
tls_code_loc_t(const tls_code_loc_t &TLSCodeLoc) = default;
135+
tls_code_loc_t &operator=(const tls_code_loc_t &TLSCodeLoc) = default;
134136
/// @brief Iniitializes TLS with CodeLoc if a TLS entry not present
135137
/// @param CodeLoc The code location information to set up the TLS slot with.
136138
tls_code_loc_t(const detail::code_location &CodeLoc);

sycl/include/sycl/detail/util.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ template <typename T> struct TempAssignGuard {
4242
TempAssignGuard(T &fld, T tempVal) : field(fld), restoreValue(fld) {
4343
field = tempVal;
4444
}
45+
TempAssignGuard(const TempAssignGuard<T> &) = delete;
46+
TempAssignGuard operator=(const TempAssignGuard<T> &) = delete;
4547
~TempAssignGuard() { field = restoreValue; }
4648
};
4749

sycl/include/sycl/ext/intel/experimental/pipes.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ namespace experimental {
4343
class pipe_base {
4444

4545
protected:
46-
pipe_base();
47-
~pipe_base();
46+
pipe_base() = default;
47+
~pipe_base() = default;
4848

4949
__SYCL_EXPORT static std::string get_pipe_name(const void *HostPipePtr);
5050
__SYCL_EXPORT static bool wait_non_blocking(const event &E);

sycl/include/sycl/ext/oneapi/bindless_images_memory.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ class image_mem_impl {
3939
const context &syclContext);
4040
__SYCL_EXPORT ~image_mem_impl();
4141

42+
image_mem_impl(const image_mem_impl&) = delete;
43+
image_mem_impl& operator=(const image_mem_impl&) = delete;
44+
4245
raw_handle_type get_handle() const { return handle; }
4346
const image_descriptor &get_descriptor() const { return descriptor; }
4447
sycl::device get_device() const { return syclDevice; }

sycl/include/sycl/ext/oneapi/experimental/cuda/barrier.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class barrier {
3333
barrier(barrier &&other) noexcept = delete;
3434
barrier &operator=(const barrier &other) = delete;
3535
barrier &operator=(barrier &&other) noexcept = delete;
36+
~barrier() = default;
3637

3738
void initialize(uint32_t expected_count) {
3839
#ifdef __SYCL_DEVICE_ONLY__

0 commit comments

Comments
 (0)