Skip to content
Snippets Groups Projects

Fix time offset bug in the gated spectrometer; Added testing/consumer.hpp;...

Merged Niclas Esser requested to merge fix-gspec into devel
11 files
+ 295
14
Compare changes
  • Side-by-side
  • Inline
Files
11
@@ -328,25 +328,24 @@ bool GatedSpectrometer<HandlerType, InputType, OutputType>::operator()(RawBytes
@@ -328,25 +328,24 @@ bool GatedSpectrometer<HandlerType, InputType, OutputType>::operator()(RawBytes
if (newBlock)
if (newBlock)
{
{
BOOST_LOG_TRIVIAL(debug) << "Starting new output block.";
BOOST_LOG_TRIVIAL(debug) << "Starting new output block.";
CUDA_ERROR_CHECK(cudaStreamSynchronize(_d2h_stream));
//CUDA_ERROR_CHECK(cudaStreamSynchronize(_d2h_stream));
outputDataStream->swap(_proc_stream);
outputDataStream->swap(_proc_stream);
}
}
BOOST_LOG_TRIVIAL(debug) << "Processing block.";
BOOST_LOG_TRIVIAL(debug) << "Processing block.";
process(inputDataStream, outputDataStream);
CUDA_ERROR_CHECK(cudaStreamSynchronize(_proc_stream));
CUDA_ERROR_CHECK(cudaStreamSynchronize(_proc_stream));
 
process(inputDataStream, outputDataStream);
BOOST_LOG_TRIVIAL(debug) << "Processing block finished.";
BOOST_LOG_TRIVIAL(debug) << "Processing block finished.";
/// For one pol input and power out
/// For one pol input and power out
/// ToDo: For two pol input and power out
/// ToDo: For two pol input and power out
/// ToDo: For two pol input and stokes out
/// ToDo: For two pol input and stokes out
if ((_call_count == 2) || (!newBlock)) {
if ((_call_count == 2) || (!newBlock)) {
return false;
return false;
}
}
 
CUDA_ERROR_CHECK(cudaStreamSynchronize(_d2h_stream));
outputDataStream->data2Host(_d2h_stream);
outputDataStream->data2Host(_d2h_stream);
if (_call_count == 3) {
if (_call_count < 3+_nBlocks) {
return false;
return false;
}
}
Loading