[Genabel-commits] r1859 - pkg/OmicABELnoMM/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Oct 27 23:03:35 CET 2014
Author: lckarssen
Date: 2014-10-27 23:03:35 +0100 (Mon, 27 Oct 2014)
New Revision: 1859
Modified:
pkg/OmicABELnoMM/src/Definitions.h
Log:
Code layout clean up in OmicABELnoMM's Definitions.h
No functional changes.
Modified: pkg/OmicABELnoMM/src/Definitions.h
===================================================================
--- pkg/OmicABELnoMM/src/Definitions.h 2014-10-27 22:00:07 UTC (rev 1858)
+++ pkg/OmicABELnoMM/src/Definitions.h 2014-10-27 22:03:35 UTC (rev 1859)
@@ -1,12 +1,9 @@
#ifndef defs_H_INCLUDED
#define defs_H_INCLUDED
-
-
#include <limits>
#include <list>
-
#ifdef __linux__
#define LINUX
#else
@@ -36,7 +33,7 @@
#endif
-//!For intel use propetary MKL, it will be preferred over others
+//! For intel use propetary MKL, it will be preferred over others
#ifdef __INTEL_MKL__
#include <boost/math/distributions/normal.hpp>
#pragma message("MKL will Probably NOT compile")
@@ -46,8 +43,8 @@
#define blas_set_num_threads(n) mkl_set_num_threads(n)
#define STORAGE_TYPE LAPACK_COL_MAJOR
#else
-
- //!For AMD systems use the proper ACML library, preferred over openblas ON AMD
+ //! For AMD systems use the proper ACML library,
+ //! preferred over openblas ON AMD
#ifdef _acml_
#pragma message("Compiled with AMD ACML")
#define blas_set_num_threads(n) omp_set_num_threads(n)
@@ -64,62 +61,72 @@
#define STORAGE_TYPE CblasColMajor
- #define cblas_sdot sdot
+ #define cblas_sdot sdot
#define cblas_snrm2 snrm2
#define cblas_saxpy saxpy
#ifndef BLASdefs_H_INCLUDED
#define BLASdefs_H_INCLUDED
- inline void cblas_sgemm(int storage, char transa, char transb, int m, int n, int k, float alpha, float *a, int lda, float *b, int ldb, float beta, float *c, int ldc)
+ inline void cblas_sgemm(int storage, char transa, char transb,
+ int m, int n, int k, float alpha, float *a,
+ int lda, float *b, int ldb, float beta,
+ float *c, int ldc)
{
sgemm(transa, transb, m, n, k, alpha, a, lda, b, ldb, beta, c, ldc);
}
- inline lapack_int LAPACKE_sposv( int matrix_order, char uplo, lapack_int n, lapack_int nrhs, float* a, lapack_int lda, float* b, lapack_int ldb )
+ inline lapack_int LAPACKE_sposv(int matrix_order, char uplo,
+ lapack_int n, lapack_int nrhs,
+ float* a, lapack_int lda, float* b,
+ lapack_int ldb)
{
int info;
- sposv( uplo, n, nrhs, a, lda, b, ldb, &info);
+ sposv( uplo, n, nrhs, a, lda, b, ldb, &info);
return info;
}
- inline void cblas_ssyrk(int Order, char uplo, char Trans,
- int N, int K, float alpha, float *A, int lda, float beta, float *C, int ldc)
+ inline void cblas_ssyrk(int Order, char uplo, char Trans, int N,
+ int K, float alpha, float *A, int lda,
+ float beta, float *C, int ldc)
{
ssyrk(uplo, Trans, N, K, alpha, A, lda, beta, C, ldc);
}
- inline lapack_int LAPACKE_sgels( int matrix_order, char trans, lapack_int m, lapack_int n, lapack_int nrhs, float* a, lapack_int lda, float* b, lapack_int ldb )
+ inline lapack_int LAPACKE_sgels(int matrix_order, char trans,
+ lapack_int m, lapack_int n,
+ lapack_int nrhs, float* a,
+ lapack_int lda, float* b,
+ lapack_int ldb )
{
int info;
- sgels(trans, m, n, nrhs, a, lda, b, ldb,&info);
+ sgels(trans, m, n, nrhs, a, lda, b, ldb, &info);
return info;
}
- inline lapack_int LAPACKE_spotrf( int matrix_order, char trans, lapack_int n, float* a, lapack_int lda )
+ inline lapack_int LAPACKE_spotrf(int matrix_order, char trans,
+ lapack_int n, float* a,
+ lapack_int lda)
{
int info;
sgels(trans, n, nrhs, a, lda,&info);
return info;
}
- inline lapack_int LAPACKE_spotri( int matrix_order, char trans,lapack_int n, float* a, lapack_int lda)
+ inline lapack_int LAPACKE_spotri(int matrix_order, char trans,
+ lapack_int n, float* a,
+ lapack_int lda)
{
int info;
sgels(trans, n, a, lda,&info);
return info;
}
-
#endif
-
-
#include <boost/math/distributions/normal.hpp>
-
#else
-
- //!IF MKL is not present on INTEL, use openblas
+ //! IF MKL is not present on INTEL, use openblas
#ifdef _openblas_
#include <boost/math/distributions/normal.hpp>
#pragma message("Compiled with OPENBLAS")
@@ -129,15 +136,11 @@
extern "C" void openblas_set_num_threads(int num_threads);
#define blas_set_num_threads(n) openblas_set_num_threads(n)
#endif
-
#endif
-
#endif
-
-//!SETTINGS
-
+//! SETTINGS
#define EXTENDEDTEST 0
#define PRINT 1 //&& 1EXTENDEDTEST
@@ -146,16 +149,14 @@
#define type_precision float
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-#define _1MB 1024*1024
-#define _10MB 10*_1MB
-#define _1GB 1024*1024*1024
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
+#define _1MB 1024 * 1024
+#define _10MB 10 * _1MB
+#define _1GB 1024 * 1024 * 1024
#define one_oversqrt2 0.7071067811865475244008443621048490392848359376884740
-
-
using namespace std;
@@ -177,8 +178,6 @@
bool use_fake_files;
-
-
bool storeBin;
float minPdisp;
@@ -188,7 +187,7 @@
bool storePInd;
bool disp_cov;
bool dosages;
- int model;//recessive additive dominant etc
+ int model; // recessive additive dominant etc
int modelR;
string fnameAL;
@@ -238,7 +237,6 @@
double acc_firstAR;
double acc_firstY;
-
double acc_stl;
double acc_sbr;
@@ -251,12 +249,9 @@
double acc_stats;
unsigned int total_sig_results;
-
-
};
-
struct result
{
float T;
@@ -267,9 +262,10 @@
int AR_name_idx;
};
+
class resultH
{
- public:
+ public:
int Y_name_idx;
int ARoffset;
uint16_t nUsed;
@@ -278,7 +274,4 @@
list< result > res_p;
};
-
-
-
#endif // UTILITY_H_INCLUDED
More information about the Genabel-commits
mailing list