| 3238 | |
| 3239 | template<typename typ> |
| 3240 | static void |
| 3241 | qr_r_raw(char **args, npy_intp const *dimensions, npy_intp const *steps, |
| 3242 | void *NPY_UNUSED(func)) |
| 3243 | { |
| 3244 | using ftyp = fortran_type_t<typ>; |
| 3245 | |
| 3246 | GEQRF_PARAMS_t<ftyp> params; |
| 3247 | int error_occurred = get_fp_invalid_and_clear(); |
| 3248 | fortran_int n, m; |
| 3249 | |
| 3250 | INIT_OUTER_LOOP_2 |
| 3251 | |
| 3252 | m = (fortran_int)dimensions[0]; |
| 3253 | n = (fortran_int)dimensions[1]; |
| 3254 | |
| 3255 | if (init_geqrf(¶ms, m, n)) { |
| 3256 | LINEARIZE_DATA_t a_in, tau_out; |
| 3257 | |
| 3258 | init_linearize_data(&a_in, n, m, steps[1], steps[0]); |
| 3259 | init_linearize_data(&tau_out, 1, fortran_int_min(m, n), 1, steps[2]); |
| 3260 | |
| 3261 | BEGIN_OUTER_LOOP_2 |
| 3262 | int not_ok; |
| 3263 | linearize_matrix((typ*)params.A, (typ*)args[0], &a_in); |
| 3264 | not_ok = call_geqrf(¶ms); |
| 3265 | if (!not_ok) { |
| 3266 | delinearize_matrix((typ*)args[0], (typ*)params.A, &a_in); |
| 3267 | delinearize_matrix((typ*)args[1], (typ*)params.TAU, &tau_out); |
| 3268 | } else { |
| 3269 | error_occurred = 1; |
| 3270 | nan_matrix((typ*)args[1], &tau_out); |
| 3271 | } |
| 3272 | END_OUTER_LOOP |
| 3273 | |
| 3274 | release_geqrf(¶ms); |
| 3275 | } |
| 3276 | |
| 3277 | set_fp_invalid_or_clear(error_occurred); |
| 3278 | } |
| 3279 | |
| 3280 | |
| 3281 | /* -------------------------------------------------------------------------- */ |
nothing calls this directly
no test coverage detected