| 3533 | |
| 3534 | template<typename typ> |
| 3535 | static void |
| 3536 | qr_reduced(char **args, npy_intp const *dimensions, npy_intp const *steps, |
| 3537 | void *NPY_UNUSED(func)) |
| 3538 | { |
| 3539 | using ftyp = fortran_type_t<typ>; |
| 3540 | GQR_PARAMS_t<ftyp> params; |
| 3541 | int error_occurred = get_fp_invalid_and_clear(); |
| 3542 | fortran_int n, m; |
| 3543 | |
| 3544 | INIT_OUTER_LOOP_3 |
| 3545 | |
| 3546 | m = (fortran_int)dimensions[0]; |
| 3547 | n = (fortran_int)dimensions[1]; |
| 3548 | |
| 3549 | if (init_gqr(¶ms, m, n)) { |
| 3550 | LINEARIZE_DATA_t a_in, tau_in, q_out; |
| 3551 | |
| 3552 | init_linearize_data(&a_in, n, m, steps[1], steps[0]); |
| 3553 | init_linearize_data(&tau_in, 1, fortran_int_min(m, n), 1, steps[2]); |
| 3554 | init_linearize_data(&q_out, fortran_int_min(m, n), m, steps[4], steps[3]); |
| 3555 | |
| 3556 | BEGIN_OUTER_LOOP_3 |
| 3557 | int not_ok; |
| 3558 | linearize_matrix((typ*)params.A, (typ*)args[0], &a_in); |
| 3559 | linearize_matrix((typ*)params.Q, (typ*)args[0], &a_in); |
| 3560 | linearize_matrix((typ*)params.TAU, (typ*)args[1], &tau_in); |
| 3561 | not_ok = call_gqr(¶ms); |
| 3562 | if (!not_ok) { |
| 3563 | delinearize_matrix((typ*)args[2], (typ*)params.Q, &q_out); |
| 3564 | } else { |
| 3565 | error_occurred = 1; |
| 3566 | nan_matrix((typ*)args[2], &q_out); |
| 3567 | } |
| 3568 | END_OUTER_LOOP |
| 3569 | |
| 3570 | release_gqr(¶ms); |
| 3571 | } |
| 3572 | |
| 3573 | set_fp_invalid_or_clear(error_occurred); |
| 3574 | } |
| 3575 | |
| 3576 | /* -------------------------------------------------------------------------- */ |
| 3577 | /* qr (modes - complete) */ |
nothing calls this directly
no test coverage detected