parsevect fixes
This commit is contained in:
parent
4887b3ff91
commit
cf98fce94b
3 changed files with 22 additions and 13 deletions
4
Makefile
4
Makefile
|
@ -44,7 +44,7 @@ all: clean-vect
|
|||
@echo Auto-detected optimization parameters: $(PARAMS_SIMD)
|
||||
@echo
|
||||
c99 $(PARAMS_LOOPVECT) $(PARAMS_SIMD) $(LIBSOURCES) $(PARAMS_LIBS) $(PARAMS_MISC) -fpic -shared -o libcsdr.so
|
||||
-./parsevect dumpvect*.vect libcsdr.c
|
||||
-./parsevect dumpvect*.vect
|
||||
c99 $(PARAMS_LOOPVECT) $(PARAMS_SIMD) csdr.c $(PARAMS_LIBS) -L. -lcsdr $(PARAMS_MISC) -o csdr
|
||||
arm-cross: clean-vect
|
||||
#note: this doesn't work since having added FFTW
|
||||
|
@ -52,7 +52,7 @@ arm-cross: clean-vect
|
|||
clean-vect:
|
||||
rm -f dumpvect*.vect
|
||||
clean: clean-vect
|
||||
rm libcsdr.so csdr
|
||||
rm -f libcsdr.so csdr
|
||||
install:
|
||||
install -m 0755 libcsdr.so /usr/lib
|
||||
install -m 0755 csdr /usr/bin
|
||||
|
|
|
@ -324,7 +324,7 @@ E.g. you can send `-0.05 0.02\n`
|
|||
|
||||
#### Testbench
|
||||
|
||||
`csdr` was tested with GNU Radio Companion flowgraphs. These flowgraphs are available under the directory `grc_tests`, and they require the `gr-ha5kfu` set of blocks for GNU Radio.
|
||||
`csdr` was tested with GNU Radio Companion flowgraphs. These flowgraphs are available under the directory `grc_tests`, and they require the <a href="https://github.com/simonyiszk/gr-ha5kfu">gr-ha5kfu</a> set of blocks for GNU Radio.
|
||||
|
||||
## [Licensing] (#licensing)
|
||||
|
||||
|
|
11
parsevect
11
parsevect
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/python2
|
||||
print "" # python2.7 is required to run parsevect instead of python3
|
||||
"""
|
||||
This software is part of libcsdr, a set of simple DSP routines for
|
||||
Software Defined Radio.
|
||||
|
@ -30,6 +31,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
try:
|
||||
vectfile=open(sys.argv[1],"r").readlines()
|
||||
|
@ -58,10 +60,17 @@ Colors:
|
|||
\033[1;0m"""
|
||||
|
||||
checkline = lambda k: cfile[linenum-k] if "//@" in cfile[linenum-k] else corresponds
|
||||
fallback=False
|
||||
|
||||
for row in vectfile:
|
||||
if "LOOP VECTORIZED" in row or "not vectorized" in row:
|
||||
filename=row.split(":")[0]
|
||||
if not fallback and not os.path.isfile(filename):
|
||||
print "parsevect: Log format mismatch (perhaps gcc version is older than 4.8.2). Comments and colors will not be matched to rows."
|
||||
fallback = True
|
||||
if fallback:
|
||||
print row[:-1]
|
||||
else:
|
||||
loadcfile(filename)
|
||||
linenum=int(row.split(":")[1])
|
||||
corresponds="//@"
|
||||
|
|
Loading…
Reference in a new issue