|
| 1 | +// #ifndef _SUNDOMEIGEST_H |
| 2 | +// |
| 3 | +// #ifdef __cplusplus |
| 4 | +// #endif |
| 5 | +// |
| 6 | + |
| 7 | +auto pyClassSUNDomEigEstimator_Ops_ = |
| 8 | + nb::class_<SUNDomEigEstimator_Ops_>(m, "SUNDomEigEstimator_Ops_", "") |
| 9 | + .def(nb::init<>()) // implicit default constructor |
| 10 | + ; |
| 11 | + |
| 12 | +auto pyClassSUNDomEigEstimator_ = |
| 13 | + nb::class_<SUNDomEigEstimator_>(m, "SUNDomEigEstimator_", "") |
| 14 | + .def(nb::init<>()) // implicit default constructor |
| 15 | + ; |
| 16 | + |
| 17 | +m.def("SUNDomEigEstimator_SetMaxIters", SUNDomEigEstimator_SetMaxIters, |
| 18 | + nb::arg("DEE"), nb::arg("max_iters")); |
| 19 | + |
| 20 | +m.def("SUNDomEigEstimator_SetNumPreprocessIters", |
| 21 | + SUNDomEigEstimator_SetNumPreprocessIters, nb::arg("DEE"), |
| 22 | + nb::arg("num_iters")); |
| 23 | + |
| 24 | +m.def("SUNDomEigEstimator_SetRelTol", SUNDomEigEstimator_SetRelTol, |
| 25 | + nb::arg("DEE"), nb::arg("tol")); |
| 26 | + |
| 27 | +m.def("SUNDomEigEstimator_SetInitialGuess", SUNDomEigEstimator_SetInitialGuess, |
| 28 | + nb::arg("DEE"), nb::arg("q")); |
| 29 | + |
| 30 | +m.def("SUNDomEigEstimator_Initialize", SUNDomEigEstimator_Initialize, |
| 31 | + nb::arg("DEE")); |
| 32 | + |
| 33 | +m.def( |
| 34 | + "SUNDomEigEstimator_Estimate", |
| 35 | + [](SUNDomEigEstimator DEE, double lambdaR, |
| 36 | + double lambdaI) -> std::tuple<SUNErrCode, double, double> |
| 37 | + { |
| 38 | + auto SUNDomEigEstimator_Estimate_adapt_modifiable_immutable_to_return = |
| 39 | + [](SUNDomEigEstimator DEE, double lambdaR, |
| 40 | + double lambdaI) -> std::tuple<SUNErrCode, double, double> |
| 41 | + { |
| 42 | + double* lambdaR_adapt_modifiable = &lambdaR; |
| 43 | + double* lambdaI_adapt_modifiable = &lambdaI; |
| 44 | + |
| 45 | + SUNErrCode r = SUNDomEigEstimator_Estimate(DEE, lambdaR_adapt_modifiable, |
| 46 | + lambdaI_adapt_modifiable); |
| 47 | + return std::make_tuple(r, lambdaR, lambdaI); |
| 48 | + }; |
| 49 | + |
| 50 | + return SUNDomEigEstimator_Estimate_adapt_modifiable_immutable_to_return(DEE, |
| 51 | + lambdaR, |
| 52 | + lambdaI); |
| 53 | + }, |
| 54 | + nb::arg("DEE"), nb::arg("lambdaR"), nb::arg("lambdaI")); |
| 55 | + |
| 56 | +m.def( |
| 57 | + "SUNDomEigEstimator_GetRes", |
| 58 | + [](SUNDomEigEstimator DEE, double res) -> std::tuple<SUNErrCode, double> |
| 59 | + { |
| 60 | + auto SUNDomEigEstimator_GetRes_adapt_modifiable_immutable_to_return = |
| 61 | + [](SUNDomEigEstimator DEE, double res) -> std::tuple<SUNErrCode, double> |
| 62 | + { |
| 63 | + double* res_adapt_modifiable = &res; |
| 64 | + |
| 65 | + SUNErrCode r = SUNDomEigEstimator_GetRes(DEE, res_adapt_modifiable); |
| 66 | + return std::make_tuple(r, res); |
| 67 | + }; |
| 68 | + |
| 69 | + return SUNDomEigEstimator_GetRes_adapt_modifiable_immutable_to_return(DEE, |
| 70 | + res); |
| 71 | + }, |
| 72 | + nb::arg("DEE"), nb::arg("res")); |
| 73 | + |
| 74 | +m.def( |
| 75 | + "SUNDomEigEstimator_GetNumIters", |
| 76 | + [](SUNDomEigEstimator DEE, long num_iters) -> std::tuple<SUNErrCode, long> |
| 77 | + { |
| 78 | + auto SUNDomEigEstimator_GetNumIters_adapt_modifiable_immutable_to_return = |
| 79 | + [](SUNDomEigEstimator DEE, long num_iters) -> std::tuple<SUNErrCode, long> |
| 80 | + { |
| 81 | + long* num_iters_adapt_modifiable = &num_iters; |
| 82 | + |
| 83 | + SUNErrCode r = SUNDomEigEstimator_GetNumIters(DEE, |
| 84 | + num_iters_adapt_modifiable); |
| 85 | + return std::make_tuple(r, num_iters); |
| 86 | + }; |
| 87 | + |
| 88 | + return SUNDomEigEstimator_GetNumIters_adapt_modifiable_immutable_to_return(DEE, |
| 89 | + num_iters); |
| 90 | + }, |
| 91 | + nb::arg("DEE"), nb::arg("num_iters")); |
| 92 | + |
| 93 | +m.def( |
| 94 | + "SUNDomEigEstimator_GetNumATimesCalls", |
| 95 | + [](SUNDomEigEstimator DEE, long num_ATimes) -> std::tuple<SUNErrCode, long> |
| 96 | + { |
| 97 | + auto SUNDomEigEstimator_GetNumATimesCalls_adapt_modifiable_immutable_to_return = |
| 98 | + [](SUNDomEigEstimator DEE, long num_ATimes) -> std::tuple<SUNErrCode, long> |
| 99 | + { |
| 100 | + long* num_ATimes_adapt_modifiable = &num_ATimes; |
| 101 | + |
| 102 | + SUNErrCode r = |
| 103 | + SUNDomEigEstimator_GetNumATimesCalls(DEE, num_ATimes_adapt_modifiable); |
| 104 | + return std::make_tuple(r, num_ATimes); |
| 105 | + }; |
| 106 | + |
| 107 | + return SUNDomEigEstimator_GetNumATimesCalls_adapt_modifiable_immutable_to_return(DEE, |
| 108 | + num_ATimes); |
| 109 | + }, |
| 110 | + nb::arg("DEE"), nb::arg("num_ATimes")); |
| 111 | + |
| 112 | +m.def("SUNDomEigEstimator_Write", SUNDomEigEstimator_Write, nb::arg("DEE"), |
| 113 | + nb::arg("outfile")); |
| 114 | +// #ifdef __cplusplus |
| 115 | +// |
| 116 | +// #endif |
| 117 | +// |
| 118 | +// #endif |
| 119 | +// |
0 commit comments