@@ -73,6 +73,33 @@ template <typename Task>
7373compute_input<Task>::compute_input(const table& data, const table& weights)
7474 : impl_(new compute_input_impl<Task>(data, weights)) {}
7575
76+ template <typename Task>
77+ compute_input<Task>::~compute_input () {}
78+
79+ template <typename Task>
80+ compute_input<Task>::compute_input(const compute_input& other) : impl_(other.impl_) {}
81+
82+ template <typename Task>
83+ compute_input<Task>::compute_input(compute_input&& other) noexcept
84+ : impl_(std::move(other.impl_)) {}
85+
86+ template <typename Task>
87+ compute_input<Task>& compute_input<Task>::operator =(const compute_input& other) {
88+ if (this != &other) {
89+ compute_input<Task> tmp (other);
90+ swap (*this , tmp);
91+ }
92+ return *this ;
93+ }
94+
95+ template <typename Task>
96+ compute_input<Task>& compute_input<Task>::operator =(compute_input&& other) noexcept {
97+ if (this != &other) {
98+ swap (*this , other);
99+ }
100+ return *this ;
101+ }
102+
76103template <typename Task>
77104const table& compute_input<Task>::get_data() const {
78105 return impl_->data ;
@@ -93,6 +120,11 @@ void compute_input<Task>::set_weights_impl(const table& value) {
93120 impl_->weights = value;
94121}
95122
123+ template <typename Task>
124+ void compute_input<Task>::swap(compute_input<Task>& a, compute_input<Task>& b) noexcept {
125+ std::swap (a.impl_ , b.impl_ );
126+ }
127+
96128using msg = dal::detail::error_messages;
97129
98130template <typename Task>
@@ -353,6 +385,46 @@ template <typename Task>
353385const table& partial_compute_result<Task>::get_partial_sum_squares_centered() const {
354386 return impl_->partial_sum_squares_centered ;
355387}
388+
389+ template <typename Task>
390+ partial_compute_input<Task>::~partial_compute_input () {}
391+
392+ template <typename Task>
393+ partial_compute_input<Task>::partial_compute_input(const partial_compute_input& other)
394+ : compute_input<Task>(other),
395+ prev_ (other.prev_) {}
396+
397+ template <typename Task>
398+ partial_compute_input<Task>::partial_compute_input(partial_compute_input&& other) noexcept
399+ : compute_input<Task>(std::move(other)),
400+ prev_ (std::move(other.prev_)) {}
401+
402+ template <typename Task>
403+ partial_compute_input<Task>& partial_compute_input<Task>::operator =(
404+ const partial_compute_input& other) {
405+ if (this != &other) {
406+ partial_compute_input<Task> tmp (other);
407+ swap (*this , tmp);
408+ }
409+ return *this ;
410+ }
411+
412+ template <typename Task>
413+ partial_compute_input<Task>& partial_compute_input<Task>::operator =(
414+ partial_compute_input&& other) noexcept {
415+ if (this != &other) {
416+ swap (*this , other);
417+ }
418+ return *this ;
419+ }
420+
421+ template <typename Task>
422+ void partial_compute_input<Task>::swap(partial_compute_input<Task>& a,
423+ partial_compute_input<Task>& b) noexcept {
424+ compute_input<Task>::swap (a, b);
425+ std::swap (a.prev_ , b.prev_ );
426+ }
427+
356428template class ONEDAL_EXPORT compute_input<task::compute>;
357429template class ONEDAL_EXPORT compute_result<task::compute>;
358430template class ONEDAL_EXPORT partial_compute_result<task::compute>;
0 commit comments