ginkgo-project / ginkgo

Numerical linear algebra software package
https://ginkgo-project.github.io/
BSD 3-Clause "New" or "Revised" License
414 stars 88 forks source link

Add function to create gko::config::pnode from std::string #1721

Open greole opened 3 weeks ago

greole commented 3 weeks ago

This PR adds a function to create gko::config::pnode directly from a std::string.

Motivation: We would like to use Ginkgo's file config solver within the pyGinkgo bindings. The current implementation of the config solver seems to rely on json files. However, creating temporary files is a nuisance which can cause all kinds issues and is not really necessary in our case. Thus, just passing a std::string to generate a property tree would simplify things a lot.

greole commented 3 weeks ago

need to add a test for it in extensions/test/json_config

sure i'll add one

question for pyGinkgo: do you have any intermediate layer in C or C++ between ginkgo and pyGinkgo?

we use pybind11 , which is c++, to generate any intermediate code to register to python.