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

Function cholesky

numpy/linalg/umath_linalg.cpp:1938–1970  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1936
1937template<typename typ>
1938static void
1939cholesky(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(&params, 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(&params);
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(&params);
1967 }
1968
1969 set_fp_invalid_or_clear(error_occurred);
1970}
1971
1972template<typename typ>
1973static void

Callers

nothing calls this directly

Calls 9

get_fp_invalid_and_clearFunction · 0.85
init_potrfFunction · 0.85
init_linearize_dataFunction · 0.85
linearize_matrixFunction · 0.85
call_potrfFunction · 0.85
triu_matrixFunction · 0.85
delinearize_matrixFunction · 0.85
nan_matrixFunction · 0.85
set_fp_invalid_or_clearFunction · 0.85

Tested by

no test coverage detected