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
|
|
||||||
@ -1,53 +1,36 @@
|
|||||||
// Interface for LAPACK function
|
// Interface for LAPACK function
|
||||||
|
|
||||||
# ifndef LAPACK_INTER_H
|
#ifndef LAPACK_INTER_H
|
||||||
# define LAPACK_INTER_H
|
#define LAPACK_INTER_H
|
||||||
|
|
||||||
#include <complex>
|
#include <complex>
|
||||||
typedef int lapack_int;
|
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 DGETRF dgetrf_
|
||||||
|
#define DGETRS dgetrs_
|
||||||
|
#define DGETRI dgetri_
|
||||||
|
#define ZPPTRF zpptrf_
|
||||||
|
#define ZPPTRI zpptri_
|
||||||
|
|
||||||
//#define MKL_Complex8 lapack_complex_float
|
#ifdef __cplusplus
|
||||||
//#define MKL_Complex16 lapack_complex_double
|
extern "C" {
|
||||||
#include "mkl.h"
|
#endif /* __cplusplus */
|
||||||
|
void dgetrf_(const lapack_int *m, const lapack_int *n, double *a,
|
||||||
inline void ZPPTRF( char* uplo, const lapack_int* n, lapack_complex_double* ap, lapack_int* info ) {
|
const lapack_int *lda, lapack_int *ipiv, lapack_int *info);
|
||||||
ZPPTRF(uplo, (int*)n, (MKL_Complex16*)ap, (int*)info);
|
void dgetrs_(const char *trans, const lapack_int *n, const lapack_int *nrhs,
|
||||||
}
|
const double *a, const lapack_int *lda, const lapack_int *ipiv,
|
||||||
inline void ZPPTRI( char* uplo, const lapack_int* n, lapack_complex_double* ap, lapack_int* info ){
|
double *b, const lapack_int *ldb, lapack_int *info);
|
||||||
ZPPTRI(uplo, (int*)n, (MKL_Complex16*)ap, (int*)info);
|
void dgetri_(const lapack_int *n, double *a, const lapack_int *lda,
|
||||||
}
|
const lapack_int *ipiv, double *work, const lapack_int *lwork,
|
||||||
|
lapack_int *info);
|
||||||
#else
|
void zpptrf_(const char *uplo, const lapack_int *n, lapack_complex_double *ap,
|
||||||
|
lapack_int *info);
|
||||||
#define DGETRF dgetrf_
|
void zpptri_(const char *uplo, const lapack_int *n, lapack_complex_double *ap,
|
||||||
#define DGETRS dgetrs_
|
lapack_int *info);
|
||||||
#define DGETRI dgetri_
|
#ifdef __cplusplus
|
||||||
#define ZPPTRF zpptrf_
|
}
|
||||||
#define ZPPTRI zpptri_
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
void dgetrf_( const lapack_int* m, const lapack_int* n, double* a, const lapack_int* lda,
|
|
||||||
lapack_int* ipiv, lapack_int* info );
|
|
||||||
void dgetrs_( const char* trans, const lapack_int* n, const lapack_int* nrhs,
|
|
||||||
const double* a, const lapack_int* lda, const lapack_int* ipiv,
|
|
||||||
double* b, const lapack_int* ldb, lapack_int* info );
|
|
||||||
void dgetri_( const lapack_int* n, double* a, const lapack_int* lda,
|
|
||||||
const lapack_int* ipiv, double* work, const lapack_int* lwork,
|
|
||||||
lapack_int* info );
|
|
||||||
void zpptrf_( const char* uplo, const lapack_int* n, lapack_complex_double* ap,
|
|
||||||
lapack_int* info );
|
|
||||||
void zpptri_( const char* uplo, const lapack_int* n, lapack_complex_double* ap,
|
|
||||||
lapack_int* info );
|
|
||||||
#ifdef __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