From 660579768a3cd6aaa9575d49658b046503f1191b Mon Sep 17 00:00:00 2001 From: guoqiangqi <425418567@qq.com> Date: Wed, 7 Apr 2021 14:52:40 +0800 Subject: [PATCH] Modify the eigen related code in GCTA to make it compatible with aarch64. --- include/FastFAM.h | 6 ++++-- main/eigen_func.h | 6 ++++-- main/gcta.h | 6 ++++-- main/ld.cpp | 2 +- src/FastFAM.cpp | 6 +++++- 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/include/FastFAM.h b/include/FastFAM.h index 80e1a7e..b81008e 100644 --- a/include/FastFAM.h +++ b/include/FastFAM.h @@ -19,8 +19,10 @@ #ifndef GCTA2_FASTFAM_H #define GCTA2_FASTFAM_H -#ifndef EIGEN_USE_MKL_ALL -#define EIGEN_USE_MKL_ALL +#if !defined(__aarch64__) + #ifndef EIGEN_USE_MKL_ALL + #define EIGEN_USE_MKL_ALL + #endif #endif #include "Logger.h" diff --git a/main/eigen_func.h b/main/eigen_func.h index b137ca3..01f770e 100644 --- a/main/eigen_func.h +++ b/main/eigen_func.h @@ -12,8 +12,10 @@ #ifndef _EIGENFUNC_H #define _EIGENFUNC_H -#ifndef EIGEN_USE_MKL_ALL -#define EIGEN_USE_MKL_ALL +#if !defined(__aarch64__) + #ifndef EIGEN_USE_MKL_ALL + #define EIGEN_USE_MKL_ALL + #endif #endif #include "CommFunc.h" diff --git a/main/gcta.h b/main/gcta.h index a6049e8..d23a857 100644 --- a/main/gcta.h +++ b/main/gcta.h @@ -17,8 +17,10 @@ #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET #endif -#ifndef EIGEN_USE_MKL_ALL -#define EIGEN_USE_MKL_ALL +#if !defined(__aarch64__) + #ifndef EIGEN_USE_MKL_ALL + #define EIGEN_USE_MKL_ALL + #endif #endif #include diff --git a/main/ld.cpp b/main/ld.cpp index cd8734a..8357432 100644 --- a/main/ld.cpp +++ b/main/ld.cpp @@ -1005,7 +1005,7 @@ void gcta::calcu_max_ld_rsq_blk(eigenVector &multi_rsq, eigenVector &multi_rsq_a } - SelfAdjointEigenSolver pca(rsq_sub.array()); + SelfAdjointEigenSolver pca(rsq_sub); // debug // ofstream tmp("tmp_R.txt"); diff --git a/src/FastFAM.cpp b/src/FastFAM.cpp index f86d6c3..d4b8fcb 100644 --- a/src/FastFAM.cpp +++ b/src/FastFAM.cpp @@ -21,7 +21,11 @@ #include #include #include -#include + +#if !defined(__aarch64__) + #include +#endif + #include #include #include -- Gitee