add interfaces to xGEBAL
This commit is contained in:
@@ -293,6 +293,11 @@
|
||||
#define arma_checon checon
|
||||
#define arma_zhecon zhecon
|
||||
|
||||
#define arma_sgebal sgebal
|
||||
#define arma_dgebal dgebal
|
||||
#define arma_cgebal cgebal
|
||||
#define arma_zgebal zgebal
|
||||
|
||||
#else
|
||||
|
||||
#define arma_sgetrf SGETRF
|
||||
@@ -553,6 +558,11 @@
|
||||
#define arma_checon CHECON
|
||||
#define arma_zhecon ZHECON
|
||||
|
||||
#define arma_sgebal SGEBAL
|
||||
#define arma_dgebal DGEBAL
|
||||
#define arma_cgebal CGEBAL
|
||||
#define arma_zgebal ZGEBAL
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -926,6 +936,12 @@ extern "C"
|
||||
void arma_fortran(arma_checon)(const char* uplo, const blas_int* n, const blas_cxf* a, const blas_int* lda, const blas_int* ipiv, const float* anorm, float* rcond, blas_cxf* work, blas_int* info, blas_len uplo_len) ARMA_NOEXCEPT;
|
||||
void arma_fortran(arma_zhecon)(const char* uplo, const blas_int* n, const blas_cxd* a, const blas_int* lda, const blas_int* ipiv, const double* anorm, double* rcond, blas_cxd* work, blas_int* info, blas_len uplo_len) ARMA_NOEXCEPT;
|
||||
|
||||
// matrix balance
|
||||
void arma_fortran(arma_sgebal)(const char* job, const blas_int* n, float* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, float* scale, blas_int* info, blas_len job_len) ARMA_NOEXCEPT;
|
||||
void arma_fortran(arma_dgebal)(const char* job, const blas_int* n, double* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, double* scale, blas_int* info, blas_len job_len) ARMA_NOEXCEPT;
|
||||
void arma_fortran(arma_cgebal)(const char* job, const blas_int* n, blas_cxf* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, float* scale, blas_int* info, blas_len job_len) ARMA_NOEXCEPT;
|
||||
void arma_fortran(arma_zgebal)(const char* job, const blas_int* n, blas_cxd* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, double* scale, blas_int* info, blas_len job_len) ARMA_NOEXCEPT;
|
||||
|
||||
#else
|
||||
|
||||
// prototypes without hidden arguments
|
||||
@@ -1282,6 +1298,12 @@ extern "C"
|
||||
void arma_fortran(arma_checon)(const char* uplo, const blas_int* n, const blas_cxf* a, const blas_int* lda, const blas_int* ipiv, const float* anorm, float* rcond, blas_cxf* work, blas_int* info) ARMA_NOEXCEPT;
|
||||
void arma_fortran(arma_zhecon)(const char* uplo, const blas_int* n, const blas_cxd* a, const blas_int* lda, const blas_int* ipiv, const double* anorm, double* rcond, blas_cxd* work, blas_int* info) ARMA_NOEXCEPT;
|
||||
|
||||
// matrix balance
|
||||
void arma_fortran(arma_sgebal)(const char* job, const blas_int* n, float* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, float* scale, blas_int* info) ARMA_NOEXCEPT;
|
||||
void arma_fortran(arma_dgebal)(const char* job, const blas_int* n, double* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, double* scale, blas_int* info) ARMA_NOEXCEPT;
|
||||
void arma_fortran(arma_cgebal)(const char* job, const blas_int* n, blas_cxf* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, float* scale, blas_int* info) ARMA_NOEXCEPT;
|
||||
void arma_fortran(arma_zgebal)(const char* job, const blas_int* n, blas_cxd* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, double* scale, blas_int* info) ARMA_NOEXCEPT;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -1485,6 +1485,28 @@ namespace lapack
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
template<typename eT>
|
||||
inline
|
||||
void
|
||||
gebal(const char* job, const blas_int* n, eT* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, typename get_pod_type<eT>::result* scale, blas_int* info)
|
||||
{
|
||||
arma_type_check(( is_supported_blas_type<eT>::value == false ));
|
||||
|
||||
#if defined(ARMA_USE_FORTRAN_HIDDEN_ARGS)
|
||||
if( is_float<eT>::value) { typedef float pod_T; typedef float T; arma_fortran(arma_sgebal)(job, n, (T*)a, lda, ilo, ihi, (pod_T*)scale, info, 1); }
|
||||
else if( is_double<eT>::value) { typedef double pod_T; typedef double T; arma_fortran(arma_dgebal)(job, n, (T*)a, lda, ilo, ihi, (pod_T*)scale, info, 1); }
|
||||
else if( is_cx_float<eT>::value) { typedef float pod_T; typedef blas_cxf T; arma_fortran(arma_cgebal)(job, n, (T*)a, lda, ilo, ihi, (pod_T*)scale, info, 1); }
|
||||
else if(is_cx_double<eT>::value) { typedef double pod_T; typedef blas_cxd T; arma_fortran(arma_zgebal)(job, n, (T*)a, lda, ilo, ihi, (pod_T*)scale, info, 1); }
|
||||
#else
|
||||
if( is_float<eT>::value) { typedef float pod_T; typedef float T; arma_fortran(arma_sgebal)(job, n, (T*)a, lda, ilo, ihi, (pod_T*)scale, info); }
|
||||
else if( is_double<eT>::value) { typedef double pod_T; typedef double T; arma_fortran(arma_dgebal)(job, n, (T*)a, lda, ilo, ihi, (pod_T*)scale, info); }
|
||||
else if( is_cx_float<eT>::value) { typedef float pod_T; typedef blas_cxf T; arma_fortran(arma_cgebal)(job, n, (T*)a, lda, ilo, ihi, (pod_T*)scale, info); }
|
||||
else if(is_cx_double<eT>::value) { typedef double pod_T; typedef blas_cxd T; arma_fortran(arma_zgebal)(job, n, (T*)a, lda, ilo, ihi, (pod_T*)scale, info); }
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1383,6 +1383,28 @@ extern "C"
|
||||
arma_fortran_sans_prefix(arma_zhecon)(uplo, n, a, lda, ipiv, anorm, rcond, work, info);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void arma_fortran_with_prefix(arma_sgebal)(const char* job, const blas_int* n, float* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, float* scale, blas_int* info)
|
||||
{
|
||||
arma_fortran_sans_prefix(arma_sgebal)(job, n, a, lda, ilo, ihi, scale, info);
|
||||
}
|
||||
|
||||
void arma_fortran_with_prefix(arma_dgebal)(const char* job, const blas_int* n, double* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, double* scale, blas_int* info)
|
||||
{
|
||||
arma_fortran_sans_prefix(arma_dgebal)(job, n, a, lda, ilo, ihi, scale, info);
|
||||
}
|
||||
|
||||
void arma_fortran_with_prefix(arma_cgebal)(const char* job, const blas_int* n, blas_cxf* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, float* scale, blas_int* info)
|
||||
{
|
||||
arma_fortran_sans_prefix(arma_cgebal)(job, n, a, lda, ilo, ihi, scale, info);
|
||||
}
|
||||
|
||||
void arma_fortran_with_prefix(arma_zgebal)(const char* job, const blas_int* n, blas_cxd* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, double* scale, blas_int* info)
|
||||
{
|
||||
arma_fortran_sans_prefix(arma_zgebal)(job, n, a, lda, ilo, ihi, scale, info);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1252,6 +1252,29 @@ extern "C"
|
||||
arma_fortran_sans_prefix(arma_zhecon)(uplo, n, a, lda, ipiv, anorm, rcond, work, info, uplo_len);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void arma_fortran_with_prefix(arma_sgebal)(const char* job, const blas_int* n, float* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, float* scale, blas_int* info, blas_len job_len)
|
||||
{
|
||||
arma_fortran_sans_prefix(arma_sgebal)(job, n, a, lda, ilo, ihi, scale, info, job_len);
|
||||
}
|
||||
|
||||
void arma_fortran_with_prefix(arma_dgebal)(const char* job, const blas_int* n, double* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, double* scale, blas_int* info, blas_len job_len)
|
||||
{
|
||||
arma_fortran_sans_prefix(arma_dgebal)(job, n, a, lda, ilo, ihi, scale, info, job_len);
|
||||
}
|
||||
|
||||
void arma_fortran_with_prefix(arma_cgebal)(const char* job, const blas_int* n, blas_cxf* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, float* scale, blas_int* info, blas_len job_len)
|
||||
{
|
||||
arma_fortran_sans_prefix(arma_cgebal)(job, n, a, lda, ilo, ihi, scale, info, job_len);
|
||||
}
|
||||
|
||||
void arma_fortran_with_prefix(arma_zgebal)(const char* job, const blas_int* n, blas_cxd* a, const blas_int* lda, blas_int* ilo, blas_int* ihi, double* scale, blas_int* info, blas_len job_len)
|
||||
{
|
||||
arma_fortran_sans_prefix(arma_zgebal)(job, n, a, lda, ilo, ihi, scale, info, job_len);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user