summaryrefslogtreecommitdiff
path: root/numpy/linalg/umath_linalg.c.src
diff options
context:
space:
mode:
authorczgdp1807 <gdp.1807@gmail.com>2021-07-09 14:04:26 +0530
committerczgdp1807 <gdp.1807@gmail.com>2021-07-09 14:04:26 +0530
commit6ab34ef44aede6b09148ed6868c8ad2b0846e8e4 (patch)
treefb5644dd1f8de78c7e98a0de6165bc655df65349 /numpy/linalg/umath_linalg.c.src
parentc1f500b5d2f61cef242417a86da806bcef7faeb6 (diff)
downloadnumpy-6ab34ef44aede6b09148ed6868c8ad2b0846e8e4.tar.gz
removed redundant functions
Diffstat (limited to 'numpy/linalg/umath_linalg.c.src')
-rw-r--r--numpy/linalg/umath_linalg.c.src116
1 files changed, 49 insertions, 67 deletions
diff --git a/numpy/linalg/umath_linalg.c.src b/numpy/linalg/umath_linalg.c.src
index 1c2a03e8d..27fe51732 100644
--- a/numpy/linalg/umath_linalg.c.src
+++ b/numpy/linalg/umath_linalg.c.src
@@ -163,14 +163,6 @@ FNAME(zgelsd)(fortran_int *m, fortran_int *n, fortran_int *nrhs,
fortran_int *info);
extern fortran_int
-FNAME(sgeqrf)(fortran_int *m, fortran_int *n, float a[], fortran_int *lda,
- float tau[], float work[],
- fortran_int *lwork, fortran_int *info);
-extern fortran_int
-FNAME(cgeqrf)(fortran_int *m, fortran_int *n, f2c_complex a[], fortran_int *lda,
- f2c_complex tau[], f2c_complex work[],
- fortran_int *lwork, fortran_int *info);
-extern fortran_int
FNAME(dgeqrf)(fortran_int *m, fortran_int *n, double a[], fortran_int *lda,
double tau[], double work[],
fortran_int *lwork, fortran_int *info);
@@ -180,18 +172,10 @@ FNAME(zgeqrf)(fortran_int *m, fortran_int *n, f2c_doublecomplex a[], fortran_int
fortran_int *lwork, fortran_int *info);
extern fortran_int
-FNAME(sorgqr)(fortran_int *m, fortran_int *n, fortran_int *k, float a[], fortran_int *lda,
- float tau[], float work[],
- fortran_int *lwork, fortran_int *info);
-extern fortran_int
FNAME(dorgqr)(fortran_int *m, fortran_int *n, fortran_int *k, double a[], fortran_int *lda,
double tau[], double work[],
fortran_int *lwork, fortran_int *info);
extern fortran_int
-FNAME(cungqr)(fortran_int *m, fortran_int *n, fortran_int *k, f2c_complex a[],
- fortran_int *lda, f2c_complex tau[],
- f2c_complex work[], fortran_int *lwork, fortran_int *info);
-extern fortran_int
FNAME(zungqr)(fortran_int *m, fortran_int *n, fortran_int *k, f2c_doublecomplex a[],
fortran_int *lda, f2c_doublecomplex tau[],
f2c_doublecomplex work[], fortran_int *lwork, fortran_int *info);
@@ -2910,7 +2894,7 @@ dump_geqrf_params(const char *name,
}
/**begin repeat
- #lapack_func=sgeqrf,dgeqrf,cgeqrf,zgeqrf#
+ #lapack_func=dgeqrf,zgeqrf#
*/
static inline fortran_int
@@ -2928,9 +2912,9 @@ call_@lapack_func@(GEQRF_PARAMS_t *params)
/**end repeat**/
/**begin repeat
- #TYPE=FLOAT,DOUBLE#
- #lapack_func=sgeqrf,dgeqrf#
- #ftyp=fortran_real,fortran_doublereal#
+ #TYPE=DOUBLE#
+ #lapack_func=dgeqrf#
+ #ftyp=fortran_doublereal#
*/
static inline int
init_@lapack_func@(GEQRF_PARAMS_t *params,
@@ -3007,9 +2991,9 @@ init_@lapack_func@(GEQRF_PARAMS_t *params,
/**end repeat**/
/**begin repeat
- #TYPE=CFLOAT,CDOUBLE#
- #lapack_func=cgeqrf,zgeqrf#
- #ftyp=fortran_complex,fortran_doublecomplex#
+ #TYPE=CDOUBLE#
+ #lapack_func=zgeqrf#
+ #ftyp=fortran_doublecomplex#
*/
static inline int
init_@lapack_func@(GEQRF_PARAMS_t *params,
@@ -3088,7 +3072,7 @@ init_@lapack_func@(GEQRF_PARAMS_t *params,
/**end repeat**/
/**begin repeat
- #lapack_func=sgeqrf,dgeqrf,cgeqrf,zgeqrf#
+ #lapack_func=dgeqrf,zgeqrf#
*/
static inline void
release_@lapack_func@(GEQRF_PARAMS_t* params)
@@ -3102,14 +3086,13 @@ release_@lapack_func@(GEQRF_PARAMS_t* params)
/**end repeat**/
/**begin repeat
- #TYPE=FLOAT,DOUBLE,CFLOAT,CDOUBLE#
- #REALTYPE=FLOAT,DOUBLE,FLOAT,DOUBLE#
- #lapack_func=sgeqrf,dgeqrf,cgeqrf,zgeqrf#
- #typ = npy_float, npy_double, npy_cfloat, npy_cdouble#
- #basetyp = npy_float, npy_double, npy_float, npy_double#
- #ftyp = fortran_real, fortran_doublereal,
- fortran_complex, fortran_doublecomplex#
- #cmplx = 0, 0, 1, 1#
+ #TYPE=DOUBLE,CDOUBLE#
+ #REALTYPE=DOUBLE,DOUBLE#
+ #lapack_func=dgeqrf,zgeqrf#
+ #typ = npy_double,npy_cdouble#
+ #basetyp = npy_double,npy_double#
+ #ftyp = fortran_doublereal,fortran_doublecomplex#
+ #cmplx = 0, 1#
*/
static void
@TYPE@_qr_r_raw(char **args, npy_intp const *dimensions, npy_intp const *steps,
@@ -3168,7 +3151,7 @@ typedef struct gqr_params_struct
} GQR_PARAMS_t;
/**begin repeat
- #lapack_func=sorgqr,dorgqr,cungqr,zungqr#
+ #lapack_func=dorgqr,zungqr#
*/
static inline fortran_int
@@ -3186,8 +3169,8 @@ call_@lapack_func@(GQR_PARAMS_t *params)
/**end repeat**/
/**begin repeat
- #lapack_func=sorgqr,dorgqr#
- #ftyp=fortran_real,fortran_doublereal#
+ #lapack_func=dorgqr#
+ #ftyp=fortran_doublereal#
*/
static inline int
init_@lapack_func@_common(GQR_PARAMS_t *params,
@@ -3268,8 +3251,8 @@ init_@lapack_func@_common(GQR_PARAMS_t *params,
/**end repeat**/
/**begin repeat
- #lapack_func=cungqr,zungqr#
- #ftyp=fortran_complex,fortran_doublecomplex#
+ #lapack_func=zungqr#
+ #ftyp=fortran_doublecomplex#
*/
static inline int
init_@lapack_func@_common(GQR_PARAMS_t *params,
@@ -3385,8 +3368,8 @@ dump_gqr_params(const char *name,
}
/**begin repeat
- #lapack_func=sorgqr,dorgqr,cungqr,zungqr#
- #ftyp=fortran_real,fortran_doublereal,fortran_complex,fortran_doublecomplex#
+ #lapack_func=dorgqr,zungqr#
+ #ftyp=fortran_doublereal,fortran_doublecomplex#
*/
static inline int
init_@lapack_func@(GQR_PARAMS_t *params,
@@ -3401,7 +3384,7 @@ init_@lapack_func@(GQR_PARAMS_t *params,
/**end repeat**/
/**begin repeat
- #lapack_func=sorgqr,dorgqr,cungqr,zungqr#
+ #lapack_func=dorgqr,zungqr#
*/
static inline void
release_@lapack_func@(GQR_PARAMS_t* params)
@@ -3415,14 +3398,13 @@ release_@lapack_func@(GQR_PARAMS_t* params)
/**end repeat**/
/**begin repeat
- #TYPE=FLOAT,DOUBLE,CFLOAT,CDOUBLE#
- #REALTYPE=FLOAT,DOUBLE,FLOAT,DOUBLE#
- #lapack_func=sorgqr,dorgqr,cungqr,zungqr#
- #typ = npy_float, npy_double, npy_cfloat, npy_cdouble#
- #basetyp = npy_float, npy_double, npy_float, npy_double#
- #ftyp = fortran_real, fortran_doublereal,
- fortran_complex, fortran_doublecomplex#
- #cmplx = 0, 0, 1, 1#
+ #TYPE=DOUBLE,CDOUBLE#
+ #REALTYPE=DOUBLE,DOUBLE#
+ #lapack_func=dorgqr,zungqr#
+ #typ = npy_double, npy_cdouble#
+ #basetyp = npy_double, npy_double#
+ #ftyp = fortran_doublereal,fortran_doublecomplex#
+ #cmplx = 0, 1#
*/
static void
@TYPE@_qr_reduced(char **args, npy_intp const *dimensions, npy_intp const *steps,
@@ -3470,8 +3452,8 @@ static void
/* qr (modes - complete) */
/**begin repeat
- #lapack_func=sorgqr,dorgqr,cungqr,zungqr#
- #ftyp=fortran_real,fortran_doublereal,fortran_complex,fortran_doublecomplex#
+ #lapack_func=dorgqr,zungqr#
+ #ftyp=fortran_doublereal,fortran_doublecomplex#
*/
static inline int
init_@lapack_func@_complete(GQR_PARAMS_t *params,
@@ -3484,14 +3466,13 @@ init_@lapack_func@_complete(GQR_PARAMS_t *params,
/**end repeat**/
/**begin repeat
- #TYPE=FLOAT,DOUBLE,CFLOAT,CDOUBLE#
- #REALTYPE=FLOAT,DOUBLE,FLOAT,DOUBLE#
- #lapack_func=sorgqr,dorgqr,cungqr,zungqr#
- #typ = npy_float, npy_double, npy_cfloat, npy_cdouble#
- #basetyp = npy_float, npy_double, npy_float, npy_double#
- #ftyp = fortran_real, fortran_doublereal,
- fortran_complex, fortran_doublecomplex#
- #cmplx = 0, 0, 1, 1#
+ #TYPE=DOUBLE,CDOUBLE#
+ #REALTYPE=DOUBLE,DOUBLE#
+ #lapack_func=dorgqr,zungqr#
+ #typ = npy_double,npy_cdouble#
+ #basetyp = npy_double,npy_double#
+ #ftyp = fortran_doublereal,fortran_doublecomplex#
+ #cmplx = 0, 1#
*/
static void
@TYPE@_qr_complete(char **args, npy_intp const *dimensions, npy_intp const *steps,
@@ -3992,6 +3973,13 @@ static void *array_of_nulls[] = {
CDOUBLE_ ## NAME \
}
+#define GUFUNC_FUNC_ARRAY_QR(NAME) \
+ static PyUFuncGenericFunction \
+ FUNC_ARRAY_NAME(NAME)[] = { \
+ DOUBLE_ ## NAME, \
+ CDOUBLE_ ## NAME \
+ }
+
GUFUNC_FUNC_ARRAY_REAL_COMPLEX(slogdet);
GUFUNC_FUNC_ARRAY_REAL_COMPLEX(det);
@@ -4006,9 +3994,9 @@ GUFUNC_FUNC_ARRAY_REAL_COMPLEX(cholesky_lo);
GUFUNC_FUNC_ARRAY_REAL_COMPLEX(svd_N);
GUFUNC_FUNC_ARRAY_REAL_COMPLEX(svd_S);
GUFUNC_FUNC_ARRAY_REAL_COMPLEX(svd_A);
-GUFUNC_FUNC_ARRAY_REAL_COMPLEX(qr_r_raw);
-GUFUNC_FUNC_ARRAY_REAL_COMPLEX(qr_reduced);
-GUFUNC_FUNC_ARRAY_REAL_COMPLEX(qr_complete);
+GUFUNC_FUNC_ARRAY_QR(qr_r_raw);
+GUFUNC_FUNC_ARRAY_QR(qr_reduced);
+GUFUNC_FUNC_ARRAY_QR(qr_complete);
GUFUNC_FUNC_ARRAY_REAL_COMPLEX(lstsq);
GUFUNC_FUNC_ARRAY_EIG(eig);
GUFUNC_FUNC_ARRAY_EIG(eigvals);
@@ -4077,25 +4065,19 @@ static char svd_1_3_types[] = {
/* A, tau */
static char qr_r_raw_types[] = {
- NPY_FLOAT, NPY_FLOAT,
NPY_DOUBLE, NPY_DOUBLE,
- NPY_CFLOAT, NPY_CFLOAT,
NPY_CDOUBLE, NPY_CDOUBLE,
};
/* A, tau, q */
static char qr_reduced_types[] = {
- NPY_FLOAT, NPY_FLOAT, NPY_FLOAT,
NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE,
- NPY_CFLOAT, NPY_CFLOAT, NPY_CFLOAT,
NPY_CDOUBLE, NPY_CDOUBLE, NPY_CDOUBLE,
};
/* A, tau, q */
static char qr_complete_types[] = {
- NPY_FLOAT, NPY_FLOAT, NPY_FLOAT,
NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE,
- NPY_CFLOAT, NPY_CFLOAT, NPY_CFLOAT,
NPY_CDOUBLE, NPY_CDOUBLE, NPY_CDOUBLE,
};