make AWPMD compatible with MSVC and c++-linalg on Windows
This commit is contained in:
@ -1,19 +0,0 @@
|
|||||||
# ifndef ERF_H
|
|
||||||
# define ERF_H
|
|
||||||
|
|
||||||
# ifdef _WIN32
|
|
||||||
|
|
||||||
# ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
# endif
|
|
||||||
|
|
||||||
double erf(double x);
|
|
||||||
double erfc(double x);
|
|
||||||
|
|
||||||
# ifdef __cplusplus
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# endif
|
|
||||||
@ -8,21 +8,6 @@ typedef int lapack_int;
|
|||||||
typedef complex<float> lapack_complex_float;
|
typedef complex<float> lapack_complex_float;
|
||||||
typedef complex<double> lapack_complex_double;
|
typedef complex<double> lapack_complex_double;
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
|
||||||
|
|
||||||
//#define MKL_Complex8 lapack_complex_float
|
|
||||||
//#define MKL_Complex16 lapack_complex_double
|
|
||||||
#include "mkl.h"
|
|
||||||
|
|
||||||
inline void ZPPTRF( char* uplo, const lapack_int* n, lapack_complex_double* ap, lapack_int* info ) {
|
|
||||||
ZPPTRF(uplo, (int*)n, (MKL_Complex16*)ap, (int*)info);
|
|
||||||
}
|
|
||||||
inline void ZPPTRI( char* uplo, const lapack_int* n, lapack_complex_double* ap, lapack_int* info ){
|
|
||||||
ZPPTRI(uplo, (int*)n, (MKL_Complex16*)ap, (int*)info);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#define DGETRF dgetrf_
|
#define DGETRF dgetrf_
|
||||||
#define DGETRS dgetrs_
|
#define DGETRS dgetrs_
|
||||||
#define DGETRI dgetri_
|
#define DGETRI dgetri_
|
||||||
@ -32,8 +17,8 @@ typedef complex<double> lapack_complex_double;
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
void dgetrf_( const lapack_int* m, const lapack_int* n, double* a, const lapack_int* lda,
|
void dgetrf_(const lapack_int *m, const lapack_int *n, double *a,
|
||||||
lapack_int* ipiv, lapack_int* info );
|
const lapack_int *lda, lapack_int *ipiv, lapack_int *info);
|
||||||
void dgetrs_(const char *trans, const lapack_int *n, const lapack_int *nrhs,
|
void dgetrs_(const char *trans, const lapack_int *n, const lapack_int *nrhs,
|
||||||
const double *a, const lapack_int *lda, const lapack_int *ipiv,
|
const double *a, const lapack_int *lda, const lapack_int *ipiv,
|
||||||
double *b, const lapack_int *ldb, lapack_int *info);
|
double *b, const lapack_int *ldb, lapack_int *info);
|
||||||
@ -48,6 +33,4 @@ typedef complex<double> lapack_complex_double;
|
|||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* lapack_intER_H */
|
#endif /* lapack_intER_H */
|
||||||
|
|||||||
@ -149,10 +149,8 @@
|
|||||||
# include "pairhash.h"
|
# include "pairhash.h"
|
||||||
# include "TCP/tcpdefs.h"
|
# include "TCP/tcpdefs.h"
|
||||||
# include "wavepacket.h"
|
# include "wavepacket.h"
|
||||||
# include "erf.h"
|
|
||||||
# include "cerf.h"
|
# include "cerf.h"
|
||||||
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
# include "lapack_inter.h"
|
# include "lapack_inter.h"
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
# include "wpmd_split.h"
|
# include "wpmd_split.h"
|
||||||
//# include "erf.h"
|
|
||||||
|
|
||||||
|
|
||||||
void AWPMD_split::resize(int flag){
|
void AWPMD_split::resize(int flag){
|
||||||
for(int s=0;s<2;s++){
|
for(int s=0;s<2;s++){
|
||||||
|
|||||||
Reference in New Issue
Block a user