I have the following c++ code which gets fft by sliding on sample by sample fo the input.
* The private constructor
gr::io_signature::make(1, 1, sizeof(gr_complex)),
gr::io_signature::make(1, 1, fft_size * sizeof(gr_complex))),
d_fft = new fft::fft_complex (d_fft_size, 1, 2);
const gr_complex *in = (const gr_complex *) input_items;
gr_complex *out = (gr_complex *) output_items;
memcpy(d_fft->get_inbuf(), in, d_fft_size * sizeof(gr_complex));
memcpy(out, d_fft->get_outbuf(), d_fft_size * sizeof(gr_complex));
If I run the fft execution on 2 threads, or more, is there any "race" problem between these 2 threads and the work one? Inj another words, is it possible that this work being called before finishing the fft execution?
If it is so, there will be a race problem because "work" wants to write on d_fft->get_inbuf() while fft execution wants to read from it!
please help me with this code. I don't know why at the runtime, the data I give at the output aren't desired after a while!!