first work to add GPU support via DKS for Fourier.
This commit is contained in:
@@ -30,7 +30,17 @@
|
||||
#ifndef _PFOURIER_H_
|
||||
#define _PFOURIER_H_
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DKS
|
||||
#include "fftw3.h"
|
||||
#else
|
||||
#include <complex>
|
||||
using namespace std;
|
||||
#include "DKSBase.h"
|
||||
#endif
|
||||
|
||||
#include "PMusr.h"
|
||||
|
||||
@@ -47,10 +57,13 @@ class PFourier
|
||||
public:
|
||||
PFourier(TH1F *data, Int_t unitTag,
|
||||
Double_t startTime = 0.0, Double_t endTime = 0.0,
|
||||
Bool_t dcCorrected = false, UInt_t zeroPaddingPower = 0);
|
||||
Bool_t dcCorrected = false, UInt_t zeroPaddingPower = 0,
|
||||
Bool_t useFFTW = true);
|
||||
virtual ~PFourier();
|
||||
|
||||
virtual void Transform(UInt_t apodizationTag = 0);
|
||||
virtual void Transform(UInt_t apodizationTag = F_APODIZATION_NONE);
|
||||
|
||||
virtual void SetUseFFTW(const Bool_t flag);
|
||||
|
||||
virtual const char* GetDataTitle() { return fData->GetTitle(); }
|
||||
virtual const Int_t GetUnitTag() { return fUnitTag; }
|
||||
@@ -62,12 +75,14 @@ class PFourier
|
||||
virtual TH1F* GetPhaseFourier(const Double_t scale = 1.0);
|
||||
|
||||
virtual Bool_t IsValid() { return fValid; }
|
||||
virtual Bool_t IsUseFFTW() { return fUseFFTW; }
|
||||
|
||||
private:
|
||||
TH1F *fData; ///< data histogram to be Fourier transformed.
|
||||
|
||||
Bool_t fValid; ///< true = all boundary conditions fullfilled and hence a Fourier transform can be performed.
|
||||
Int_t fUnitTag; ///< 1=Field Units (G), 2=Field Units (T), 3=Frequency Units (MHz), 4=Angular Frequency Units (Mc/s)
|
||||
Bool_t fUseFFTW; ///< true = use FFTW, otherwise use DKS if present
|
||||
|
||||
Int_t fApodization; ///< 0=none, 1=weak, 2=medium, 3=strong
|
||||
|
||||
@@ -80,9 +95,18 @@ class PFourier
|
||||
|
||||
UInt_t fNoOfData; ///< number of bins in the time interval between fStartTime and fStopTime
|
||||
UInt_t fNoOfBins; ///< number of bins to be Fourier transformed. Might be different to fNoOfData due to zero padding
|
||||
|
||||
fftw_plan fFFTwPlan; ///< fftw plan (see FFTW3 User Manual)
|
||||
fftw_complex *fIn; ///< real part of the Fourier transform
|
||||
fftw_complex *fOut; ///< imaginary part of the Fourier transform
|
||||
fftw_complex *fIn; ///< real part of the Fourier transform
|
||||
fftw_complex *fOut; ///< imaginary part of the Fourier transform
|
||||
|
||||
#ifdef HAVE_DKS
|
||||
double *fInDKS; ///< real part of the Fourier transform
|
||||
complex<double> *fOutDKS; ///< imaginary part of the Fourier transform
|
||||
DKSBase fDks; ///< Dynamic Kernel Scheduler
|
||||
void *fReal_ptr; ///< real part of the Fourier on accelartor
|
||||
void *fComp_ptr; ///< imaginary part of the Fourier on the acclerator
|
||||
#endif
|
||||
|
||||
virtual void PrepareFFTwInputData(UInt_t apodizationTag);
|
||||
virtual void ApodizeData(Int_t apodizationTag);
|
||||
|
||||
Reference in New Issue
Block a user