LocalComputeFstat.c File Reference

#include <math.h>
#include <lal/ExtrapolatePulsarSpins.h>
#include <lal/AVFactories.h>
#include <lal/ComputeFstat.h>
#include <lal/LogPrintf.h>
#include "LocalOptimizationFlags.h"

Include dependency graph for LocalComputeFstat.c:

Go to the source code of this file.

Defines

#define __USE_ISOC99   1
#define TRUE   (1==1)
#define FALSE   (1==0)
#define LD_SMALL4   (2.0e-4)
 "small" number for REAL4
#define OOTWOPI   (1.0 / LAL_TWOPI)
 1/2pi
#define TWOPI_FLOAT   6.28318530717958f
 single-precision 2*pi
#define OOTWOPI_FLOAT   (1.0f / TWOPI_FLOAT)
 single-precision 1 / (2pi)
#define DTERMS   8
 fixed DTERMS to allow for loop unrolling
#define SQ(x)   ( (x) * (x) )
 square
#define __builtin_expect(a, b)   a
 somehow the branch prediction of gcc-4.1.2 terribly failes with the current case distinction in the hot-loop, having a severe impact on runtime of the E Linux App.
#define PREFETCH(a)   a
 currently interleaving the kernel loop doesn't work with MSC
#define SINCOS_TRIM_X(y, x)   y = x - floor(x);
 the way of trimming x to the interval [0.
#define NUM_FACT   6
#define SINCOS_LUT_RES   64
#define SINCOS_LUT_RES_F   (1.0 * SINCOS_LUT_RES)
#define OO_SINCOS_LUT_RES   (1.0 / SINCOS_LUT_RES)
#define X_TO_IND   (1.0 * SINCOS_LUT_RES * OOTWOPI )
#define IND_TO_X   (LAL_TWOPI * OO_SINCOS_LUT_RES)

Functions

 NRCSID (LOCALCOMPUTEFSTATC,"$Id: LocalComputeFstat.c,v 1.131 2008/07/27 13:33:54 bema Exp $")
int finite (double x)
void LocalComputeFStatFreqBand (LALStatus *status, REAL8FrequencySeries *fstatVector, const PulsarDopplerParams *doppler, const MultiSFTVector *multiSFTs, const MultiNoiseWeights *multiWeights, const MultiDetectorStateSeries *multiDetStates, const ComputeFParams *params)
 Function to compute a vector of Fstatistic values for a number of frequency bins.


Define Documentation

#define __USE_ISOC99   1

Definition at line 31 of file LocalComputeFstat.c.

#define TRUE   (1==1)

Definition at line 55 of file LocalComputeFstat.c.

#define FALSE   (1==0)

Definition at line 56 of file LocalComputeFstat.c.

#define LD_SMALL4   (2.0e-4)

"small" number for REAL4

Definition at line 58 of file LocalComputeFstat.c.

#define OOTWOPI   (1.0 / LAL_TWOPI)

1/2pi

Definition at line 59 of file LocalComputeFstat.c.

#define TWOPI_FLOAT   6.28318530717958f

single-precision 2*pi

Definition at line 61 of file LocalComputeFstat.c.

#define OOTWOPI_FLOAT   (1.0f / TWOPI_FLOAT)

single-precision 1 / (2pi)

Definition at line 62 of file LocalComputeFstat.c.

#define DTERMS   8

fixed DTERMS to allow for loop unrolling

Definition at line 74 of file LocalComputeFstat.c.

#define SQ ( x   )     ( (x) * (x) )

square

Definition at line 77 of file LocalComputeFstat.c.

#define __builtin_expect ( a,
 )     a

somehow the branch prediction of gcc-4.1.2 terribly failes with the current case distinction in the hot-loop, having a severe impact on runtime of the E Linux App.

So let's allow to give gcc a hint which path has a higher probablility

Definition at line 84 of file LocalComputeFstat.c.

#define PREFETCH ( a   )     a

currently interleaving the kernel loop doesn't work with MSC

Definition at line 101 of file LocalComputeFstat.c.

#define SINCOS_TRIM_X ( y,
x   )     y = x - floor(x);

the way of trimming x to the interval [0.

.1) for the sin_cos_LUT functions give significant differences in speed, so we provide various ways here. We also record the way we are using for logging

Definition at line 127 of file LocalComputeFstat.c.

#define NUM_FACT   6

Definition at line 151 of file LocalComputeFstat.c.

#define SINCOS_LUT_RES   64

Definition at line 159 of file LocalComputeFstat.c.

#define SINCOS_LUT_RES_F   (1.0 * SINCOS_LUT_RES)

Definition at line 1584 of file LocalComputeFstat.c.

#define OO_SINCOS_LUT_RES   (1.0 / SINCOS_LUT_RES)

Definition at line 1585 of file LocalComputeFstat.c.

#define X_TO_IND   (1.0 * SINCOS_LUT_RES * OOTWOPI )

Definition at line 1587 of file LocalComputeFstat.c.

#define IND_TO_X   (LAL_TWOPI * OO_SINCOS_LUT_RES)

Definition at line 1588 of file LocalComputeFstat.c.


Function Documentation

NRCSID ( LOCALCOMPUTEFSTATC  ,
"$Id: LocalComputeFstat.  c,
v 1.131 2008/07/27 13:33:54 bema Exp $"   
)

int finite ( double  x  ) 

void LocalComputeFStatFreqBand ( LALStatus status,
REAL8FrequencySeries fstatVector,
const PulsarDopplerParams doppler,
const MultiSFTVector multiSFTs,
const MultiNoiseWeights multiWeights,
const MultiDetectorStateSeries multiDetStates,
const ComputeFParams params 
)

Function to compute a vector of Fstatistic values for a number of frequency bins.

This function is simply a wrapper for LocalComputeFstat() which is called repeatedly for every frequency value. The output, i.e. fstatVector must be properly allocated before this function is called. The values of the start frequency, the step size in the frequency and the number of frequency values for which the Fstatistic is to be calculated are read from fstatVector. The other parameters are not checked and they must be correctly set outside this function.

something to improve/cleanup -- the start frequency is available both from the fstatvector and from the input doppler point -- they could be inconsistent or the user of this function could misunderstand

Parameters:
fstatVector  [out] Vector of Fstat values
doppler  parameter-space point to compute F for
multiSFTs  normalized (by DOUBLE-sided Sn!) data-SFTs of all IFOs
multiWeights  noise-weights of all SFTs
multiDetStates  'trajectories' of the different IFOs
params  addition computational params

Definition at line 195 of file LocalComputeFstat.c.


Generated on Thu Aug 28 03:13:34 2008 for LAL by  doxygen 1.5.2