Commit 2c896150 authored by Sarod Yatawatta's avatar Sarod Yatawatta

check new parset for enabling quantization

parent 3d360edb
......@@ -75,7 +75,10 @@ namespace LOFAR
: NULL),
coherentStokes(CoherentStokesKernel::Parameters(ps)),
quantizeOutput(QuantizeOutputKernel::Parameters(ps)) //FIXME
quantizeOutput(ps.settings.beamFormer.coherentSettings.quantizerSettings.enabled
? new KernelFactory<QuantizeOutputKernel>(QuantizeOutputKernel::Parameters(ps))
: NULL) //FIXME
{
}
......@@ -90,7 +93,8 @@ namespace LOFAR
coherentStokesPPF(factories.coherentFirFilter != NULL),
devC(context, factories.beamFormer.bufferSize(BeamFormerKernel::OUTPUT_DATA)),
devD(context, factories.beamFormer.bufferSize(BeamFormerKernel::OUTPUT_DATA)),
outputCounter(context, "output (coherent)")
outputCounter(context, "output (coherent)"),
quantizeOutputFlag(factories.quantizeOutput!= NULL)
{
devB = i_devB;
......@@ -128,14 +132,16 @@ namespace LOFAR
devC, devD));
// FIXME D -> C
quantizeOutputKernel = std::unique_ptr<QuantizeOutputKernel>(
factories.quantizeOutput.create(queue,
if (quantizeOutputFlag) {
quantizeOutputKernel = std::unique_ptr<QuantizeOutputKernel>(
factories.quantizeOutput->create(queue,
devD, devC));
}
}
gpu::DeviceMemory BeamFormerCoherentStep::outputBuffer() {
return devC; //original DevD FIXME
return (quantizeOutputFlag? devC : devD);
}
......@@ -182,7 +188,9 @@ void BeamFormerCoherentStep::process(const SubbandProcInputData &input)
coherentStokesKernel->enqueue(input.blockID);
quantizeOutputKernel->enqueue(input.blockID); //FIXME
if (quantizeOutputFlag) {
quantizeOutputKernel->enqueue(input.blockID); //FIXME
}
}
......
......@@ -67,7 +67,7 @@ namespace LOFAR
SmartPtr< KernelFactory<FIR_FilterKernel> > coherentFirFilter;
SmartPtr< KernelFactory<FFT_Kernel> > coherentFinalFFT;
KernelFactory<CoherentStokesKernel> coherentStokes;
KernelFactory<QuantizeOutputKernel> quantizeOutput; //FIXME: use SmartPtr
SmartPtr< KernelFactory<QuantizeOutputKernel> > quantizeOutput; //FIXME: use SmartPtr
};
BeamFormerCoherentStep(const Parset &parset,
......@@ -112,12 +112,15 @@ namespace LOFAR
// Coherent Stokes
std::unique_ptr<CoherentStokesKernel> coherentStokesKernel;
// FIXME
std::unique_ptr<QuantizeOutputKernel> quantizeOutputKernel;
PerformanceCounter outputCounter;
size_t nrCoherent(const BlockID &blockID) const;
// FIXME
std::unique_ptr<QuantizeOutputKernel> quantizeOutputKernel;
// flag to remember if quantization is enabled or not
const bool quantizeOutputFlag;
};
......
Markdown is supported
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