18#ifndef itkGPUReduction_h
19#define itkGPUReduction_h
39template <
typename TElement>
60 itkGetMacro(GPUResult, TElement);
61 itkGetMacro(CPUResult, TElement);
96 bool cpuFinalReduction,
97 int cpuFinalThreshold,
123#ifndef ITK_MANUAL_INSTANTIATION
124# include "itkGPUReduction.hxx"
GPU memory manager implemented using OpenCL. Required by GPUImage class.
SmartPointer< Self > Pointer
SmartPointer< Self > Pointer
unsigned int NextPow2(unsigned int x)
void PrintSelf(std::ostream &os, Indent indent) const override
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)
TElement CPUGenerateData(TElement *data, int size)
void ReleaseGPUInputBuffer()
unsigned int GetReductionKernel(int whichKernel, int blockSize, int isPowOf2)
int m_ReduceGPUKernelHandle
int m_TestGPUKernelHandle
SmartPointer< const Self > ConstPointer
GPUDataManager::Pointer GPUDataPointer
void GetNumBlocksAndThreads(int whichKernel, int n, int maxBlocks, int maxThreads, int &blocks, int &threads)
bool isPow2(unsigned int x)
TElement GPUGenerateData()
GPUKernelManager::Pointer m_GPUKernelManager
void AllocateGPUInputBuffer(TElement *h_idata=nullptr)
GPUDataPointer m_GPUDataManager
void InitializeKernel(unsigned int size)
SmartPointer< Self > Pointer
itkGetOpenCLSourceFromKernelMacro(GPUReductionKernel)
Control indentation during Print() invocation.
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
itkGPUKernelClassMacro(GPUImageOpsKernel)