[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/08: volk: add/remove ORC protokernels in
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/08: volk: add/remove ORC protokernels in volk_modtool |
Date: |
Fri, 7 Mar 2014 00:24:06 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 05161c9f48acf448d31abd88a5378608213e3574
Author: Nathan West <address@hidden>
Date: Sun Feb 9 21:24:40 2014 -0600
volk: add/remove ORC protokernels in volk_modtool
---
volk/python/volk_modtool/volk_modtool_generate.py | 24 +++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/volk/python/volk_modtool/volk_modtool_generate.py
b/volk/python/volk_modtool/volk_modtool_generate.py
index 80c2aed..637d489 100644
--- a/volk/python/volk_modtool/volk_modtool_generate.py
+++ b/volk/python/volk_modtool/volk_modtool_generate.py
@@ -20,6 +20,7 @@
#
import os
+import glob
import sys
import re
import glob
@@ -150,12 +151,24 @@ class volk_modtool:
newrelpath = re.sub(oldvolk, 'volk_' + self.my_dict['name'], relpath);
dest = os.path.join(self.my_dict['destination'], 'volk_' +
self.my_dict['name'], os.path.dirname(newrelpath), newname);
-
-
if not os.path.exists(os.path.dirname(dest)):
os.makedirs(os.path.dirname(dest))
open(dest, 'w+').write(outstring);
+ # copy orc proto-kernels if they exist
+ for orcfile in glob.glob(inpath + '/orc/' + top + name + '*.orc'):
+ if os.path.isfile(orcfile):
+ instring = open(orcfile, 'r').read();
+ outstring = re.sub(oldvolk, 'volk_' + self.my_dict['name'],
instring);
+ newname = 'volk_' + self.my_dict['name'] + '_' + name + '.orc';
+ relpath = os.path.relpath(orcfile, base);
+ newrelpath = re.sub(oldvolk, 'volk_' + self.my_dict['name'],
relpath);
+ dest = os.path.join(self.my_dict['destination'], 'volk_' +
self.my_dict['name'], os.path.dirname(newrelpath), newname);
+ if not os.path.exists(os.path.dirname(dest)):
+ os.makedirs(os.path.dirname(dest));
+ open(dest, 'w+').write(outstring)
+
+
def remove_kernel(self, name):
basename = self.my_dict['name'];
if len(basename) > 0:
@@ -215,6 +228,13 @@ class volk_modtool:
print "Removing kernel %s"%(kernel.pattern)
if os.path.exists(infile):
os.remove(infile);
+ # remove the orc proto-kernels if they exist. There are no puppets here
+ # so just need to glob for files matching kernel name
+ print glob.glob(inpath + '/orc/' + top + name + '*.orc');
+ for orcfile in glob.glob(inpath + '/orc/' + top + name + '*.orc'):
+ print orcfile
+ if(os.path.exists(orcfile)):
+ os.remove(orcfile);
def import_kernel(self, name, base):
if not (base):
- [Commit-gnuradio] [gnuradio] branch master updated (78551a5 -> ca69ec5), git, 2014/03/06
- [Commit-gnuradio] [gnuradio] 04/08: Merge branch 'maint', git, 2014/03/06
- [Commit-gnuradio] [gnuradio] 03/08: volk: add implicit true to profile's benchmark mode, git, 2014/03/06
- [Commit-gnuradio] [gnuradio] 02/08: volk: don't write to volk_config if using regex, git, 2014/03/06
- [Commit-gnuradio] [gnuradio] 05/08: volk: add regex option to profile, git, 2014/03/06
- [Commit-gnuradio] [gnuradio] 06/08: Merge remote-tracking branch 'nwest/volk_features', git, 2014/03/06
- [Commit-gnuradio] [gnuradio] 01/08: volk: add/remove ORC protokernels in volk_modtool,
git <=
- [Commit-gnuradio] [gnuradio] 08/08: Merge branch 'maint', git, 2014/03/06
- [Commit-gnuradio] [gnuradio] 07/08: volk: adds unaligned sse 32fc_32f_dot_prod_32fc, 16i_32fc_dot_prod_32fc, and 32fc_x2_dot_prod_16i proto-kernels., git, 2014/03/06