summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rondeau2012-01-19 22:22:49 -0500
committerTom Rondeau2012-01-19 22:22:49 -0500
commit976350d892b04f5d7cc4bf939f9cbf502206a476 (patch)
tree3af1b3a2a73e36559915c4ccb44836e4a682ab0c
parent28990966c67d640c857957c471fad916f0d8a829 (diff)
parentd2ff8e3438c83876bdcc587a76b40c7a4281d3c6 (diff)
downloadgnuradio-976350d892b04f5d7cc4bf939f9cbf502206a476.tar.gz
gnuradio-976350d892b04f5d7cc4bf939f9cbf502206a476.tar.bz2
gnuradio-976350d892b04f5d7cc4bf939f9cbf502206a476.zip
Merge branch 'master' into next
-rw-r--r--cmake/Modules/GrSwig.cmake13
-rw-r--r--docs/doxygen/swig_doc.py76
-rw-r--r--gnuradio-core/src/lib/general/gr_fft_vcc_fftw.cc13
3 files changed, 79 insertions, 23 deletions
diff --git a/cmake/Modules/GrSwig.cmake b/cmake/Modules/GrSwig.cmake
index ced8b16c8..4bcd67eb9 100644
--- a/cmake/Modules/GrSwig.cmake
+++ b/cmake/Modules/GrSwig.cmake
@@ -67,23 +67,16 @@ function(GR_SWIG_MAKE_DOCS output_file)
#call doxygen on the Doxyfile + input headers
add_custom_command(
OUTPUT ${OUTPUT_DIRECTORY}/xml/index.xml
+ ${OUTPUT_DIRECTORY}/xml/combine.xslt
DEPENDS ${input_files} ${GR_SWIG_DOCS_SOURCE_DEPS} ${tag_deps}
COMMAND ${DOXYGEN_EXECUTABLE} ${OUTPUT_DIRECTORY}/Doxyfile
COMMENT "Generating doxygen xml for ${name} docs"
)
- #call sync if we can to flush the doxygen writes to file before python reads
- find_program(SYNC_EXECUTABLE sync)
- unset(sync_command)
- if(SYNC_EXECUTABLE)
- set(sync_command COMMAND ${SYNC_EXECUTABLE})
- endif()
-
#call the swig_doc script on the xml files
add_custom_command(
- OUTPUT ${output_file}
- DEPENDS ${input_files} ${OUTPUT_DIRECTORY}/xml/index.xml
- ${sync_command}
+ OUTPUT ${output_file}
+ DEPENDS ${input_files} ${stamp-file} ${OUTPUT_DIRECTORY}/xml/index.xml
COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
${CMAKE_SOURCE_DIR}/docs/doxygen/swig_doc.py
${OUTPUT_DIRECTORY}/xml
diff --git a/docs/doxygen/swig_doc.py b/docs/doxygen/swig_doc.py
index 5034099e3..4148a546b 100644
--- a/docs/doxygen/swig_doc.py
+++ b/docs/doxygen/swig_doc.py
@@ -27,7 +27,7 @@ python docstrings.
"""
-import sys
+import sys, time
try:
from doxyxml import DoxyIndex, DoxyClass, DoxyFriend, DoxyFunction, DoxyFile, base
@@ -193,15 +193,49 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None):
output.append(custom_output)
# Create docstrings for the blocks.
- blocks = di.in_category(Block)
+ tries = 0
+ while(1):
+ try:
+ blocks = di.in_category(Block)
+ except:
+ if(tries < 3):
+ # May not be built just yet; sleep and try again
+ sys.stderr.write("XML parsing problem with file {0}, retrying.\n".format(
+ swigdocfilename))
+ time.sleep(1)
+ tries += 1
+ else:
+ # if we've given it three tries, give up and raise an error
+ sys.stderr.write("XML parsing error with file {0}. giving up.\n".format(
+ swigdocfilename))
+ raise
+ else:
+ break
+
make_funcs = set([])
for block in blocks:
- try:
- make_func = di.get_member(make_name(block.name()), DoxyFunction)
- make_funcs.add(make_func.name())
- output.append(make_block_entry(di, block))
- except block.ParsingError:
- print('Parsing error for block %s' % block.name())
+ tries = 0
+ while(1):
+ try:
+ make_func = di.get_member(make_name(block.name()), DoxyFunction)
+ make_funcs.add(make_func.name())
+ output.append(make_block_entry(di, block))
+ except block.ParsingError:
+ sys.stderr.write('Parsing error for block {0}'.format(block.name()))
+ except:
+ if(tries < 3):
+ # May not be built just yet; sleep and try again
+ sys.stderr.write("XML parsing problem with file {0}, retrying.\n".format(
+ swigdocfilename))
+ time.sleep(1)
+ tries += 1
+ else:
+ # if we've given it three tries, give up and raise an error
+ sys.stderr.write("XML parsing error with file {0}. giving up.\n".format(
+ swigdocfilename))
+ raise
+ else:
+ break
# Create docstrings for functions
# Don't include the make functions since they have already been dealt with.
@@ -210,7 +244,7 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None):
try:
output.append(make_func_entry(f))
except f.ParsingError:
- print('Parsing error for function %s' % f.name())
+ sys.stderr.write('Parsing error for function {0}'.format(f.name()))
# Create docstrings for classes
block_names = [block.name() for block in blocks]
@@ -219,7 +253,7 @@ def make_swig_interface_file(di, swigdocfilename, custom_output=None):
try:
output.append(make_class_entry(k))
except k.ParsingError:
- print('Parsing error for class %s' % k.name())
+ sys.stderr.write('Parsing error for class {0}'.format(k.name()))
# Docstrings are not created for anything that is not a function or a class.
# If this excludes anything important please add it here.
@@ -250,4 +284,24 @@ if __name__ == "__main__":
custom_output = "\n\n".join(output)
# Generate the docstrings interface file.
- make_swig_interface_file(di, swigdocfilename, custom_output=custom_output)
+ # If parsing error on NoSuchMember, try again by rereading everything.
+ # Give up after 3 tries.
+ tries = 0
+ while(1):
+ try:
+ make_swig_interface_file(di, swigdocfilename, custom_output=custom_output)
+ except:
+ if(tries < 3):
+ # May not be built just yet; sleep and try again
+ sys.stderr.write("XML parsing problem with file {0}, retrying.\n".format(
+ swigdocfilename))
+ time.sleep(1)
+ tries += 1
+ else:
+ # if we've given it three tries, give up and raise an error
+ sys.stderr.write("XML parsing error with file {0}. giving up.\n".format(
+ swigdocfilename))
+ raise
+ else:
+ break
+
diff --git a/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.cc b/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.cc
index 3293e3ab8..c66015c11 100644
--- a/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.cc
+++ b/gnuradio-core/src/lib/general/gr_fft_vcc_fftw.cc
@@ -67,8 +67,17 @@ gr_fft_vcc_fftw::work (int noutput_items,
if (d_window.size()){
gr_complex *dst = d_fft->get_inbuf();
- for (unsigned int i = 0; i < d_fft_size; i++) // apply window
- dst[i] = in[i] * d_window[i];
+ if(!d_forward && d_shift){
+ int offset = (!d_forward && d_shift)?floor(d_fft_size/2):0;
+ int fft_m_offset = d_fft_size - offset;
+ for (unsigned int i = 0; i < offset; i++) // apply window
+ dst[i+fft_m_offset] = in[i] * d_window[i];
+ for (unsigned int i = offset; i < d_fft_size; i++) // apply window
+ dst[i-offset] = in[i] * d_window[i];
+ } else {
+ for (unsigned int i = 0; i < d_fft_size; i++) // apply window
+ dst[i] = in[i] * d_window[i];
+ }
}
else {
if(!d_forward && d_shift) { // apply an ifft shift on the data