From b6d19ae0d186a0389b65c41d059f5116e6a58b5e Mon Sep 17 00:00:00 2001 From: Marcel Koch Date: Mon, 3 Feb 2025 10:09:54 +0000 Subject: [PATCH] [wip] apply interface --- .../batched/backend/batch_user_operator.hpp | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 examples/batched-matrix-free-templated/batched/backend/batch_user_operator.hpp diff --git a/examples/batched-matrix-free-templated/batched/backend/batch_user_operator.hpp b/examples/batched-matrix-free-templated/batched/backend/batch_user_operator.hpp new file mode 100644 index 00000000000..bfee86585a6 --- /dev/null +++ b/examples/batched-matrix-free-templated/batched/backend/batch_user_operator.hpp @@ -0,0 +1,30 @@ +// SPDX-FileCopyrightText: 2025 The Ginkgo authors +// +// SPDX-License-Identifier: BSD-3-Clause + +#pragma once + +#include + + +namespace gko::batch_template { + +template +class EnableBatchUserLinOp : public batch::BatchLinOp { +public: + using value_type = typename Concrete::value_type; + + void apply(ptr_param> b, + ptr_param> x) const + { + this->validate_application_parameters(b.get(), x.get()); + auto exec = self()->get_executor(); + this->template log( + log_data_->iter_counts, log_data_->res_norms); + } + +private: + GKO_ENABLE_SELF(Concrete); +}; + +} // namespace gko::batch_template