diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index e15c2307ef7..72e6ddfe76e 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -20,6 +20,7 @@ target_sources(ginkgo config/config.cpp config/property_tree.cpp config/stop_config.cpp + config/solver_config.cpp distributed/partition.cpp factorization/cholesky.cpp factorization/elimination_forest.cpp diff --git a/core/config/config.cpp b/core/config/config.cpp index 9f9bb3e2caf..f417f01c484 100644 --- a/core/config/config.cpp +++ b/core/config/config.cpp @@ -18,7 +18,11 @@ namespace config { buildfromconfig_map generate_config_map() { - return {{"Cg", build_from_config}}; + return {{"Cg", build_from_config}, + {"Bicg", build_from_config}, + {"Bicgstab", build_from_config}, + {"Cgs", build_from_config}, + {"Fcg", build_from_config}}; } diff --git a/core/config/solver_config.cpp b/core/config/solver_config.cpp new file mode 100644 index 00000000000..2294c43e574 --- /dev/null +++ b/core/config/solver_config.cpp @@ -0,0 +1,130 @@ +/************************************************************* +Copyright (c) 2017-2023, the Ginkgo authors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include + + +#include "core/config/config.hpp" +#include "core/config/dispatch.hpp" +#include "core/config/solver_config.hpp" + +namespace gko { +namespace config { + + +// It can also be directly in solver (or in proteced part) if we also allow +// the executor as input there. +template