Skip to content
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
16 changes: 16 additions & 0 deletions .github/.abignore
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,19 @@ drop = yes
[suppress_function]
symbol_name_regexp = _Z+N6oneapi3dal[[:digit:]].*7preview[[:digit:]].*
drop = yes

; deselect oneapi::dal newly added symbols
[suppress_type]
symbol_name_regexp = _Z[ZT]?[ISV]?N6oneapi3dal[[:digit:]].*
change_kind = added-type
drop = yes

[suppress_variable]
symbol_name_regexp = _Z[ZT]?[ISV]?N6oneapi3dal[[:digit:]].*
change_kind = added-variable
drop = yes

[suppress_function]
symbol_name_regexp = _Z[ZT]?[ISV]?N6oneapi3dal[[:digit:]].*
change_kind = added-function
drop = yes
72 changes: 72 additions & 0 deletions cpp/oneapi/dal/algo/basic_statistics/compute_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,33 @@ template <typename Task>
compute_input<Task>::compute_input(const table& data, const table& weights)
: impl_(new compute_input_impl<Task>(data, weights)) {}

template <typename Task>
compute_input<Task>::~compute_input() {}

template <typename Task>
compute_input<Task>::compute_input(const compute_input& other) : impl_(other.impl_) {}

template <typename Task>
compute_input<Task>::compute_input(compute_input&& other) noexcept
: impl_(std::move(other.impl_)) {}

template <typename Task>
compute_input<Task>& compute_input<Task>::operator=(const compute_input& other) {
if (this != &other) {
compute_input<Task> tmp(other);
swap(*this, tmp);
}
return *this;
}

template <typename Task>
compute_input<Task>& compute_input<Task>::operator=(compute_input&& other) noexcept {
if (this != &other) {
swap(*this, other);
}
return *this;
}

