Skip to content

Commit

Permalink
system headers go first
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengxwen committed Mar 30, 2024
1 parent 27d5afa commit 07ed2d0
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 63 deletions.
6 changes: 3 additions & 3 deletions src/ConvToGDS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// ConvToGDS.cpp: PED/VCF to GDS Format
//
// Copyright (C) 2013-2023 Xiuwen Zheng
// Copyright (C) 2013-2024 Xiuwen Zheng
//
// This file is part of SeqArray.
//
Expand All @@ -19,16 +19,16 @@
// along with SeqArray.
// If not, see <http://www.gnu.org/licenses/>.

#include <R_GDS_CPP.h>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <fstream>

#include <R_GDS_CPP.h>
using namespace CoreArray;

#include <dGenGWAS.h>
#include <fstream>
using namespace GWAS;


Expand Down
16 changes: 8 additions & 8 deletions src/SNPRelate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// SNPRelate.cpp: Relatedness, Linkage Disequilibrium and
// Principal Component Analysis
//
// Copyright (C) 2011-2018 Xiuwen Zheng [zhengxwen@gmail.com]
// Copyright (C) 2011-2024 Xiuwen Zheng [zhengx@u.washington.edu]
//
// This file is part of SNPRelate.
//
Expand All @@ -27,20 +27,20 @@
// If not, see <http://www.gnu.org/licenses/>.


#include <dGenGWAS.h>
#include <dVect.h>

#include <Rinternals.h>
#include <R_ext/Lapack.h>
#include <R_ext/Rdynload.h>

#include <fstream>
#include <vector>
#include <set>
#include <map>
#include <utility>
#include <algorithm>

#include <dGenGWAS.h>
#include <dVect.h>

#include <Rinternals.h>
#include <R_ext/Lapack.h>
#include <R_ext/Rdynload.h>


using namespace std;
using namespace CoreArray;
Expand Down
11 changes: 5 additions & 6 deletions src/ThreadPool.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// ThreadPool.h: a C++ implementation of thread pool
//
// Copyright (C) 2016-2017 Xiuwen Zheng
// Copyright (C) 2016-2024 Xiuwen Zheng
//
// This file is part of SNPRelate.
//
Expand All @@ -21,29 +21,28 @@

/**
* \file ThreadPool.h
* \author Xiuwen Zheng [zhengxwen@gmail.com]
* \author Xiuwen Zheng [zhengx@u.washington.edu]
* \version 1.0
* \date 2016-2017
* \date 2016-2024
* \brief a C++ implementation of thread pool
* \details
**/

#ifndef _HEADER_THREAD_POOL_
#define _HEADER_THREAD_POOL_

#include <CoreDEF.h>
#include <R_GDS_CPP.h>
#include <vector>
#include <queue>
#include <CoreDEF.h>

#ifdef COREARRAY_PLATFORM_WINDOWS
# include <windows.h>
#endif

#ifdef COREARRAY_POSIX_THREAD
# include <pthread.h>
#endif

#include <R_GDS_CPP.h>

