 |
Ginkgo
Generated from pipelines/3133041809 branch based on develop. Ginkgo version 2.0.0
A numerical linear algebra library targeting many-core architectures
|
5 #ifndef GKO_PUBLIC_CORE_LOG_STREAM_HPP_
6 #define GKO_PUBLIC_CORE_LOG_STREAM_HPP_
12 #include <ginkgo/core/log/logger.hpp>
29 template <
typename ValueType = default_precision>
31 GKO_ASSERT_SUPPORTED_VALUE_TYPE;
36 const size_type& num_bytes)
const override;
40 const uintptr& location)
const override;
43 const uintptr& location)
const override;
46 const uintptr& location)
const override;
51 const size_type& num_bytes)
const override;
56 const size_type& num_bytes)
const override;
111 const LinOp* input)
const override;
115 const LinOp* output)
const override;
123 const uint8& stopping_id,
124 const bool& set_finalized)
const override;
132 const bool& one_changed,
const bool& all_converged)
const override;
143 bool stopped)
const override;
146 "Please use the version with the additional stopping "
155 "Please use the version with the additional stopping "
178 GKO_DEPRECATED(
"use three-parameter create")
180 std::shared_ptr<const
Executor> exec,
182 std::ostream& os = std::cout,
bool verbose = false)
184 return std::unique_ptr<Stream>(
new Stream(enabled_events, os, verbose));
203 std::ostream& os = std::cerr,
bool verbose =
false)
205 return std::unique_ptr<Stream>(
new Stream(enabled_events, os, verbose));
220 GKO_DEPRECATED(
"use three-parameter constructor")
224 std::ostream& os = std::cerr,
bool verbose = false)
225 :
Stream(enabled_events, os, verbose)
241 std::ostream& os = std::cerr,
bool verbose =
false)
242 : Logger(enabled_events), os_(&os), verbose_(verbose)
248 static constexpr
const char* prefix_ =
"[LOG] >>> ";
257 #endif // GKO_PUBLIC_CORE_LOG_STREAM_HPP_
std::uint8_t uint8
8-bit unsigned integral type.
Definition: types.hpp:131
void on_linop_advanced_apply_started(const LinOp *A, const AbstractMultiVector *alpha, const AbstractMultiVector *b, const AbstractMultiVector *beta, const AbstractMultiVector *x) const override
LinOp's advanced apply started event.
void on_allocation_started(const Executor *exec, const size_type &num_bytes) const override
Executor's allocation started event.
static std::unique_ptr< Stream > create(std::shared_ptr< const Executor > exec, const Logger::mask_type &enabled_events=Logger::all_events_mask, std::ostream &os=std::cout, bool verbose=false)
Creates a Stream logger.
Definition: stream.hpp:179
Stream is a Logger which logs every event to a stream.
Definition: stream.hpp:30
Definition: lin_op.hpp:163
A PolymorphicObject is the abstract base for all "heavy" objects in Ginkgo that behave polymorphicall...
Definition: polymorphic_object.hpp:46
void on_polymorphic_object_move_completed(const Executor *exec, const PolymorphicObject *from, const PolymorphicObject *to) const override
PolymorphicObject's move completed event.
void on_allocation_completed(const Executor *exec, const size_type &num_bytes, const uintptr &location) const override
Executor's allocation completed event.
void on_iteration_complete(const LinOp *solver, const AbstractMultiVector *b, const AbstractMultiVector *x, const size_type &num_iterations, const AbstractMultiVector *residual, const AbstractMultiVector *residual_norm, const AbstractMultiVector *implicit_resnorm_sq, const array< stopping_status > *status, bool stopped) const override
Register the iteration_complete event which logs every completed iterations.
Stopping criterion events.
std::uintptr_t uintptr
Unsigned integer type capable of holding a pointer to void.
Definition: types.hpp:154
void on_copy_completed(const Executor *from, const Executor *to, const uintptr &location_from, const uintptr &location_to, const size_type &num_bytes) const override
Executor's copy completed event.
void on_polymorphic_object_create_completed(const Executor *exec, const PolymorphicObject *input, const PolymorphicObject *output) const override
PolymorphicObject's create completed event.
void on_polymorphic_object_create_started(const Executor *, const PolymorphicObject *po) const override
PolymorphicObject's create started event.
std::size_t size_type
Integral type used for allocation quantities.
Definition: types.hpp:102
void on_copy_started(const Executor *from, const Executor *to, const uintptr &location_from, const uintptr &location_to, const size_type &num_bytes) const override
Executor's copy started event.
void on_linop_advanced_apply_completed(const LinOp *A, const AbstractMultiVector *alpha, const AbstractMultiVector *b, const AbstractMultiVector *beta, const AbstractMultiVector *x) const override
LinOp's advanced apply completed event.
void on_criterion_check_started(const stop::Criterion *criterion, const size_type &num_iterations, const AbstractMultiVector *residual, const AbstractMultiVector *residual_norm, const AbstractMultiVector *solution, const uint8 &stopping_id, const bool &set_finalized) const override
stop::Criterion's check started event.
The Ginkgo namespace.
Definition: abstract_factory.hpp:19
An array is a container which encapsulates fixed-sized arrays, stored on the Executor tied to the arr...
Definition: array.hpp:26
static constexpr mask_type all_events_mask
Bitset Mask which activates all events.
Definition: logger.hpp:90
void on_criterion_check_completed(const stop::Criterion *criterion, const size_type &num_iterations, const AbstractMultiVector *residual, const AbstractMultiVector *residual_norm, const AbstractMultiVector *solution, const uint8 &stopping_id, const bool &set_finalized, const array< stopping_status > *status, const bool &one_changed, const bool &all_converged) const override
stop::Criterion's check completed event.
void on_operation_launched(const Executor *exec, const Operation *operation) const override
Executor's operation launched event (method run).
void on_free_started(const Executor *exec, const uintptr &location) const override
Executor's free started event.
void on_linop_apply_started(const LinOp *A, const AbstractMultiVector *b, const AbstractMultiVector *x) const override
LinOp's apply started event.
static std::unique_ptr< Stream > create(const Logger::mask_type &enabled_events=Logger::all_events_mask, std::ostream &os=std::cerr, bool verbose=false)
Creates a Stream logger.
Definition: stream.hpp:201
Definition: logger.hpp:77
void on_free_completed(const Executor *exec, const uintptr &location) const override
Executor's free completed event.
void on_polymorphic_object_deleted(const Executor *exec, const PolymorphicObject *po) const override
PolymorphicObject's deleted event.
The Criterion class is a base class for all stopping criteria.
Definition: criterion.hpp:36
void on_polymorphic_object_move_started(const Executor *exec, const PolymorphicObject *from, const PolymorphicObject *to) const override
PolymorphicObject's move started event.
void on_polymorphic_object_copy_completed(const Executor *exec, const PolymorphicObject *from, const PolymorphicObject *to) const override
PolymorphicObject's copy completed event.
void on_polymorphic_object_copy_started(const Executor *exec, const PolymorphicObject *from, const PolymorphicObject *to) const override
PolymorphicObject's copy started event.
void on_operation_completed(const Executor *exec, const Operation *operation) const override
Executor's operation completed event (method run).
Kernel execution and data movement.
void on_linop_apply_completed(const LinOp *A, const AbstractMultiVector *b, const AbstractMultiVector *x) const override
LinOp's apply completed event.
The first step in using the Ginkgo library consists of creating an executor.
Definition: executor.hpp:617
void on_linop_factory_generate_started(const LinOpFactory *factory, const LinOp *input) const override
LinOp Factory's generate started event.
void on_linop_factory_generate_completed(const LinOpFactory *factory, const LinOp *input, const LinOp *output) const override
LinOp Factory's generate completed event.
A LinOpFactory represents a higher order mapping which transforms one linear operator into another.
Definition: lin_op.hpp:447
Abstract interface class for (multi-)vector types.
Definition: multivector.hpp:81
Operations can be used to define functionalities whose implementations differ among devices.
Definition: executor.hpp:257