[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 03/03: pmt: use memcpy in uniform vector in
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 03/03: pmt: use memcpy in uniform vector initializer for speed increase |
Date: |
Wed, 22 Apr 2015 03:12:50 +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 e61a5c86d005af6fc91281e9fb43c374272c14cd
Author: Tim O'Shea <address@hidden>
Date: Mon Apr 20 19:26:29 2015 -0400
pmt: use memcpy in uniform vector initializer for speed increase
---
gnuradio-runtime/lib/pmt/unv_template.cc.t | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gnuradio-runtime/lib/pmt/unv_template.cc.t
b/gnuradio-runtime/lib/pmt/unv_template.cc.t
index d3fa14b..c9402de 100644
--- a/gnuradio-runtime/lib/pmt/unv_template.cc.t
+++ b/gnuradio-runtime/lib/pmt/unv_template.cc.t
@@ -21,8 +21,7 @@ address@hidden@vector::address@hidden@vector(size_t k, @TYPE@
fill)
address@hidden@vector::address@hidden@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@