16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES 24 int lwork, lrwork, liwork;
46 min_m_n = min( m_A, n_A );
49 if ( jobz == FLA_SVD_VECTORS_NONE ) lrwork = 5 * min_m_n;
50 else lrwork = 5 * min_m_n * min_m_n +
65 for ( i = 0; i < 2; ++
i )
71 if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
72 lwork = ( int ) *FLA_FLOAT_PTR( work );
73 else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
74 lwork = ( int ) *FLA_DOUBLE_PTR( work );
84 float* buff_A = (
float* ) FLA_FLOAT_PTR( A );
85 float* buff_s = (
float* ) FLA_FLOAT_PTR( s );
86 float* buff_U = (
float* ) FLA_FLOAT_PTR( U );
87 float* buff_V = (
float* ) FLA_FLOAT_PTR( V );
88 float* buff_work = (
float* ) FLA_FLOAT_PTR( work );
89 int* buff_iwork = (
int* ) FLA_INT_PTR( iwork );
107 double* buff_A = (
double* ) FLA_DOUBLE_PTR( A );
108 double* buff_s = (
double* ) FLA_DOUBLE_PTR( s );
109 double* buff_U = (
double* ) FLA_DOUBLE_PTR( U );
110 double* buff_V = (
double* ) FLA_DOUBLE_PTR( V );
111 double* buff_work = (
double* ) FLA_DOUBLE_PTR( work );
112 int* buff_iwork = (
int* ) FLA_INT_PTR( iwork );
131 float* buff_s = (
float* ) FLA_FLOAT_PTR( s );
135 float* buff_rwork = (
float* ) FLA_FLOAT_PTR( rwork );
136 int* buff_iwork = (
int* ) FLA_INT_PTR( iwork );
153 case FLA_DOUBLE_COMPLEX:
156 double* buff_s = (
double* ) FLA_DOUBLE_PTR( s );
160 double* buff_rwork = (
double* ) FLA_DOUBLE_PTR( rwork );
161 int* buff_iwork = (
int* ) FLA_INT_PTR( iwork );
186 FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
FLA_Error FLA_Obj_create(FLA_Datatype datatype, dim_t m, dim_t n, dim_t rs, dim_t cs, FLA_Obj *obj)
Definition: FLA_Obj.c:55
int F77_dgesdd(char *jobz, int *m, int *n, double *a, int *lda, double *s, double *u, int *ldu, double *vt, int *ldvt, double *work, int *lwork, int *iwork, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
int F77_cgesdd(char *jobz, int *m, int *n, scomplex *a, int *lda, float *s, scomplex *u, int *ldu, scomplex *vt, int *ldvt, scomplex *work, int *lwork, float *rwork, int *iwork, int *info)
int F77_zgesdd(char *jobz, int *m, int *n, dcomplex *a, int *lda, double *s, dcomplex *u, int *ldu, dcomplex *vt, int *ldvt, dcomplex *work, int *lwork, double *rwork, int *iwork, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
int F77_sgesdd(char *jobz, int *m, int *n, float *a, int *lda, float *s, float *u, int *ldu, float *vt, int *ldvt, float *work, int *lwork, int *iwork, int *info)
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
Definition: blis_type_defs.h:132
void FLA_Param_map_flame_to_netlib_svd_type(FLA_Svd_type svd_type, void *lapack_svd_type)
Definition: FLA_Param.c:171
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
FLA_Bool FLA_Obj_is_complex(FLA_Obj A)
Definition: FLA_Query.c:324
FLA_Error FLA_Svdd_check(FLA_Svd_type jobz, FLA_Obj A, FLA_Obj s, FLA_Obj U, FLA_Obj V)
Definition: FLA_Svdd_check.c:13
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137