33 #ifndef GKO_CORE_STOP_TIME_HPP_ 34 #define GKO_CORE_STOP_TIME_HPP_ 37 #include <ginkgo/core/stop/criterion.hpp> 56 using clock = std::chrono::system_clock;
64 time_limit, std::chrono::seconds(10));
70 bool check_impl(
uint8 stoppingId,
bool setFinalized,
72 const Updater &)
override;
74 explicit Time(std::shared_ptr<const gko::Executor> exec)
81 time_limit_{std::chrono::duration<double>(
92 std::chrono::duration<double> time_limit_{};
93 clock::time_point start_{};
101 #endif // GKO_CORE_STOP_TIME_HPP_
The Time class is a stopping criterion which stops the iteration process after a certain amout of tim...
Definition: time.hpp:52
const parameters_type & get_parameters() const noexcept
Returns the parameters of the factory.
Definition: abstract_factory.hpp:175
This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a ne...
Definition: polymorphic_object.hpp:505
#define GKO_FACTORY_PARAMETER(_name,...)
Creates a factory parameter in the factory parameters structure.
Definition: lin_op.hpp:751
The Ginkgo namespace.
Definition: abstract_factory.hpp:45
#define GKO_ENABLE_CRITERION_FACTORY(_criterion, _parameters_name, _factory_name)
This macro will generate a default implementation of a CriterionFactory for the Criterion subclass it...
Definition: criterion.hpp:280
std::uint8_t uint8
8-bit unsigned integral type.
Definition: types.hpp:123
An Array is a container which encapsulates fixed-sized arrays, stored on the Executor tied to the Arr...
Definition: array.hpp:63
#define GKO_CREATE_FACTORY_PARAMETERS(_parameters_name, _factory_name)
This Macro will generate a new type containing the parameters for the factory _factory_name.
Definition: lin_op.hpp:611
#define GKO_ENABLE_BUILD_METHOD(_factory_name)
Defines a build method for the factory, simplifying its construction by removing the repetitive typin...
Definition: lin_op.hpp:730
std::chrono::nanoseconds time_limit
Amount of seconds to wait.
Definition: time.hpp:64
This struct is used to pass parameters to the EnableDefaultCriterionFactoryCriterionFactory::generate...
Definition: criterion.hpp:216