MCPcopy Create free account
hub / github.com/numpy/numpy / qr_reduced

Function qr_reduced

numpy/linalg/umath_linalg.cpp:3535–3574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3533
3534template<typename typ>
3535static void
3536qr_reduced(char **args, npy_intp const *dimensions, npy_intp const *steps,
3537 void *NPY_UNUSED(func))
3538{
3539using 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(&params, 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(&params);
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(&params);
3571 }
3572
3573 set_fp_invalid_or_clear(error_occurred);
3574}
3575
3576/* -------------------------------------------------------------------------- */
3577 /* qr (modes - complete) */

Callers

nothing calls this directly

Calls 9

get_fp_invalid_and_clearFunction · 0.85
init_gqrFunction · 0.85
init_linearize_dataFunction · 0.85
fortran_int_minFunction · 0.85
linearize_matrixFunction · 0.85
call_gqrFunction · 0.85
delinearize_matrixFunction · 0.85
nan_matrixFunction · 0.85
set_fp_invalid_or_clearFunction · 0.85

Tested by

no test coverage detected