2019-01-16 19:40:08 +00:00
|
|
|
/*
|
2020-11-18 07:22:37 +00:00
|
|
|
* @file cuCorrFrequency.h
|
|
|
|
* @brief A class performs cross correlation in frequency domain
|
2019-01-16 19:40:08 +00:00
|
|
|
*/
|
2020-11-18 07:22:37 +00:00
|
|
|
|
|
|
|
// code guard
|
2019-01-16 19:40:08 +00:00
|
|
|
#ifndef __CUCORRFREQUENCY_H
|
|
|
|
#define __CUCORRFREQUENCY_H
|
2020-11-18 07:22:37 +00:00
|
|
|
|
|
|
|
// dependencies
|
2019-01-16 19:40:08 +00:00
|
|
|
#include "cudaUtil.h"
|
|
|
|
#include "cuArrays.h"
|
|
|
|
|
|
|
|
class cuFreqCorrelator
|
|
|
|
{
|
|
|
|
private:
|
2020-11-18 07:22:37 +00:00
|
|
|
// handles for forward/backward fft
|
2019-01-16 19:40:08 +00:00
|
|
|
cufftHandle forwardPlan;
|
|
|
|
cufftHandle backwardPlan;
|
2020-11-18 07:22:37 +00:00
|
|
|
// work data
|
2019-01-16 19:40:08 +00:00
|
|
|
cuArrays<float2> *workFM;
|
|
|
|
cuArrays<float2> *workFS;
|
|
|
|
cuArrays<float> *workT;
|
2020-11-18 07:22:37 +00:00
|
|
|
// cuda stream
|
2019-01-16 19:40:08 +00:00
|
|
|
cudaStream_t stream;
|
|
|
|
|
|
|
|
public:
|
2020-11-18 07:22:37 +00:00
|
|
|
// constructor
|
2019-01-16 19:40:08 +00:00
|
|
|
cuFreqCorrelator(int imageNX, int imageNY, int nImages, cudaStream_t stream_);
|
2020-11-18 07:22:37 +00:00
|
|
|
// destructor
|
|
|
|
~cuFreqCorrelator();
|
|
|
|
// executor
|
2019-01-16 19:40:08 +00:00
|
|
|
void execute(cuArrays<float> *templates, cuArrays<float> *images, cuArrays<float> *results);
|
|
|
|
};
|
|
|
|
|
2020-11-18 07:22:37 +00:00
|
|
|
#endif //__CUCORRFREQUENCY_H
|
|
|
|
// end of file
|