diff options
author | Pjotr Prins | 2020-10-01 09:57:34 +0100 |
---|---|---|
committer | Pjotr Prins | 2020-10-01 09:57:34 +0100 |
commit | 40a9d521f4ecc9d4762a5f8c1953ec5f321755f0 (patch) | |
tree | 2215dc71fdf994ea30c5ec00be3e91f65ae58228 /src/lmm.cpp | |
parent | 85272f8d045e9ecb0a72ad5b2738eb135708bb01 (diff) | |
download | pangemma-40a9d521f4ecc9d4762a5f8c1953ec5f321755f0.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); |