Select Git revision
WH_BGL_Processing.cc
-
John Romein authored
CS1.parset determines whether InputSection and BGLProc, and BGLProc and Storage should really connect.
John Romein authoredCS1.parset determines whether InputSection and BGLProc, and BGLProc and Storage should really connect.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
WH_BGL_Processing.cc 86.54 KiB
//# WH_BGL_Processing.cc: Blue Gene processing for 1 second of sampled data
//#
//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
//#
//# This program is free software; you can redistribute it and/or modify
//# it under the terms of the GNU General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or
//# (at your option) any later version.
//#
//# This program is distributed in the hope that it will be useful,
//# but WITHOUT ANY WARRANTY; without even the implied warranty of
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//# GNU General Public License for more details.
//#
//# You should have received a copy of the GNU General Public License
//# along with this program; if not, write to the Free Software
//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//#
//# $Id$
//# Always #include <lofar_config.h> first!
#include <lofar_config.h>
//# Includes
#include <CS1_BGLProc/WH_BGL_Processing.h>
#include <CS1_BGLProc/Correlator.h>
#include <CS1_BGLProc/FFT.h>
#include <CS1_BGLProc/FIR.h>
#include <Common/Timer.h>
#include <Transport/TH_MPI.h>
#include <complex>
#include <cmath>
#if defined HAVE_MASS
#include <mass.h>
#endif
#if defined HAVE_BGL
#include <rts.h>
#endif
namespace LOFAR {
namespace CS1 {
#if !defined HAVE_MASS
inline static dcomplex cosisin(double x)
{
return makedcomplex(cos(x), sin(x));
}
#endif
vector<double> WH_BGL_Processing::itsCenterFrequencies;
FIR WH_BGL_Processing::itsFIRs[NR_STATIONS][NR_POLARIZATIONS][NR_SUBBAND_CHANNELS] CACHE_ALIGNED;
fcomplex WH_BGL_Processing::samples[NR_SUBBAND_CHANNELS][NR_STATIONS][NR_SAMPLES_PER_INTEGRATION | 2][NR_POLARIZATIONS] CACHE_ALIGNED;
#if defined SPARSE_FLAGS
SparseSet WH_BGL_Processing::flags[NR_STATIONS];
#else
bitset<NR_SAMPLES_PER_INTEGRATION> WH_BGL_Processing::flags[NR_STATIONS] CACHE_ALIGNED;
#endif
unsigned WH_BGL_Processing::itsNrValidSamples[NR_BASELINES] CACHE_ALIGNED;
float WH_BGL_Processing::correlationWeights[NR_SAMPLES_PER_INTEGRATION + 1] CACHE_ALIGNED;
#if defined HAVE_BGL && !defined C_IMPLEMENTATION
static BGL_Mutex *mutex;
#endif