diff options
author | Tim O'Shea <tim.oshea753@gmail.com> | 2015-04-20 19:26:29 -0400 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2015-04-21 19:48:50 -0700 |
commit | e61a5c86d005af6fc91281e9fb43c374272c14cd (patch) | |
tree | a1ff4be0dd384770b74a4f8c7bb1f466f638221c | |
parent | d972bc9009311890e21643fd858ac03ae5a94a77 (diff) |
pmt: use memcpy in uniform vector initializer for speed increase
-rw-r--r-- | gnuradio-runtime/lib/pmt/unv_template.cc.t | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/pmt/unv_template.cc.t b/gnuradio-runtime/lib/pmt/unv_template.cc.t index d3fa14bee1..c9402de19d 100644 --- a/gnuradio-runtime/lib/pmt/unv_template.cc.t +++ b/gnuradio-runtime/lib/pmt/unv_template.cc.t @@ -21,8 +21,7 @@ pmt_@TAG@vector::pmt_@TAG@vector(size_t k, @TYPE@ fill) pmt_@TAG@vector::pmt_@TAG@vector(size_t k, const @TYPE@ *data) : d_v(k) { - for (size_t i = 0; i < k; i++) - d_v[i] = data[i]; + memcpy( &d_v[0], data, k * sizeof(@TYPE@) ); } @TYPE@ |