| 1936 | |
| 1937 | template<typename typ> |
| 1938 | static void |
| 1939 | cholesky(char uplo, char **args, npy_intp const *dimensions, npy_intp const *steps) |
| 1940 | { |
| 1941 | using ftyp = fortran_type_t<typ>; |
| 1942 | POTR_PARAMS_t<ftyp> params; |
| 1943 | int error_occurred = get_fp_invalid_and_clear(); |
| 1944 | fortran_int n; |
| 1945 | INIT_OUTER_LOOP_2 |
| 1946 | |
| 1947 | assert(uplo == 'L'); |
| 1948 | |
| 1949 | n = (fortran_int)dimensions[0]; |
| 1950 | if (init_potrf(¶ms, uplo, n)) { |
| 1951 | LINEARIZE_DATA_t a_in, r_out; |
| 1952 | init_linearize_data(&a_in, n, n, steps[1], steps[0]); |
| 1953 | init_linearize_data(&r_out, n, n, steps[3], steps[2]); |
| 1954 | BEGIN_OUTER_LOOP_2 |
| 1955 | int not_ok; |
| 1956 | linearize_matrix(params.A, (ftyp*)args[0], &a_in); |
| 1957 | not_ok = call_potrf(¶ms); |
| 1958 | if (!not_ok) { |
| 1959 | triu_matrix(params.A, params.N); |
| 1960 | delinearize_matrix((ftyp*)args[1], params.A, &r_out); |
| 1961 | } else { |
| 1962 | error_occurred = 1; |
| 1963 | nan_matrix((ftyp*)args[1], &r_out); |
| 1964 | } |
| 1965 | END_OUTER_LOOP |
| 1966 | release_potrf(¶ms); |
| 1967 | } |
| 1968 | |
| 1969 | set_fp_invalid_or_clear(error_occurred); |
| 1970 | } |
| 1971 | |
| 1972 | template<typename typ> |
| 1973 | static void |
nothing calls this directly
no test coverage detected