aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Morman <jmorman@perspectalabs.com>2019-08-04 22:26:30 -0400
committerMarcus Müller <marcus@hostalia.de>2019-08-05 16:06:02 +0200
commit0f1bee72674b94d332f01128a57bb882b7de5f8f (patch)
treeb2ea7faa83a4656cc3856e8e6347d453df7e62d9
parentuhd: Create compatibility layer for future UHD versions (diff)
downloadgnuradio-0f1bee72674b94d332f01128a57bb882b7de5f8f.tar.xz
gnuradio-0f1bee72674b94d332f01128a57bb882b7de5f8f.zip
blocks: fix multiply matrix complex set_A (3.7)
The multiply_matrix_cc block was converting the values from the set matrix to double when new_A matrix was expecting complex. Convert the PMT to complex instead. Without this fix, sending complex matrices to the multiply matrix block results in an exception Backport to 3.7
-rw-r--r--gr-blocks/lib/multiply_matrix_cc_impl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gr-blocks/lib/multiply_matrix_cc_impl.cc b/gr-blocks/lib/multiply_matrix_cc_impl.cc
index 15fc0fc81..f2546e10f 100644
--- a/gr-blocks/lib/multiply_matrix_cc_impl.cc
+++ b/gr-blocks/lib/multiply_matrix_cc_impl.cc
@@ -159,7 +159,7 @@ namespace gr {
return;
}
for (size_t k = 0; k < pmt::length(row); k++) {
- new_A[i][k] = pmt::to_double(pmt::is_vector(row) ? pmt::vector_ref(row, k) : pmt::tuple_ref(row, k));
+ new_A[i][k] = pmt::to_complex(pmt::is_vector(row) ? pmt::vector_ref(row, k) : pmt::tuple_ref(row, k));
}
} else if (pmt::is_c32vector(row)) {
size_t row_len = 0;