| 2395 | |
| 2396 | template<typename fctype, typename ftype> |
| 2397 | static inline void |
| 2398 | eig_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); |
nothing calls this directly
no test coverage detected