Skip to content

Commit

Permalink
Add definition for covariance::detail::v1::compute_parameters and com…
Browse files Browse the repository at this point in the history
…pute_parameters_impl classes
  • Loading branch information
Vika-F committed Oct 4, 2023
1 parent 2eee7f8 commit 061af10
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions cpp/oneapi/dal/algo/covariance/compute_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,18 @@

namespace oneapi::dal::covariance {

namespace detail::v1 {

template <typename Task>
class detail::v1::compute_input_impl : public base {
class compute_input_impl : public base {
public:
compute_input_impl() : data(table()){};
compute_input_impl(const table& data) : data(data){};
table data;
};

template <typename Task>
class detail::v1::compute_result_impl : public base {
class compute_result_impl : public base {
public:
table cov_matrix;
table cor_matrix;
Expand All @@ -38,16 +40,39 @@ class detail::v1::compute_result_impl : public base {
};

template <typename Task>
class detail::v1::partial_compute_result_impl : public base {
class partial_compute_result_impl : public base {
public:
table nobs;
table crossproduct;
table sums;
};

template <typename Task>
struct compute_parameters_impl : public base {
std::int64_t cpu_macro_block = 140l;
};

template <typename Task>
compute_parameters<Task>::compute_parameters() : impl_(new compute_parameters_impl<Task>{}) {}

template <typename Task>
std::int64_t compute_parameters<Task>::get_cpu_macro_block() const {
return impl_->cpu_macro_block;
}

template <typename Task>
void compute_parameters<Task>::set_cpu_macro_block_impl(std::int64_t val) {
impl_->cpu_macro_block = val;
}

template class ONEDAL_EXPORT compute_parameters<task::compute>;

} // namespace detail::v1

using detail::v1::compute_input_impl;
using detail::v1::compute_result_impl;
using detail::v1::partial_compute_result_impl;
using detail::v1::compute_parameters;

namespace v1 {

Expand Down

0 comments on commit 061af10

Please sign in to comment.