namespace CoreArray
{
Expand Down
2 changes: 1 addition & 1 deletion src/dGenGWAS.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
#ifndef _HEADER_GWAS_
#define _HEADER_GWAS_

#include <R_GDS_CPP.h>
#include <ctime>
#include <vector>
#include <string>
#include <algorithm>
#include <memory>

#include <R_GDS_CPP.h>
#include "ThreadPool.h"
#include "dVect.h"

Expand Down
12 changes: 6 additions & 6 deletions src/genBeta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// genBeta.cpp: Individual Inbreeding and Relatedness (Beta) on GWAS
//
// Copyright (C) 2016-2018 Xiuwen Zheng
// Copyright (C) 2016-2024 Xiuwen Zheng
//
// This file is part of SNPRelate.
//
Expand All @@ -22,17 +22,17 @@
#ifndef _HEADER_IBD_BETA_
#define _HEADER_IBD_BETA_

// CoreArray library header
#include <dGenGWAS.h>
#include <dVect.h>
#include "ThreadPool.h"

// Standard library header
#include <cmath>
#include <cfloat>
#include <memory>
#include <algorithm>

// CoreArray library header
#include <dGenGWAS.h>
#include <dVect.h>
#include "ThreadPool.h"


namespace IBD_BETA
{
Expand Down
4 changes: 2 additions & 2 deletions src/genEIGMIX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// genEIGMIX.cpp: Eigen-analysis with admixture on GWAS
//
// Copyright (C) 2017 Xiuwen Zheng
// Copyright (C) 2017-2024 Xiuwen Zheng
//
// This file is part of SNPRelate.
//
Expand All @@ -23,8 +23,8 @@
#ifndef _HEADER_EIGMIX_
#define _HEADER_EIGMIX_

#include "genPCA.h"
#include <algorithm>
#include "genPCA.h"


namespace EIGMIX
Expand Down
10 changes: 5 additions & 5 deletions src/genFst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// genFst.cpp: Fixation index (Fst) Estimation
//
// Copyright (C) 2015-2017 Xiuwen Zheng
// Copyright (C) 2015-2024 Xiuwen Zheng
//
// This file is part of SNPRelate.
//
Expand All @@ -22,14 +22,14 @@
#ifndef _HEADER_FST_
#define _HEADER_FST_

// CoreArray library header
#include "dGenGWAS.h"
#include "dVect.h"

// Standard library header
#include <vector>
#include <cmath>

// CoreArray library header
#include "dGenGWAS.h"
#include "dVect.h"

namespace Fst
{
class COREARRAY_DLL_LOCAL ClassFst_WH15
Expand Down
8 changes: 4 additions & 4 deletions src/genHWE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// genHWE.cpp: Hardy-Weinberg Equilibrium Test on SNPs
//
// Copyright (C) 2015-2017 Xiuwen Zheng
// Copyright (C) 2015-2024 Xiuwen Zheng
//
// This file is part of SNPRelate.
//
Expand All @@ -22,13 +22,13 @@
#ifndef _HEADER_HWE_
#define _HEADER_HWE_

// CoreArray library header
#include "dGenGWAS.h"

// Standard library header
#include <vector>
#include <cmath>

// CoreArray library header
#include "dGenGWAS.h"

// using namespace
using namespace std;
using namespace GWAS;
Expand Down
10 changes: 5 additions & 5 deletions src/genIBD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// genIBD.cpp: Identity by descent (IBD) Analysis on GWAS
//
// Copyright (C) 2011-2018 Xiuwen Zheng
// Copyright (C) 2011-2024 Xiuwen Zheng
//
// This file is part of SNPRelate.
//
Expand All @@ -23,10 +23,6 @@
#ifndef _HEADER_IBD_
#define _HEADER_IBD_

// CoreArray library header
#include "dGenGWAS.h"
#include "dVect.h"

// Standard library header
#include <limits>
#include <vector>
Expand All @@ -35,6 +31,10 @@
#include <memory>
#include <algorithm>

// CoreArray library header
#include "dGenGWAS.h"
#include "dVect.h"


#ifdef COREARRAY_SIMD_SSE
#include <xmmintrin.h>
Expand Down
12 changes: 6 additions & 6 deletions src/genIBS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// genIBS.cpp: Identity by state (IBS) Analysis on GWAS
//
// Copyright (C) 2011-2018 Xiuwen Zheng
// Copyright (C) 2011-2024 Xiuwen Zheng
//
// This file is part of SNPRelate.
//
Expand All @@ -23,17 +23,17 @@
#ifndef _HEADER_IBS_
#define _HEADER_IBS_

// CoreArray library header
#include "dGenGWAS.h"
#include "dVect.h"
#include "ThreadPool.h"

// Standard library header
#include <cmath>
#include <cfloat>
#include <memory>
#include <algorithm>

// CoreArray library header
#include "dGenGWAS.h"
#include "dVect.h"
#include "ThreadPool.h"


namespace IBS
{
Expand Down
12 changes: 6 additions & 6 deletions src/genKING.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// genKING.cpp: KINK Identity-by-descent (IBD) Analysis on GWAS
//
// Copyright (C) 2011-2018 Xiuwen Zheng
// Copyright (C) 2011-2024 Xiuwen Zheng
//
// This file is part of SNPRelate.
//
Expand All @@ -22,17 +22,17 @@
#ifndef _HEADER_IBD_KING_
#define _HEADER_IBD_KING_

// CoreArray library header
#include <dGenGWAS.h>
#include <dVect.h>
#include "ThreadPool.h"

// Standard library header
#include <cmath>
#include <cfloat>
#include <memory>
#include <algorithm>

// CoreArray library header
#include <dGenGWAS.h>
#include <dVect.h>
#include "ThreadPool.h"


namespace IBD_KING
{
Expand Down
8 changes: 4 additions & 4 deletions src/genLD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
#ifndef _HEADER_LD_
#define _HEADER_LD_

// CoreArray library header
#include <dGenGWAS.h>
#include <dVect.h>

// Standard library header
#include <cmath>
#include <cfloat>
#include <memory>
#include <list>
#include <algorithm>

// CoreArray library header
#include <dGenGWAS.h>
#include <dVect.h>


#ifdef COREARRAY_SIMD_SSE
#include <xmmintrin.h>
Expand Down
6 changes: 3 additions & 3 deletions src/genPCA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// genPCA.cpp: Principal Component Analysis on GWAS
//
// Copyright (C) 2011-2020 Xiuwen Zheng
// Copyright (C) 2011-2024 Xiuwen Zheng
//
// This file is part of SNPRelate.
//
Expand All @@ -19,11 +19,11 @@
// with SNPRelate.
// If not, see <http://www.gnu.org/licenses/>.

#include "genPCA.h"
#include <R_ext/Lapack.h>
#include <cmath>
#include <memory>
#include <algorithm>
#include "genPCA.h"
#include <R_ext/Lapack.h>

#ifndef FCONE
# define FCONE
Expand Down
8 changes: 4 additions & 4 deletions src/genSlideWin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// genSlideWin.cpp: The Method of Sliding Windows
//
// Copyright (C) 2015-2017 Xiuwen Zheng
// Copyright (C) 2015-2024 Xiuwen Zheng
//
// This file is part of SNPRelate.
//
Expand All @@ -22,13 +22,13 @@
#ifndef _HEADER_SLIDE_WINDOW_
#define _HEADER_SLIDE_WINDOW_

// CoreArray library header
#include "dGenGWAS.h"

// Standard library header
#include <vector>
#include <cmath>

// CoreArray library header
#include "dGenGWAS.h"

// using namespace
using namespace std;
using namespace GWAS;
Expand Down

0 comments on commit 07ed2d0

Please sign in to comment.