[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 12/17: gr-fec, LDPC: use mult_matrices_mod2
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 12/17: gr-fec, LDPC: use mult_matrices_mod2 function |
Date: |
Thu, 14 Apr 2016 20:43:05 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch maint
in repository gnuradio.
commit 01556fdd8473d1617144d79bb6dd99606326d223
Author: tracierenea <address@hidden>
Date: Thu Apr 7 13:23:09 2016 -0500
gr-fec, LDPC: use mult_matrices_mod2 function
Replace these lines using GSL to perform the matrix multiplication with a
call to the mult_matrices_mod2 function, just to be concise.
---
gr-fec/lib/fec_mtrx_impl.cc | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/gr-fec/lib/fec_mtrx_impl.cc b/gr-fec/lib/fec_mtrx_impl.cc
index 88027ff..d4b0ac0 100644
--- a/gr-fec/lib/fec_mtrx_impl.cc
+++ b/gr-fec/lib/fec_mtrx_impl.cc
@@ -465,22 +465,13 @@ namespace gr {
// product of original_matrix and the inverse, which should
// equal the identity matrix.
gsl_matrix *test = gsl_matrix_alloc(n,n);
- gsl_blas_dgemm (CblasNoTrans, CblasNoTrans, 1.0,
- original_matrix, matrix_inverse, 0.0, test);
-
- // Have to take care of % 2 manually
- for (row_index = 0; row_index < n; row_index++) {
- for (col_index = 0; col_index < n; col_index++) {
- int value = gsl_matrix_get(test, row_index, col_index);
- int temp_value = value % 2;
- gsl_matrix_set(test, row_index, col_index, temp_value);
- }
- }
+ mult_matrices_mod2(test, original_matrix, matrix_inverse);
gsl_matrix *identity = gsl_matrix_alloc(n,n);
gsl_matrix_set_identity(identity);
//int test_if_equal = gsl_matrix_equal(identity,test);
gsl_matrix_sub(identity, test); // should be null set if equal
+
double test_if_not_equal = gsl_matrix_max(identity);
if(test_if_not_equal > 0) {
- [Commit-gnuradio] [gnuradio] branch maint updated (b7da9af -> bc60fdb), git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 05/17: gr-fec: LDPC python function - making a better docstring, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 11/17: gr-fec, LDPC: correct the name of the python function called, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 08/17: gr-fec: free memory for G matrix at end of constructor, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 12/17: gr-fec, LDPC: use mult_matrices_mod2 function,
git <=
- [Commit-gnuradio] [gnuradio] 04/17: gr-fec: LDPC python function - addressing an attribute error, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 06/17: gr-fec: LDPC python - adding a handy function, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 09/17: gr-fec: free memory for info word in LDPC gen mtrx encoder, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 10/17: gr-fec: free memory used for the LDPC H matrix in the destructor, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 02/17: gr-fec: LDPC python function - addressing an "undefined" error, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 14/17: float(version) doesn't work with "1.9.0"; fixed nx version checking, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 17/17: Merge remote-tracking branch 'tracierenea/fec_ldpc_H_fix' into maint, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 01/17: gr-fec: Fix memory allocation issue during encoding., git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 13/17: grc: update year in copyright, git, 2016/04/14
- [Commit-gnuradio] [gnuradio] 16/17: Merge remote-tracking branch 'mmueller/fix_networkx_version_checking' into maint, git, 2016/04/14