gko::batch::log::BatchConvergence#
Batched analogue of gko::log::Convergence:
records the iteration count at which each batch item converged (or
stopped) and the residual norm at that point. Per-item arrays so you
can inspect, for instance, that 30 of 32 items converged in
fewer than 100 iterations and the remaining 2 hit the cap.
-
template<typename ValueType = default_precision>
class BatchConvergence # Inherits from
public gko::log::Logger
Logs the final residuals and iteration counts for a batch solver.
The purpose of this logger is to give simple access to standard data generated by the solver once it has converged.
Note
The final logged residuals are the implicit residuals that have been computed within the solver process. Depending on the solver algorithm, this may be significantly different from the true residual (||b - Ax||).
Public Functions
Public Static Functions
- static inline std::unique_ptr<BatchConvergence> create(
- const mask_type &enabled_events = gko::log::Logger::batch_solver_completed_mask,
Creates a convergence logger. This dynamically allocates the memory, constructs the object and returns an std::unique_ptr to this object. TODO: See if the objects can be pre-allocated beforehand instead of being copied in the
on_<>event- Parameters:
exec – the executor
enabled_events – the events enabled for this logger. By default all events.
- Returns:
an std::unique_ptr to the the constructed object