| 1771 | |
| 1772 | template<typename typ> |
| 1773 | static void |
| 1774 | solve1(char **args, npy_intp const *dimensions, npy_intp const *steps, |
| 1775 | void *NPY_UNUSED(func)) |
| 1776 | { |
| 1777 | using ftyp = fortran_type_t<typ>; |
| 1778 | GESV_PARAMS_t<ftyp> params; |
| 1779 | int error_occurred = get_fp_invalid_and_clear(); |
| 1780 | fortran_int n; |
| 1781 | INIT_OUTER_LOOP_3 |
| 1782 | |
| 1783 | n = (fortran_int)dimensions[0]; |
| 1784 | if (init_gesv(¶ms, n, 1)) { |
| 1785 | LINEARIZE_DATA_t a_in, b_in, r_out; |
| 1786 | init_linearize_data(&a_in, n, n, steps[1], steps[0]); |
| 1787 | init_linearize_data(&b_in, 1, n, 1, steps[2]); |
| 1788 | init_linearize_data(&r_out, 1, n, 1, steps[3]); |
| 1789 | |
| 1790 | BEGIN_OUTER_LOOP_3 |
| 1791 | int not_ok; |
| 1792 | linearize_matrix((typ*)params.A, (typ*)args[0], &a_in); |
| 1793 | linearize_matrix((typ*)params.B, (typ*)args[1], &b_in); |
| 1794 | not_ok = call_gesv(¶ms); |
| 1795 | if (!not_ok) { |
| 1796 | delinearize_matrix((typ*)args[2], (typ*)params.B, &r_out); |
| 1797 | } else { |
| 1798 | error_occurred = 1; |
| 1799 | nan_matrix((typ*)args[2], &r_out); |
| 1800 | } |
| 1801 | END_OUTER_LOOP |
| 1802 | |
| 1803 | release_gesv(¶ms); |
| 1804 | } |
| 1805 | |
| 1806 | set_fp_invalid_or_clear(error_occurred); |
| 1807 | } |
| 1808 | |
| 1809 | template<typename typ> |
| 1810 | static void |
nothing calls this directly
no test coverage detected