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

Function qr_r_raw

numpy/linalg/umath_linalg.cpp:3240–3278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3238
3239template<typename typ>
3240static void
3241qr_r_raw(char **args, npy_intp const *dimensions, npy_intp const *steps,
3242 void *NPY_UNUSED(func))
3243{
3244using 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(&params, 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(&params);
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(&params);
3275 }
3276
3277 set_fp_invalid_or_clear(error_occurred);
3278}
3279
3280
3281/* -------------------------------------------------------------------------- */

Callers

nothing calls this directly

Calls 9

get_fp_invalid_and_clearFunction · 0.85
init_geqrfFunction · 0.85
init_linearize_dataFunction · 0.85
fortran_int_minFunction · 0.85
linearize_matrixFunction · 0.85
call_geqrfFunction · 0.85
delinearize_matrixFunction · 0.85
nan_matrixFunction · 0.85
set_fp_invalid_or_clearFunction · 0.85

Tested by

no test coverage detected