Skip to content

Commit

Permalink
add missing documentation
Browse files Browse the repository at this point in the history
Co-authored-by: Marcel Koch <marcel.koch@kit.edu>
  • Loading branch information
upsj and MarcelKoch committed Sep 25, 2023
1 parent 4f8e21f commit 9658c88
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions include/ginkgo/core/base/abstract_factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,12 @@ class enable_parameters_type {
*/
std::vector<std::shared_ptr<const log::Logger>> loggers{};

/**
* Deferred factory parameter initialization functions that will be called
* in on(). Their names usually correspond to the variable names in the
* parameter type. They will be provided the executor and the parameter
* object currently being initialized from the generators.
*/
std::unordered_map<std::string,
std::function<void(std::shared_ptr<const Executor> exec,
ConcreteParametersType&)>>
Expand Down Expand Up @@ -318,9 +324,10 @@ public: \
template <typename FactoryType>
class deferred_factory_parameter {
public:
/** Creates an empty deferred factory parameter. */
deferred_factory_parameter() = default;

/** Creates an empty deferred factory parameter. */
/** Creates a deferred factory parameter returning a nullptr. */
deferred_factory_parameter(std::nullptr_t)
{
generator_ = [](std::shared_ptr<const Executor>) { return nullptr; };
Expand Down Expand Up @@ -373,7 +380,10 @@ class deferred_factory_parameter {
};
}

/** Instantiates the deferred parameter into an actual factory. */
/**
* Instantiates the deferred parameter into an actual factory. This will
* throw if the deferred factory parameter is empty.
*/
std::shared_ptr<const FactoryType> on(
std::shared_ptr<const Executor> exec) const
{
Expand Down

0 comments on commit 9658c88

Please sign in to comment.