template <typename Task>
const table& compute_input<Task>::get_data() const {
return impl_->data;
Expand All @@ -93,6 +120,11 @@ void compute_input<Task>::set_weights_impl(const table& value) {
impl_->weights = value;
}

template <typename Task>
void compute_input<Task>::swap(compute_input<Task>& a, compute_input<Task>& b) noexcept {
std::swap(a.impl_, b.impl_);
}

using msg = dal::detail::error_messages;

template <typename Task>
Expand Down Expand Up @@ -353,6 +385,46 @@ template <typename Task>
const table& partial_compute_result<Task>::get_partial_sum_squares_centered() const {
return impl_->partial_sum_squares_centered;
}

template <typename Task>
partial_compute_input<Task>::~partial_compute_input() {}

template <typename Task>
partial_compute_input<Task>::partial_compute_input(const partial_compute_input& other)
: compute_input<Task>(other),
prev_(other.prev_) {}

template <typename Task>
partial_compute_input<Task>::partial_compute_input(partial_compute_input&& other) noexcept
: compute_input<Task>(std::move(other)),
prev_(std::move(other.prev_)) {}

template <typename Task>
partial_compute_input<Task>& partial_compute_input<Task>::operator=(
const partial_compute_input& other) {
if (this != &other) {
partial_compute_input<Task> tmp(other);
swap(*this, tmp);
}
return *this;
}

template <typename Task>
partial_compute_input<Task>& partial_compute_input<Task>::operator=(
partial_compute_input&& other) noexcept {
if (this != &other) {
swap(*this, other);
}
return *this;
}

template <typename Task>
void partial_compute_input<Task>::swap(partial_compute_input<Task>& a,
partial_compute_input<Task>& b) noexcept {
compute_input<Task>::swap(a, b);
std::swap(a.prev_, b.prev_);
}

template class ONEDAL_EXPORT compute_input<task::compute>;
template class ONEDAL_EXPORT compute_result<task::compute>;
template class ONEDAL_EXPORT partial_compute_result<task::compute>;
Expand Down
26 changes: 26 additions & 0 deletions cpp/oneapi/dal/algo/basic_statistics/compute_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ class compute_input : public base {
compute_input(const table& data);
compute_input(const table& data, const table& weights);

// Do not remove the destructor.
// It is needed to properly handle the visibility of the class in the shared library
// while compiling with -fvisibility=hidden
~compute_input() override;

// Rule of five methods defined here due to the definition of the destructor.
compute_input(const compute_input&);
compute_input(compute_input&&) noexcept;
compute_input& operator=(const compute_input&);
compute_input& operator=(compute_input&&) noexcept;

/// An $n \\times p$ table with the training data, where each row stores one
/// feature vector.
/// @remark default = table{}
Expand All @@ -74,6 +85,7 @@ class compute_input : public base {
protected:
void set_data_impl(const table& data);
void set_weights_impl(const table& weights);
static void swap(compute_input<Task>& a, compute_input<Task>& b) noexcept;

private:
dal::detail::pimpl<detail::compute_input_impl<Task>> impl_;
Expand Down Expand Up @@ -307,6 +319,17 @@ class partial_compute_input : protected compute_input<Task> {
const table& data,
const table& weights);

// Do not remove the destructor.
// It is needed to properly handle the visibility of the class in the shared library
// while compiling with -fvisibility=hidden
~partial_compute_input() override;

// Rule of five methods defined here due to the definition of the destructor.
partial_compute_input(const partial_compute_input&);
partial_compute_input(partial_compute_input&&) noexcept;
partial_compute_input& operator=(const partial_compute_input&);
partial_compute_input& operator=(partial_compute_input&&) noexcept;

const table& get_data() const {
return compute_input<Task>::get_data();
}
Expand Down Expand Up @@ -334,6 +357,9 @@ class partial_compute_input : protected compute_input<Task> {
return *this;
}

protected:
static void swap(partial_compute_input<Task>& a, partial_compute_input<Task>& b) noexcept;

private:
partial_compute_result<Task> prev_;
};
Expand Down
71 changes: 71 additions & 0 deletions cpp/oneapi/dal/algo/covariance/compute_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,33 @@ compute_input<Task>::compute_input() : impl_(new compute_input_impl<Task>{}) {}
template <typename Task>
compute_input<Task>::compute_input(const table& data) : impl_(new compute_input_impl<Task>(data)) {}

template <typename Task>
compute_input<Task>::~compute_input() {}

template <typename Task>
compute_input<Task>::compute_input(const compute_input& other) : impl_(other.impl_) {}

template <typename Task>
compute_input<Task>::compute_input(compute_input&& other) noexcept
: impl_(std::move(other.impl_)) {}

template <typename Task>
compute_input<Task>& compute_input<Task>::operator=(const compute_input& other) {
if (this != &other) {
compute_input<Task> tmp(other);
swap(*this, tmp);
}
return *this;
}

template <typename Task>
compute_input<Task>& compute_input<Task>::operator=(compute_input&& other) noexcept {
if (this != &other) {
swap(*this, other);
}
return *this;
}

template <typename Task>
const table& compute_input<Task>::get_data() const {
return impl_->data;
Expand All @@ -150,6 +177,11 @@ void compute_input<Task>::set_data_impl(const table& value) {
impl_->data = value;
}

template <typename Task>
void compute_input<Task>::swap(compute_input<Task>& a, compute_input<Task>& b) noexcept {
std::swap(a.impl_, b.impl_);
}

template <typename Task>
compute_result<Task>::compute_result() : impl_(new compute_result_impl<Task>{}) {}

Expand Down Expand Up @@ -265,6 +297,45 @@ void partial_compute_result<Task>::set_partial_sum_impl(const table& value) {
impl_->sums = value;
}

template <typename Task>
partial_compute_input<Task>::~partial_compute_input() {}

template <typename Task>
partial_compute_input<Task>::partial_compute_input(const partial_compute_input& other)
: compute_input<Task>(other),
prev_(other.prev_) {}

template <typename Task>
partial_compute_input<Task>::partial_compute_input(partial_compute_input&& other) noexcept
: compute_input<Task>(std::move(other)),
prev_(std::move(other.prev_)) {}

template <typename Task>
partial_compute_input<Task>& partial_compute_input<Task>::operator=(
const partial_compute_input& other) {
if (this != &other) {
partial_compute_input<Task> tmp(other);
swap(*this, tmp);
}
return *this;
}

template <typename Task>
partial_compute_input<Task>& partial_compute_input<Task>::operator=(
partial_compute_input&& other) noexcept {
if (this != &other) {
swap(*this, other);
}
return *this;
}

template <typename Task>
void partial_compute_input<Task>::swap(partial_compute_input<Task>& a,
partial_compute_input<Task>& b) noexcept {
compute_input<Task>::swap(a, b);
std::swap(a.prev_, b.prev_);
}

template class ONEDAL_EXPORT compute_input<task::compute>;
template class ONEDAL_EXPORT compute_result<task::compute>;
template class ONEDAL_EXPORT partial_compute_result<task::compute>;
Expand Down
28 changes: 28 additions & 0 deletions cpp/oneapi/dal/algo/covariance/compute_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ class compute_input : public base {
/// property value
compute_input(const table& data);

// Do not remove the destructor.
// It is needed to properly handle the visibility of the class in the shared library
// while compiling with -fvisibility=hidden
~compute_input() override;

// Rule of five methods defined here due to the definition of the destructor.
compute_input(const compute_input&);
compute_input(compute_input&&) noexcept;
compute_input& operator=(const compute_input&);
compute_input& operator=(compute_input&&) noexcept;

/// An $n \\times p$ table with the training data, where each row stores one
/// feature vector.
/// @remark default = table{}
Expand All @@ -130,6 +141,7 @@ class compute_input : public base {

protected:
void set_data_impl(const table& value);
static void swap(compute_input<Task>& a, compute_input<Task>& b) noexcept;

private:
dal::detail::pimpl<detail::compute_input_impl<Task>> impl_;
Expand Down Expand Up @@ -249,6 +261,18 @@ class partial_compute_input : protected compute_input<Task> {

partial_compute_input(const partial_compute_result<Task>& prev, const table& data);

// Do not remove the destructor.
// It is needed to properly handle the visibility of the class in the shared library
// while compiling with -fvisibility=hidden
~partial_compute_input() override;

// Rule of five methods defined here due to the definition of the destructor.
partial_compute_input(const partial_compute_input&);
partial_compute_input(partial_compute_input&&) noexcept;
partial_compute_input& operator=(const partial_compute_input&);
partial_compute_input& operator=(partial_compute_input&&) noexcept;

/// A $n \\times p$ table with the portion of the training data, where each row stores one feature vector.
const table& get_data() const {
return compute_input<Task>::get_data();
}
Expand All @@ -258,6 +282,7 @@ class partial_compute_input : protected compute_input<Task> {
return *this;
}

/// Partial result from the previous step of the online covariance computation.
const partial_compute_result<Task>& get_prev() const {
return prev_;
}
Expand All @@ -267,6 +292,9 @@ class partial_compute_input : protected compute_input<Task> {
return *this;
}

protected:
static void swap(partial_compute_input<Task>& a, partial_compute_input<Task>& b) noexcept;

private:
partial_compute_result<Task> prev_;
};
Expand Down
32 changes: 32 additions & 0 deletions cpp/oneapi/dal/algo/dbscan/compute_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,33 @@ template <typename Task>
compute_input<Task>::compute_input(const table& data, const table& weights)
: impl_(new compute_input_impl<Task>(data, weights)) {}

template <typename Task>
compute_input<Task>::~compute_input() {}

template <typename Task>
compute_input<Task>::compute_input(const compute_input& other) : impl_(other.impl_) {}

template <typename Task>
compute_input<Task>::compute_input(compute_input&& other) noexcept
: impl_(std::move(other.impl_)) {}

template <typename Task>
compute_input<Task>& compute_input<Task>::operator=(const compute_input& other) {
if (this != &other) {
compute_input<Task> tmp(other);
swap(*this, tmp);
}
return *this;
}

template <typename Task>
compute_input<Task>& compute_input<Task>::operator=(compute_input&& other) noexcept {
if (this != &other) {
swap(*this, other);
}
return *this;
}

template <typename Task>
const table& compute_input<Task>::get_data() const {
return impl_->data;
Expand All @@ -71,6 +98,11 @@ void compute_input<Task>::set_weights_impl(const table& value) {
impl_->weights = value;
}

template <typename Task>
void compute_input<Task>::swap(compute_input<Task>& a, compute_input<Task>& b) noexcept {
std::swap(a.impl_, b.impl_);
}

template <typename Task>
compute_result<Task>::compute_result() : impl_(new compute_result_impl<Task>{}) {}

Expand Down
12 changes: 12 additions & 0 deletions cpp/oneapi/dal/algo/dbscan/compute_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ class compute_input : public base {
/// :literal:`weights`
compute_input(const table& data = {}, const table& weights = {});

// Do not remove the destructor.
// It is needed to properly handle the visibility of the class in the shared library
// while compiling with -fvisibility=hidden
~compute_input() override;

// Rule of five methods defined here due to the definition of the destructor.
compute_input(const compute_input&);
compute_input(compute_input&&) noexcept;
compute_input& operator=(const compute_input&);
compute_input& operator=(compute_input&&) noexcept;

/// An $n \\times p$ table with the data to be clustered, where each row
/// stores one feature vector.
const table& get_data() const;
Expand All @@ -70,6 +81,7 @@ class compute_input : public base {
protected:
void set_data_impl(const table& data);
void set_weights_impl(const table& weights);
static void swap(compute_input<Task>& a, compute_input<Task>& b) noexcept;

private:
dal::detail::pimpl<detail::compute_input_impl<Task>> impl_;
Expand Down
Loading
Loading