Re: Gr-Specest: window not passed? [Solved]

Hi List,

I got the error: welch_impl.cc:83 std::vector window shadows the
variable with the same name (l. 81), albeit uninitialized, outside the
if case.

I will provide a pull request tonight.

Best regards

Stephan Ludwig

Robert Bosch GmbH
Corporate Sector Research & Advance Engineering, Communication
Technology (CR/AEH4)
Renningen
70465 Stuttgart
GERMANY

Tel. +49(711)811-8809
Fax +49(711)811-1052
Mobile +49(172)5630639
[email protected]

Registered Office: Stuttgart, Registration Court: Amtsgericht Stuttgart,
HRB 14000;
Chairman of the Supervisory Board: Franz Fehrenbach; Managing Directors:
Dr. Volkmar Denner,
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr.
Dirk Hoheisel, Christoph Kbel,
Uwe Raschke, Wolf-Henning Scheider, Dr. Werner Struth, Peter Tyroller

-----Ursprngliche Nachricht-----
Von: Ludwig Stephan (CR/AEH4)
Gesendet: Montag, 12. Januar 2015 15:17
An: [email protected]; ‘[email protected]
Betreff: Gr-Specest: window not passed?

Hello Moritz,
Hello List,

I might have found some unintended behaviour in gr-specest. I claim that
the content of const std::vector &window is not passed in the
constructor, if called by the GRC block. I cannot explain why and ask
for hints on how to correct the behavior. I could supply a patch then.

Consider the enclosed diff against the git version of lib/Welch_impl.cc,
which basically adds some debugging output. Running this with the
original GRC block,
I get the following output:

Window created; size: 2048 (which is my FFT size) => the make(…int
window_type…) function works correctly
specest_check_arguments_impl::window.size() = 0 => this make(…, const
std::vector &window) does not get the window’s values
Constructor: 0 => the constructor(…, const std::vector &window)
does not get the window’s values, either

I suppose that this has something to do with the call-by-reference of
const std::vector, but I cannot explain why.

Can you confirm this behavior? Could you please help me finding a
solution for this an let me fix it?

Best regards

Stephan Ludwig

Robert Bosch GmbH
Corporate Sector Research & Advance Engineering, Communication
Technology (CR/AEH4)
Renningen
70465 Stuttgart
GERMANY

Tel. +49(711)811-8809
Fax +49(711)811-1052
Mobile +49(172)5630639
[email protected]

Registered Office: Stuttgart, Registration Court: Amtsgericht Stuttgart,
HRB 14000;
Chairman of the Supervisory Board: Franz Fehrenbach; Managing Directors:
Dr. Volkmar Denner,
Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr.
Dirk Hoheisel, Christoph Kbel,
Uwe Raschke, Wolf-Henning Scheider, Dr. Werner Struth, Peter Tyroller