einsums::compute_graph::FactorizationRegistry#
Note
Generated from the C++ headers by apiary --emit-cpp-docs-json.
Defined in header Einsums/ComputeGraph/Factorization.hpp.
-
class FactorizationRegistry#
The providers a process knows about.
Process-global by default, in the manner of
SpaceRegistry, because a provider is a capability of the build rather than of one graph. Registration is a startup act; a test that adds one is expected to remove it, andclearexists for exactly that.Added in version 2.0.0.
-
FactorizationRegistry() = default#
Register a provider.
- Parameters:
provider – The provider. Held by shared_ptr and must outlive nothing in particular: the registry owns a reference.
- Throws:
std::invalid_argument – When a provider of the same name is already registered, naming it. Two providers under one name would make which of them ran depend on registration order, and a pass whose result depends on that is not reproducible.
-
std::vector<std::shared_ptr<FactorizationProvider>> for_tag(std::string_view tag) const#
Every provider claiming
tag, in registration order.- Parameters:
tag – A provenance tag name.
- Returns:
The providers. Empty when nothing claims it.
-
bool claims(std::string_view tag) const#
Whether any provider claims
tag.- Parameters:
tag – A provenance tag name.
- Returns:
True when at least one does.
-
bool remove(std::string_view name)#
Remove a provider by name.
- Parameters:
name – The provider’s
FactorizationProvider::name.- Returns:
True when one was removed.
-
void clear()#
Forget every provider.
-
std::size_t size() const#
How many providers are registered.
- Returns:
The count.
-
FactorizationRegistry() = default#