-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3b430f
commit b6d19ae
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
examples/batched-matrix-free-templated/batched/backend/batch_user_operator.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// SPDX-FileCopyrightText: 2025 The Ginkgo authors | ||
// | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
#pragma once | ||
|
||
#include <ginkgo/core/base/batch_lin_op.hpp> | ||
|
||
|
||
namespace gko::batch_template { | ||
|
||
template <typename Concrete> | ||
class EnableBatchUserLinOp : public batch::BatchLinOp { | ||
public: | ||
using value_type = typename Concrete::value_type; | ||
|
||
void apply(ptr_param<const batch::MultiVector<value_type>> b, | ||
ptr_param<batch::MultiVector<value_type>> x) const | ||
{ | ||
this->validate_application_parameters(b.get(), x.get()); | ||
auto exec = self()->get_executor(); | ||
this->template log<log::Logger::batch_solver_completed>( | ||
log_data_->iter_counts, log_data_->res_norms); | ||
} | ||
|
||
private: | ||
GKO_ENABLE_SELF(Concrete); | ||
}; | ||
|
||
} // namespace gko::batch_template |