gko::log#

Observability hooks: loggers that attach to operators, solvers, and executors to surface iteration counts, residual norms, allocation events, and kernel timings. For higher-level guidance on which logger to use see the Logging concept page.

Base interface#

  • Logger — abstract base; every logger overrides one or more on_<event> callbacks.

  • Loggable — mixin that gives an object the ability to carry loggers and broadcast events to them.

  • EnableLogging — CRTP convenience for objects whose own type is the loggable target.

Built-in loggers#

  • Convergence — records iteration count and final residual norm of a solver run; the cheapest way to observe a Krylov solve.

  • Stream — writes events to a std::ostream in a human-readable form; useful for diagnostics during development.

  • Record — captures all events into in-memory Data structs for later inspection or assertions in tests.

  • SolverProgress — emits per-iteration residual / solution snapshots to disk so you can plot a solve’s trajectory offline.

  • ProfilerHook — emits scoped ranges to NVTX / ROCTX / VTune / TAU, so external profilers can attribute time to Ginkgo operations.

  • PerformanceHint — heuristic checks that flag potentially wasteful patterns (unexpected cross-device copies, reallocations, etc.) at runtime.