Commit 9d354aa3 authored by Ewan Barr's avatar Ewan Barr
Browse files

cleaned up and added flag to only call handler once the data is valid

parent ea50798a
......@@ -22,7 +22,6 @@ SimpleFFTSpectrometer<HandlerType>::SimpleFFTSpectrometer(
, _nbits(nbits)
, _handler(handler)
, _fft_plan(0)
, _data_valid(true)
, _pass(0)
{
BOOST_LOG_TRIVIAL(debug)
......@@ -154,7 +153,6 @@ bool SimpleFFTSpectrometer<HandlerType>::operator()(RawBytes& block)
_detected_host_previous->size() * sizeof(float));
BOOST_LOG_TRIVIAL(debug) << "Calling handler";
CUDA_ERROR_CHECK(cudaStreamSynchronize(_h2d_stream));
std::swap(_edd_raw_current, _edd_raw_previous);
......
......@@ -110,7 +110,7 @@ void detect_and_accumulate(float2* __restrict__ in, float* __restrict__ out, int
float y = tmp.y * tmp.y;
sum += x + y;
}
out[write_offset + chan_idx] = sum;
out[write_offset + chan_idx] = sum / naccumulate;
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment