Ginkgo  Generated from pipelines/1554403166 branch based on develop. Ginkgo version 1.9.0
A numerical linear algebra library targeting many-core architectures
solver_progress.hpp
1 // SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors
2 //
3 // SPDX-License-Identifier: BSD-3-Clause
4 
5 #ifndef GKO_PUBLIC_CORE_LOG_SOLVER_PROGRESS_HPP_
6 #define GKO_PUBLIC_CORE_LOG_SOLVER_PROGRESS_HPP_
7 
8 
9 #include <iosfwd>
10 #include <memory>
11 
12 #include <ginkgo/core/log/logger.hpp>
13 
14 
15 namespace gko {
16 namespace log {
17 
18 
24 class SolverProgress : public Logger {
25 public:
36  static std::shared_ptr<SolverProgress> create_scalar_table_writer(
37  std::ostream& output, int precision = 6, int column_width = 12);
38 
39 
50  static std::shared_ptr<SolverProgress> create_scalar_csv_writer(
51  std::ostream& output, int precision = 6, char separator = ',');
52 
53 
68  static std::shared_ptr<SolverProgress> create_vector_storage(
69  std::string output_file_prefix = "solver_", bool binary = false);
70 };
71 
72 
73 } // namespace log
74 } // namespace gko
75 
76 
77 #endif // GKO_PUBLIC_CORE_LOG_SOLVER_PROGRESS_HPP_
gko
The Ginkgo namespace.
Definition: abstract_factory.hpp:20
gko::log::SolverProgress::create_scalar_table_writer
static std::shared_ptr< SolverProgress > create_scalar_table_writer(std::ostream &output, int precision=6, int column_width=12)
Creates a logger printing the value for all scalar values in the solver after each iteration in an AS...
gko::log::SolverProgress::create_vector_storage
static std::shared_ptr< SolverProgress > create_vector_storage(std::string output_file_prefix="solver_", bool binary=false)
Creates a logger storing all vectors and scalar values in the solver after each iteration on disk.
gko::log::SolverProgress
This Logger outputs the value of all scalar values (and potentially vectors) stored internally by the...
Definition: solver_progress.hpp:24
gko::log::Logger
Definition: logger.hpp:75
gko::log::SolverProgress::create_scalar_csv_writer
static std::shared_ptr< SolverProgress > create_scalar_csv_writer(std::ostream &output, int precision=6, char separator=',')
Creates a logger printing the value for all scalar values in the solver after each iteration in a CSV...