[Genabel-commits] r1395 - pkg/OmicABEL/src
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Nov 19 00:17:22 CET 2013
Author: lckarssen
Date: 2013-11-19 00:17:22 +0100 (Tue, 19 Nov 2013)
New Revision: 1395
Modified:
pkg/OmicABEL/src/GWAS.h
pkg/OmicABEL/src/REML.h
pkg/OmicABEL/src/blas.h
pkg/OmicABEL/src/fgls_eigen.h
pkg/OmicABEL/src/lapack.h
Log:
Fixing a few cpplint errors in OmicABEL: remove white space at the end of a line (also replaces tabs with spaces).
No functional changes.
Modified: pkg/OmicABEL/src/GWAS.h
===================================================================
--- pkg/OmicABEL/src/GWAS.h 2013-11-18 22:31:03 UTC (rev 1394)
+++ pkg/OmicABEL/src/GWAS.h 2013-11-18 23:17:22 UTC (rev 1395)
@@ -3,21 +3,21 @@
* All rights reserved.
*
* This file is part of OmicABEL.
- *
+ *
* OmicABEL is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* OmicABEL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with OmicABEL. If not, see <http://www.gnu.org/licenses/>.
- *
- *
+ *
+ *
* Coded by:
* Diego Fabregat-Traver (fabregat at aices.rwth-aachen.de)
*/
@@ -40,8 +40,8 @@
// GWAS configuration and data carried throughout the computaiton
typedef struct
{
- // Paths to each data files
- // Zt* are temporary, no databel info + data
+ // Paths to each data files
+ // Zt* are temporary, no databel info + data
char Phi_info_path[STR_BUFFER_SIZE];
char Phi_data_path[STR_BUFFER_SIZE];
char XL_info_path[STR_BUFFER_SIZE];
@@ -52,37 +52,37 @@
char Y_data_path[STR_BUFFER_SIZE];
char B_info_path[STR_BUFFER_SIZE];
char B_data_path[STR_BUFFER_SIZE];
- // Temporary data
+ // Temporary data
char ZtXL_path[STR_BUFFER_SIZE];
char ZtXR_path[STR_BUFFER_SIZE];
char ZtY_path[STR_BUFFER_SIZE];
- // Headers
- databel_fvi *Phi_fvi;
- databel_fvi *XL_fvi;
- databel_fvi *XR_fvi;
- databel_fvi *Y_fvi;
- // Data ready for runtime computations
- // in-core data -> double *
- // out-of-core data -> FILE *
- double *ests;
- double *h2;
- double *sigma2;
- double *res_sigma2; // est_sigma2
- double *beta_ests;
- double *Phi;
- double *XL;
- double *ZtXL;
- FILE *XR;
- FILE *ZtXR;
- FILE *Y;
- FILE *ZtY;
- FILE *B;
- // Temporary data
- double *Z; // Eigenvectors of Phi
- double *W; // Eigenvalues of Phi
+ // Headers
+ databel_fvi *Phi_fvi;
+ databel_fvi *XL_fvi;
+ databel_fvi *XR_fvi;
+ databel_fvi *Y_fvi;
+ // Data ready for runtime computations
+ // in-core data -> double *
+ // out-of-core data -> FILE *
+ double *ests;
+ double *h2;
+ double *sigma2;
+ double *res_sigma2; // est_sigma2
+ double *beta_ests;
+ double *Phi;
+ double *XL;
+ double *ZtXL;
+ FILE *XR;
+ FILE *ZtXR;
+ FILE *Y;
+ FILE *ZtY;
+ FILE *B;
+ // Temporary data
+ double *Z; // Eigenvectors of Phi
+ double *W; // Eigenvalues of Phi
- // Problem dimensions
+ // Problem dimensions
size_t n;
size_t p;
size_t m;
@@ -93,22 +93,22 @@
size_t y_b; // Block-size along Y
size_t ooc_b; // Block-size for ooc gemms
- // TO-DO
- // For now, the size of the openmp block
- // Should be the size of the ooc tile, and xb yb the size of the omp block
+ // TO-DO
+ // For now, the size of the openmp block
+ // Should be the size of the ooc tile, and xb yb the size of the omp block
size_t x_tile;
size_t y_tile;
- size_t totalMem;
- size_t availMem;
+ size_t totalMem;
+ size_t availMem;
int num_threads;
- char var[STR_BUFFER_SIZE];
- int threshold;
+ char var[STR_BUFFER_SIZE];
+ int threshold;
} FGLS_config_t;
void initialize_config(
- FGLS_config_t *cf,
- char *cov_base, char *phi_base, char *snp_base, char *pheno_base, char *out_base//,
+ FGLS_config_t *cf,
+ char *cov_base, char *phi_base, char *snp_base, char *pheno_base, char *out_base//,
// char *var, int num_threads, int xtile, int ytile, int xb, int yb, int write_output
);
Modified: pkg/OmicABEL/src/REML.h
===================================================================
--- pkg/OmicABEL/src/REML.h 2013-11-18 22:31:03 UTC (rev 1394)
+++ pkg/OmicABEL/src/REML.h 2013-11-18 23:17:22 UTC (rev 1395)
@@ -3,21 +3,21 @@
* All rights reserved.
*
* This file is part of OmicABEL.
- *
+ *
* OmicABEL is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* OmicABEL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with OmicABEL. If not, see <http://www.gnu.org/licenses/>.
- *
- *
+ *
+ *
* Coded by:
* Diego Fabregat-Traver (fabregat at aices.rwth-aachen.de)
*/
@@ -34,37 +34,37 @@
*/
typedef struct
{
- // Problem dimensions
- size_t n;
- size_t wXL;
+ // Problem dimensions
+ size_t n;
+ size_t wXL;
- // Data to fit
- double *Phi;
- double *X;
- double *Y;
- double sigma;
+ // Data to fit
+ double *Phi;
+ double *X;
+ double *Y;
+ double sigma;
- // Precomputed values
- //
- // Z are the eigenvectors of Phi
- // W are the eigenvalues of Phi
- double *Z;
- double *W;
- double *ZtX;
- double *ZtY;
+ // Precomputed values
+ //
+ // Z are the eigenvectors of Phi
+ // W are the eigenvalues of Phi
+ double *Z;
+ double *W;
+ double *ZtX;
+ double *ZtY;
- // computed estimates
- double h;
- double res_sigma;
- double *beta;
+ // computed estimates
+ double h;
+ double res_sigma;
+ double *beta;
} estimates_eig_t;
void estimates_eig( FGLS_config_t *cf );
double polygenic_REML_logLik_eig_wrapper ( double h, void *data );
double polygenic_REML_logLik_eig(
int n, int widthXL,
- double *X, double *Y,
- double *Z, double *W, double *ZtX, double *ZtY,
+ double *X, double *Y,
+ double *Z, double *W, double *ZtX, double *ZtY,
double sigma2, double h2,
double *loglik, double *res_sigma, double *beta
);
Modified: pkg/OmicABEL/src/blas.h
===================================================================
--- pkg/OmicABEL/src/blas.h 2013-11-18 22:31:03 UTC (rev 1394)
+++ pkg/OmicABEL/src/blas.h 2013-11-18 23:17:22 UTC (rev 1395)
@@ -3,21 +3,21 @@
* All rights reserved.
*
* This file is part of OmicABEL.
- *
+ *
* OmicABEL is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* OmicABEL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with OmicABEL. If not, see <http://www.gnu.org/licenses/>.
- *
- *
+ *
+ *
* Coded by:
* Diego Fabregat-Traver (fabregat at aices.rwth-aachen.de)
*/
@@ -48,21 +48,21 @@
* BLAS 2
*/
-extern void dgemv_( char *trans,
- int *m, int *n,
- double *alpha, double *A, int *ldA, double *x, int *incx,
+extern void dgemv_( char *trans,
+ int *m, int *n,
+ double *alpha, double *A, int *ldA, double *x, int *incx,
double *beta, double *y, int *incy );
extern void dgbmv_( char *trans,
- int *m, int *n, int *kl, int *ku,
- double *alpha, double *A, int *ldA, double *x, int *incx,
+ int *m, int *n, int *kl, int *ku,
+ double *alpha, double *A, int *ldA, double *x, int *incx,
double *beta, double *y, int *incy );
extern void dsymv_( char *uplo,
int *n,
- double *alpha, double *A, int *ldA, double *x, int *incx,
+ double *alpha, double *A, int *ldA, double *x, int *incx,
double *beta, double *y, int *incy );
extern void dsbmv_( char *uplo,
int *n, int *k,
- double *alpha, double *A, int *ldA, double *x, int *incx,
+ double *alpha, double *A, int *ldA, double *x, int *incx,
double *beta, double *y, int *incy );
extern void dhpmv_( char *uplo,
int *n,
@@ -88,24 +88,24 @@
double *AP, double *x, int *incx );
extern void dger_ ( int *m, int *n,
- double *alpha, double *x, int *incx,
- double *y, int *incy,
+ double *alpha, double *x, int *incx,
+ double *y, int *incy,
double *A, int *ldA );
extern void dsyr_ ( char *uplo,
- int *n,
+ int *n,
double *alpha, double *x, int *incx,
double *A, int *ldA );
extern void dspr_ ( char *uplo,
- int *n,
+ int *n,
double *alpha, double *x, int *incx,
double *AP );
extern void dsyr2_( char *uplo,
- int *n,
+ int *n,
double *alpha, double *x, int *incx,
double *y, int *incy,
double *A, int *ldA );
extern void dspr2_( char *uplo,
- int *n,
+ int *n,
double *alpha, double *x, int *incx,
double *y, int *incy,
double *AP );
@@ -114,29 +114,29 @@
* BLAS 3
*/
-extern void dgemm_( char *transA, char *transB,
- int *m, int *n, int *k,
- double *alpha, double *A, int *ldA, double *B, int *ldB,
+extern void dgemm_( char *transA, char *transB,
+ int *m, int *n, int *k,
+ double *alpha, double *A, int *ldA, double *B, int *ldB,
double *beta, double *C, int *ldC );
-extern void dsymm_( char *side, char *uplo,
- int *m, int *n,
- double *alpha, double *A, int *ldA, double *B, int *ldB,
+extern void dsymm_( char *side, char *uplo,
+ int *m, int *n,
+ double *alpha, double *A, int *ldA, double *B, int *ldB,
double *beta, double *C, int *ldC );
-extern void dsyrk_( char *uplo, char *trans,
- int *n, int *k,
+extern void dsyrk_( char *uplo, char *trans,
+ int *n, int *k,
double *alpha, double *A, int *ldA,
double *beta, double *C, int *ldC );
-extern void dsyr2k_( char *uplo, char *trans,
- int *n, int *k,
- double *alpha, double *A, int *ldA, double *B, int *ldB,
+extern void dsyr2k_( char *uplo, char *trans,
+ int *n, int *k,
+ double *alpha, double *A, int *ldA, double *B, int *ldB,
double *beta, double *C, int *ldC );
-extern void dtrmm_(char *side, char *uplo, char *transA, char *diag,
- int *m, int *n,
- double *alpha, double *A, int *ldA,
+extern void dtrmm_(char *side, char *uplo, char *transA, char *diag,
+ int *m, int *n,
+ double *alpha, double *A, int *ldA,
double *B, int *ldB);
-extern void dtrsm_(char *side, char *uplo, char *transA, char *diag,
- int *m, int *n,
- double *alpha, double *A, int *ldA,
+extern void dtrsm_(char *side, char *uplo, char *transA, char *diag,
+ int *m, int *n,
+ double *alpha, double *A, int *ldA,
double *B, int *ldB);
#endif // __BLAS_H
Modified: pkg/OmicABEL/src/fgls_eigen.h
===================================================================
--- pkg/OmicABEL/src/fgls_eigen.h 2013-11-18 22:31:03 UTC (rev 1394)
+++ pkg/OmicABEL/src/fgls_eigen.h 2013-11-18 23:17:22 UTC (rev 1395)
@@ -3,21 +3,21 @@
* All rights reserved.
*
* This file is part of OmicABEL.
- *
+ *
* OmicABEL is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* OmicABEL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with OmicABEL. If not, see <http://www.gnu.org/licenses/>.
- *
- *
+ *
+ *
* Coded by:
* Diego Fabregat-Traver (fabregat at aices.rwth-aachen.de)
*/
@@ -38,29 +38,29 @@
//
// One of this structure is needed per thread
typedef struct {
- // Temporary
+ // Temporary
double *alpha; // sigma2 * h
double *beta; // sigma2 * ( 1 - h )
double *Winv; // Inverse of the shifted eigenvalues
- double *XR_copy; // Blocks of XR are reused across the a block of Ys
+ double *XR_copy; // Blocks of XR are reused across the a block of Ys
double *XL_copy; // Same for XL
double *B_t; // Fixed top part of B
double *V_tl; // Fixed top-left part of V
-
- double *oneB;
- double *oneV;
- // Double buffering
- double_buffering db_XR;
- double_buffering db_Y;
- double_buffering db_B;
+ double *oneB;
+ double *oneV;
+
+ // Double buffering
+ double_buffering db_XR;
+ double_buffering db_Y;
+ double_buffering db_B;
// double_buffering db_V;
// Configuration
FGLS_config_t *cf;
- // Thread id
+ // Thread id
int id;
} eigen_loops_t;
Modified: pkg/OmicABEL/src/lapack.h
===================================================================
--- pkg/OmicABEL/src/lapack.h 2013-11-18 22:31:03 UTC (rev 1394)
+++ pkg/OmicABEL/src/lapack.h 2013-11-18 23:17:22 UTC (rev 1395)
@@ -3,21 +3,21 @@
* All rights reserved.
*
* This file is part of OmicABEL.
- *
+ *
* OmicABEL is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* OmicABEL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with OmicABEL. If not, see <http://www.gnu.org/licenses/>.
- *
- *
+ *
+ *
* Coded by:
* Diego Fabregat-Traver (fabregat at aices.rwth-aachen.de)
*/
@@ -26,27 +26,27 @@
#define __LAPACK_H
/* Cholesky */
-extern void dpotrf_(char *uplo,
- int *n, double *A, int *ldA,
+extern void dpotrf_(char *uplo,
+ int *n, double *A, int *ldA,
int *info);
-extern void dpotri_(char *uplo,
- int *n, double *A, int *ldA,
+extern void dpotri_(char *uplo,
+ int *n, double *A, int *ldA,
int *info);
/* Triangular inverse */
-extern void dtrtri_(char *uplo, char *diag,
- int *n, double *A, int *ldA,
+extern void dtrtri_(char *uplo, char *diag,
+ int *n, double *A, int *ldA,
int *info);
-extern void dtrti2_(char *uplo, char *diag,
- int *n, double *A, int *ldA,
+extern void dtrti2_(char *uplo, char *diag,
+ int *n, double *A, int *ldA,
int *info);
-/*
+/*
* One/Frobenius/Infinity norm or
* Largest Absolute Value
*/
-extern double dlange_(char *norm,
+extern double dlange_(char *norm,
int *m, int *n, double *A, int *ldA,
double *work);
@@ -57,9 +57,9 @@
* A*x=(lambda)*B*x, A*Bx=(lambda)*x, or B*A*x=(lambda)*x,
* where symm(A) and SPD(B)
*/
-extern void dsygvd_( int *itype, char *jobz, char *uplo,
+extern void dsygvd_( int *itype, char *jobz, char *uplo,
int *n, double *A, int *ldA, double *B, int *ldB,
- double *W, double *work, int *lwork, double *iwork, int *liwork,
+ double *W, double *work, int *lwork, double *iwork, int *liwork,
int *info );
/*
* Reduction of a real symmetric-definite generalized eigenproblem
@@ -75,36 +75,36 @@
/*
* Eigendecomposition of a real symmetric matrix
*/
-extern void dsyevd_( char *jobz, char *uplo,
- int *n, double *A, int *lda,
- double *W, double *work, int *lwork, int *iwork, int *liwork,
+extern void dsyevd_( char *jobz, char *uplo,
+ int *n, double *A, int *lda,
+ double *W, double *work, int *lwork, int *iwork, int *liwork,
int *info );
/*
* Eigendecomposition of a real symmetric matrix
*/
-extern void dsyevr_(char *jobz, char *range, char *uplo,
- int *n, double *A, int *ldA,
+extern void dsyevr_(char *jobz, char *range, char *uplo,
+ int *n, double *A, int *ldA,
double *vl, double *vu, int *il, int *iu,
- double *abstol, int *m, double *W, double *Z, int *ldZ, int *isuppz,
+ double *abstol, int *m, double *W, double *Z, int *ldZ, int *isuppz,
double *work, int *lwork, int *iwork, int *liwork,
int *info);
/*
* Solution to a real system of linear equations A * X = B,
* where symm(A)
*/
-extern void dsysv_(char *uplo,
- int *n, int *nrhs, double *A, int *ldA, int *ipiv,
- double *B, int *ldB, double *work, int *lwork,
+extern void dsysv_(char *uplo,
+ int *n, int *nrhs, double *A, int *ldA, int *ipiv,
+ double *B, int *ldB, double *work, int *lwork,
int *info);
-extern void dsytrs_( char *uplo,
- int *n, int *nrhs, double *A, int *lda, int *ipiv,
- double *B, int *ldb, int *info );
+extern void dsytrs_( char *uplo,
+ int *n, int *nrhs, double *A, int *lda, int *ipiv,
+ double *B, int *ldb, int *info );
/*
* Solution to a real SPD system of linear equations A * X = B ( SPD(A) )
*/
-extern void dposv_(char *uplo,
+extern void dposv_(char *uplo,
int *n, int *nrhs, double *A, int *ldA,
double *B, int *ldB,
int *info);
@@ -147,6 +147,6 @@
double *A, int *lda,
double *tau, double *C, int *ldc,
double *work, int *lwork, int *info );
-
+
#endif // __LAPACK_H
More information about the Genabel-commits
mailing list