summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/gengen
diff options
context:
space:
mode:
authorMartin Braun2012-06-21 22:45:29 -0400
committerTom Rondeau2012-06-21 22:45:29 -0400
commit95ac58a5a2dabef619865720e9b3f6a20941a252 (patch)
tree7d75c0a473d9e0d0c0e93601d8dd98ac48674713 /gnuradio-core/src/lib/gengen
parentdb360e476e62d2c412d1654065d18047a25490b8 (diff)
downloadgnuradio-95ac58a5a2dabef619865720e9b3f6a20941a252.tar.gz
gnuradio-95ac58a5a2dabef619865720e9b3f6a20941a252.tar.bz2
gnuradio-95ac58a5a2dabef619865720e9b3f6a20941a252.zip
core: tiny performance boost, and it looks tidier.
Diffstat (limited to 'gnuradio-core/src/lib/gengen')
-rw-r--r--gnuradio-core/src/lib/gengen/gr_sig_source_X.cc.t7
1 files changed, 3 insertions, 4 deletions
diff --git a/gnuradio-core/src/lib/gengen/gr_sig_source_X.cc.t b/gnuradio-core/src/lib/gengen/gr_sig_source_X.cc.t
index bdd0e810a..6959eac82 100644
--- a/gnuradio-core/src/lib/gengen/gr_sig_source_X.cc.t
+++ b/gnuradio-core/src/lib/gengen/gr_sig_source_X.cc.t
@@ -29,6 +29,7 @@
#include <algorithm>
#include <gr_io_signature.h>
#include <stdexcept>
+#include <algorithm>
#include <gr_complex.h>
@@ -64,8 +65,7 @@ int
case GR_CONST_WAVE:
t = (gr_complex) d_ampl + d_offset;
- for (int i = 0; i < noutput_items; i++) // FIXME unroll
- optr[i] = t;
+ std::fill_n(optr, noutput_items, t);
break;
case GR_SIN_WAVE:
@@ -142,8 +142,7 @@ int
case GR_CONST_WAVE:
t = (@TYPE@) d_ampl + d_offset;
- for (int i = 0; i < noutput_items; i++) // FIXME unroll
- optr[i] = t;
+ std::fill_n(optr, noutput_items, t);
break;
case GR_SIN_WAVE: