5#ifndef GKO_PUBLIC_CORE_LOG_BATCH_LOGGER_HPP_
6#define GKO_PUBLIC_CORE_LOG_BATCH_LOGGER_HPP_
12#include <ginkgo/core/base/batch_multi_vector.hpp>
13#include <ginkgo/core/base/types.hpp>
14#include <ginkgo/core/log/logger.hpp>
33template <
typename ValueType>
34struct log_data final {
36 using index_type = int;
38 log_data(std::shared_ptr<const Executor> exec,
size_type num_batch_items);
40 log_data(std::shared_ptr<const Executor> exec,
size_type num_batch_items,
70template <
typename ValueType = default_precision>
74 using index_type = int;
75 using mask_type = gko::log::Logger::mask_type;
77 void on_batch_solver_completed(
93 static std::unique_ptr<BatchConvergence>
create(
94 const mask_type& enabled_events =
95 gko::log::Logger::batch_solver_completed_mask)
97 return std::unique_ptr<BatchConvergence>(
106 return iteration_count_;
114 return residual_norm_;
119 gko::log::Logger::batch_solver_completed_mask)
120 :
gko::log::Logger(enabled_events)
An array is a container which encapsulates fixed-sized arrays, stored on the Executor tied to the arr...
Definition logger.hpp:25
Logs the final residuals and iteration counts for a batch solver.
Definition batch_logger.hpp:71
const array< index_type > & get_num_iterations() const noexcept
Definition batch_logger.hpp:104
const array< real_type > & get_residual_norm() const noexcept
Definition batch_logger.hpp:112
static std::unique_ptr< BatchConvergence > create(const mask_type &enabled_events=gko::log::Logger::batch_solver_completed_mask)
Creates a convergence logger.
Definition batch_logger.hpp:93
The Ginkgo namespace.
Definition abstract_factory.hpp:20
typename detail::remove_complex_s< T >::type remove_complex
Obtain the type which removed the complex of complex/scalar type or the template parameter of class b...
Definition math.hpp:326
std::size_t size_type
Integral type used for allocation quantities.
Definition types.hpp:86