18 #ifndef itkGPUReduction_h
19 #define itkGPUReduction_h
39 template<
typename TElement >
61 itkGetMacro(GPUResult, TElement);
62 itkGetMacro(CPUResult, TElement);
67 unsigned int NextPow2(
unsigned int x );
68 bool isPow2(
unsigned int x);
69 void GetNumBlocksAndThreads(
int whichKernel,
int n,
int maxBlocks,
int maxThreads,
int &blocks,
int &threads);
86 bool cpuFinalReduction,
87 int cpuFinalThreshold,
117 #ifndef ITK_MANUAL_INSTANTIATION
118 #include "itkGPUReduction.hxx"
Light weight base class for most itk classes.
GPUDataPointer m_GPUDataManager
int m_ReduceGPUKernelHandle
TElement GPUReduce(cl_int n, int numThreads, int numBlocks, int maxThreads, int maxBlocks, int whichKernel, bool cpuFinalReduction, int cpuFinalThreshold, double *dTotalTime, GPUDataPointer idata, GPUDataPointer odata)
SmartPointer< Self > Pointer
TElement CPUGenerateData(TElement *data, int size)
unsigned int NextPow2(unsigned int x)
GPUDataManager::Pointer GPUDataPointer
itkGetOpenCLSourceFromKernelMacro(GPUReductionKernel)
SmartPointer< const Self > ConstPointer
itkGPUKernelClassMacro(GPUImageOpsKernel)
void AllocateGPUInputBuffer(TElement *h_idata=nullptr)
GPU memory manager implemented using OpenCL. Required by GPUImage class.
GPUKernelManager::Pointer m_GPUKernelManager
TElement GPUGenerateData()
void PrintSelf(std::ostream &os, Indent indent) const override
bool isPow2(unsigned int x)
void InitializeKernel(unsigned int size)
void operator=(const Self &)
int m_TestGPUKernelHandle
Control indentation during Print() invocation.
void ReleaseGPUInputBuffer()
Base class for most ITK classes.
void GetNumBlocksAndThreads(int whichKernel, int n, int maxBlocks, int maxThreads, int &blocks, int &threads)
unsigned int GetReductionKernel(int whichKernel, int blockSize, int isPowOf2)