summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/block_executor.cc
diff options
context:
space:
mode:
authorAndrej Rode <mail@andrejro.de>2018-10-16 14:02:04 +0200
committerMartin Braun <martin.braun@ettus.com>2018-11-13 16:34:19 -0800
commitbb37f8a8dd4ec47be55611f1dcd79a75fc78fa9b (patch)
tree780c7f8ef49a0fb90e7a3318a987f64b700d66a5 /gnuradio-runtime/lib/block_executor.cc
parent7336853c1903ffd8d30d11df7b6a3aa59794c275 (diff)
runtime: circumvent long long, uint64_t problems on 32-bit archs
C++ bindings for MPIR/GMP don't provide conversion for uint64_t, also known as "long long" on 32-bit architectures. Using the underlying (GMP/MPIR) C library directly allows usage of these types.
Diffstat (limited to 'gnuradio-runtime/lib/block_executor.cc')
-rw-r--r--gnuradio-runtime/lib/block_executor.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/block_executor.cc b/gnuradio-runtime/lib/block_executor.cc
index 6152ff6765..5f9552415a 100644
--- a/gnuradio-runtime/lib/block_executor.cc
+++ b/gnuradio-runtime/lib/block_executor.cc
@@ -146,7 +146,8 @@ namespace gr {
mpz_class offset;
for(t = rtags.begin(); t != rtags.end(); t++) {
tag_t new_tag = *t;
- offset = new_tag.offset * mp_rrate + one_half;
+ mpz_import(offset.get_mpz_t(), 1, 1, sizeof(new_tag.offset), 0, 0, &new_tag.offset);
+ offset *= mp_rrate + one_half;
new_tag.offset = offset.get_ui();
for(int o = 0; o < d->noutputs(); o++)
out_buf[o]->add_item_tag(new_tag);
@@ -188,7 +189,8 @@ namespace gr {
mpz_class offset;
for(t = rtags.begin(); t != rtags.end(); t++) {
tag_t new_tag = *t;
- offset = new_tag.offset * mp_rrate + one_half;
+ mpz_import(offset.get_mpz_t(), 1, 1, sizeof(new_tag.offset), 0, 0, &new_tag.offset);
+ offset *= mp_rrate + one_half;
new_tag.offset = offset.get_ui();
out_buf->add_item_tag(new_tag);
}