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)
GPU memory manager implemented using OpenCL. Required by GPUImage class.
GPUKernelManager::Pointer m_GPUKernelManager
TElement GPUGenerateData()
bool isPow2(unsigned int x)
void InitializeKernel(unsigned int size)
void operator=(const Self &)
int m_TestGPUKernelHandle
Control indentation during Print() invocation.
void ReleaseGPUInputBuffer()
void AllocateGPUInputBuffer(TElement *h_idata=NULL)
Base class for most ITK classes.
void PrintSelf(std::ostream &os, Indent indent) const
void GetNumBlocksAndThreads(int whichKernel, int n, int maxBlocks, int maxThreads, int &blocks, int &threads)
unsigned int GetReductionKernel(int whichKernel, int blockSize, int isPowOf2)