 |
Ginkgo
Generated from pipelines/2662685947 branch based on develop. Ginkgo version 2.0.0
A numerical linear algebra library targeting many-core architectures
|
5 #ifndef GKO_PUBLIC_EXTENSIONS_CUDA_SOLVER_CUDSS_HPP_
6 #define GKO_PUBLIC_EXTENSIONS_CUDA_SOLVER_CUDSS_HPP_
11 #include <type_traits>
13 #include <ginkgo/core/base/lin_op.hpp>
14 #include <ginkgo/core/base/types.hpp>
15 #include <ginkgo/core/config/config.hpp>
16 #include <ginkgo/core/config/registry.hpp>
29 struct is_cudss_supported_value_type : std::false_type {};
32 struct is_cudss_supported_value_type<float> : std::true_type {};
34 struct is_cudss_supported_value_type<double> : std::true_type {};
36 struct is_cudss_supported_value_type<std::complex<float>> : std::true_type {};
38 struct is_cudss_supported_value_type<std::complex<double>> : std::true_type {};
44 #define GKO_EXT_CUDSS_ASSERT_SUPPORTED_VALUE_TYPE \
46 ::gko::ext::cuda::solver::detail::is_cudss_supported_value_type< \
48 "cuDSS only supports float, double, std::complex<float>, and " \
49 "std::complex<double> value types")
66 template <
typename ValueType,
typename IndexType =
int32>
68 GKO_EXT_CUDSS_ASSERT_SUPPORTED_VALUE_TYPE;
69 GKO_ASSERT_SUPPORTED_INDEX_TYPE;
72 using value_type = ValueType;
73 using index_type = IndexType;
136 static parameters_type
parse(
139 config::make_type_descriptor<ValueType, IndexType>());
175 void apply_impl(const
LinOp* b,
LinOp* x) const override;
178 LinOp* x) const override;
184 std::shared_ptr<const
LinOp> system_matrix_;
185 std::shared_ptr<state> state_;
195 #endif // GKO_PUBLIC_EXTENSIONS_CUDA_SOLVER_CUDSS_HPP_
Definition: cudss.hpp:130
bool hybrid_memory
Enable hybrid CPU+GPU memory.
Definition: cudss.hpp:128
pnode describes a tree of properties.
Definition: property_tree.hpp:28
static parameters_type parse(const config::pnode &config, const config::registry &context, const config::type_descriptor &td_for_child=config::make_type_descriptor< ValueType, IndexType >())
Parse parameters from a configuration property tree.
Definition: lin_op.hpp:117
A direct solver using NVIDIA's cuDSS library.
Definition: cudss.hpp:67
int reordering_alg
Reordering algorithm.
Definition: cudss.hpp:118
static config::configuration_map get_config_map()
Returns a configuration_map for registering this type with a config::registry.
#define GKO_FACTORY_PARAMETER_SCALAR(_name, _default)
Creates a scalar factory parameter in the factory parameters structure.
Definition: abstract_factory.hpp:437
int matrix_type
cuDSS matrix type, mapping to cudssMatrixType_t:
Definition: cudss.hpp:97
This class describes the value and index types to be used when building a Ginkgo type from a configur...
Definition: type_descriptor.hpp:39
The Ginkgo namespace.
Definition: abstract_factory.hpp:20
void refactorize(std::shared_ptr< const LinOp > new_matrix)
Re-run the numeric factorization with updated matrix values.
#define GKO_ENABLE_LIN_OP_FACTORY(_lin_op, _parameters_name, _factory_name)
This macro will generate a default implementation of a LinOpFactory for the LinOp subclass it is defi...
Definition: lin_op.hpp:900
bool hybrid_execute
Enable hybrid host/device execution.
Definition: cudss.hpp:123
int matrix_view
cuDSS matrix view, mapping to cudssMatrixViewType_t:
Definition: cudss.hpp:113
Cudss(const Cudss &)
Creates a copy of the solver (shares factorization state).
This class stores additional context for creating Ginkgo objects from configuration files.
Definition: registry.hpp:167
#define GKO_ENABLE_BUILD_METHOD(_factory_name)
Defines a build method for the factory, simplifying its construction by removing the repetitive typin...
Definition: abstract_factory.hpp:386
The first step in using the Ginkgo library consists of creating an executor.
Definition: executor.hpp:616
The enable_parameters_type mixin is used to create a base implementation of the factory parameters st...
Definition: abstract_factory.hpp:203