diff options
author | Pjotr Prins | 2020-10-01 09:57:34 +0100 |
---|---|---|
committer | Pjotr Prins | 2020-11-29 08:50:44 +0000 |
commit | b298c466171006dfb1196c74d7017d0dc8e45492 (patch) | |
tree | 5c532828ffe437536ec1b8ba7c916efe2c17ceb5 /src/lmm.cpp | |
parent | 1a431e1319e2ff3855f8617f446a33a3f931bad6 (diff) | |
download | pangemma-b298c466171006dfb1196c74d7017d0dc8e45492.tar.gz |
These variables are introduced in DEBUG mode
Diffstat (limited to 'src/lmm.cpp')
-rw-r--r-- | src/lmm.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/lmm.cpp b/src/lmm.cpp index 6337116..5e53fa2 100644 --- a/src/lmm.cpp +++ b/src/lmm.cpp @@ -277,9 +277,9 @@ Iterating through a dataset Hi_eval differs and Uab (last row) void CalcPab(const size_t n_cvt, const size_t e_mode, const gsl_vector *Hi_eval, const gsl_matrix *Uab, const gsl_vector *unused, gsl_matrix *Pab) { - - // size_t n_index = (n_cvt + 2 + 1) * (n_cvt + 2) / 2; // result size - // auto ni_test = Uab->size1; // inds +#if !defined NDEBUG + size_t n_index = (n_cvt + 2 + 1) * (n_cvt + 2) / 2; // result size + auto ni_test = Uab->size1; // inds assert(Uab->size1 == Hi_eval->size); assert(Uab->size2 == n_index); @@ -287,6 +287,7 @@ void CalcPab(const size_t n_cvt, const size_t e_mode, const gsl_vector *Hi_eval, assert(Pab->size2 == n_index); assert(Hi_eval->size == ni_test); // assert(ab->size == n_index); +#endif // DEBUG // compute Hi_eval (inds) * Uab (inds x n_index) * ab (n_index) and return in Pab (cvt x n_index). @@ -593,8 +594,9 @@ $7 = 3 $8 = 6 */ - // auto Uab = p->Uab; - // auto ab = p->ab; +#if !defined NDEBUG + auto Uab = p->Uab; + auto ab = p->ab; assert(n_index == (n_cvt + 2 + 1) * (n_cvt + 2) / 2); assert(Uab->size1 == ni_test); assert(Uab->size2 == n_index); // n_cvt == 1 -> n_index == 6? @@ -606,6 +608,7 @@ $8 = 6 assert(p->e_mode == 0); assert(Hi_eval->size == ni_test); +#endif // DEBUG CalcPab(n_cvt, p->e_mode, Hi_eval, p->Uab, p->ab, Pab); CalcPPab(n_cvt, p->e_mode, HiHi_eval, p->Uab, p->ab, Pab, PPab); |