| 1731 | |
| 1732 | template<typename typ> |
| 1733 | static void |
| 1734 | solve(char **args, npy_intp const *dimensions, npy_intp const *steps, |
| 1735 | void *NPY_UNUSED(func)) |
| 1736 | { |
| 1737 | using ftyp = fortran_type_t<typ>; |
| 1738 | GESV_PARAMS_t<ftyp> params; |
| 1739 | fortran_int n, nrhs; |
| 1740 | int error_occurred = get_fp_invalid_and_clear(); |
| 1741 | INIT_OUTER_LOOP_3 |
| 1742 | |
| 1743 | n = (fortran_int)dimensions[0]; |
| 1744 | nrhs = (fortran_int)dimensions[1]; |
| 1745 | if (init_gesv(¶ms, n, nrhs)) { |
| 1746 | LINEARIZE_DATA_t a_in, b_in, r_out; |
| 1747 | |
| 1748 | init_linearize_data(&a_in, n, n, steps[1], steps[0]); |
| 1749 | init_linearize_data(&b_in, nrhs, n, steps[3], steps[2]); |
| 1750 | init_linearize_data(&r_out, nrhs, n, steps[5], steps[4]); |
| 1751 | |
| 1752 | BEGIN_OUTER_LOOP_3 |
| 1753 | int not_ok; |
| 1754 | linearize_matrix((typ*)params.A, (typ*)args[0], &a_in); |
| 1755 | linearize_matrix((typ*)params.B, (typ*)args[1], &b_in); |
| 1756 | not_ok =call_gesv(¶ms); |
| 1757 | if (!not_ok) { |
| 1758 | delinearize_matrix((typ*)args[2], (typ*)params.B, &r_out); |
| 1759 | } else { |
| 1760 | error_occurred = 1; |
| 1761 | nan_matrix((typ*)args[2], &r_out); |
| 1762 | } |
| 1763 | END_OUTER_LOOP |
| 1764 | |
| 1765 | release_gesv(¶ms); |
| 1766 | } |
| 1767 | |
| 1768 | set_fp_invalid_or_clear(error_occurred); |
| 1769 | } |
| 1770 | |
| 1771 | |
| 1772 | template<typename typ> |
nothing calls this directly
no test coverage detected