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

Function eig_wrapper

numpy/linalg/umath_linalg.cpp:2397–2492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2395
2396template<typename fctype, typename ftype>
2397static inline void
2398eig_wrapper(char JOBVL,
2399 char JOBVR,
2400 char**args,
2401 npy_intp const *dimensions,
2402 npy_intp const *steps)
2403{
2404 ptrdiff_t outer_steps[4];
2405 size_t iter;
2406 size_t outer_dim = *dimensions++;
2407 size_t op_count = 2;
2408 int error_occurred = get_fp_invalid_and_clear();
2409 GEEV_PARAMS_t<ftype> geev_params;
2410
2411 assert(JOBVL == 'N');
2412
2413 STACK_TRACE;
2414 op_count += 'V'==JOBVL?1:0;
2415 op_count += 'V'==JOBVR?1:0;
2416
2417 for (iter = 0; iter < op_count; ++iter) {
2418 outer_steps[iter] = (ptrdiff_t) steps[iter];
2419 }
2420 steps += op_count;
2421
2422 if (init_geev(&geev_params,
2423 JOBVL, JOBVR,
2424 (fortran_int)dimensions[0], dispatch_scalar<ftype>())) {
2425 LINEARIZE_DATA_t a_in;
2426 LINEARIZE_DATA_t w_out;
2427 LINEARIZE_DATA_t vl_out;
2428 LINEARIZE_DATA_t vr_out;
2429
2430 init_linearize_data(&a_in,
2431 geev_params.N, geev_params.N,
2432 steps[1], steps[0]);
2433 steps += 2;
2434 init_linearize_data(&w_out,
2435 1, geev_params.N,
2436 0, steps[0]);
2437 steps += 1;
2438 if ('V' == geev_params.JOBVL) {
2439 init_linearize_data(&vl_out,
2440 geev_params.N, geev_params.N,
2441 steps[1], steps[0]);
2442 steps += 2;
2443 }
2444 if ('V' == geev_params.JOBVR) {
2445 init_linearize_data(&vr_out,
2446 geev_params.N, geev_params.N,
2447 steps[1], steps[0]);
2448 }
2449
2450 for (iter = 0; iter < outer_dim; ++iter) {
2451 int not_ok;
2452 char **arg_iter = args;
2453 /* copy the matrix in */
2454 linearize_matrix((ftype*)geev_params.A, (ftype*)*arg_iter++, &a_in);

Callers

nothing calls this directly

Calls 10

get_fp_invalid_and_clearFunction · 0.85
init_geevFunction · 0.85
init_linearize_dataFunction · 0.85
linearize_matrixFunction · 0.85
call_geevFunction · 0.85
delinearize_matrixFunction · 0.85
nan_matrixFunction · 0.85
update_pointersFunction · 0.85
release_geevFunction · 0.85
set_fp_invalid_or_clearFunction · 0.85

Tested by

no test coverage detected