|
|
|
@ -85,11 +85,16 @@ int getrf<float>(const CBLAS_ORDER order,
|
|
|
|
float* A,
|
|
|
|
float* A,
|
|
|
|
const int lda,
|
|
|
|
const int lda,
|
|
|
|
int* ipiv) {
|
|
|
|
int* ipiv) {
|
|
|
|
|
|
|
|
#ifdef PADDLE_USE_LAPACK
|
|
|
|
#ifdef PADDLE_USE_ATLAS
|
|
|
|
#ifdef PADDLE_USE_ATLAS
|
|
|
|
return clapack_sgetrf(order, M, N, A, lda, ipiv);
|
|
|
|
return clapack_sgetrf(order, M, N, A, lda, ipiv);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
return LAPACKE_sgetrf(order, M, N, A, lda, ipiv);
|
|
|
|
return LAPACKE_sgetrf(order, M, N, A, lda, ipiv);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
LOG(FATAL) << "Not implemented";
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
template <>
|
|
|
|
template <>
|
|
|
|
@ -99,11 +104,16 @@ int getrf<double>(const CBLAS_ORDER order,
|
|
|
|
double* A,
|
|
|
|
double* A,
|
|
|
|
const int lda,
|
|
|
|
const int lda,
|
|
|
|
int* ipiv) {
|
|
|
|
int* ipiv) {
|
|
|
|
|
|
|
|
#ifdef PADDLE_USE_LAPACK
|
|
|
|
#ifdef PADDLE_USE_ATLAS
|
|
|
|
#ifdef PADDLE_USE_ATLAS
|
|
|
|
return clapack_dgetrf(order, M, N, A, lda, ipiv);
|
|
|
|
return clapack_dgetrf(order, M, N, A, lda, ipiv);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
return LAPACKE_dgetrf(order, M, N, A, lda, ipiv);
|
|
|
|
return LAPACKE_dgetrf(order, M, N, A, lda, ipiv);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
LOG(FATAL) << "Not implemented".
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
template <>
|
|
|
|
template <>
|
|
|
|
@ -112,11 +122,16 @@ int getri<float>(const CBLAS_ORDER order,
|
|
|
|
float* A,
|
|
|
|
float* A,
|
|
|
|
const int lda,
|
|
|
|
const int lda,
|
|
|
|
const int* ipiv) {
|
|
|
|
const int* ipiv) {
|
|
|
|
|
|
|
|
#ifdef PADDLE_USE_LAPACK
|
|
|
|
#ifdef PADDLE_USE_ATLAS
|
|
|
|
#ifdef PADDLE_USE_ATLAS
|
|
|
|
return clapack_sgetri(order, N, A, lda, ipiv);
|
|
|
|
return clapack_sgetri(order, N, A, lda, ipiv);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
return LAPACKE_sgetri(order, N, A, lda, ipiv);
|
|
|
|
return LAPACKE_sgetri(order, N, A, lda, ipiv);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
LOG(FATAL) << "Not implemented".
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
template <>
|
|
|
|
template <>
|
|
|
|
@ -125,11 +140,16 @@ int getri<double>(const CBLAS_ORDER order,
|
|
|
|
double* A,
|
|
|
|
double* A,
|
|
|
|
const int lda,
|
|
|
|
const int lda,
|
|
|
|
const int* ipiv) {
|
|
|
|
const int* ipiv) {
|
|
|
|
|
|
|
|
#ifdef PADDLE_USE_LAPACK
|
|
|
|
#ifdef PADDLE_USE_ATLAS
|
|
|
|
#ifdef PADDLE_USE_ATLAS
|
|
|
|
return clapack_dgetri(order, N, A, lda, ipiv);
|
|
|
|
return clapack_dgetri(order, N, A, lda, ipiv);
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
return LAPACKE_dgetri(order, N, A, lda, ipiv);
|
|
|
|
return LAPACKE_dgetri(order, N, A, lda, ipiv);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
LOG(FATAL) << "Not implemented".
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
template <>
|
|
|
|
template <>
|
|
|
|
|