|
ITK
6.0.0
Insight Toolkit
|
Go to the documentation of this file.
23 #ifndef itkGPUKernelManager_h
24 #define itkGPUKernelManager_h
76 GetDeviceInfo(cl_kernel_work_group_info paramName,
size_t argSize,
void * argValue);
79 SetKernelArg(
int kernelIdx, cl_uint argIdx,
size_t argSize,
const void * argVal);
118 template <
typename TGPUImageDataManager>
128 cl_int errid = clSetKernelArg(
m_KernelContainer[kernelIdx], argIdx,
sizeof(cl_mem), manager->GetGPUBufferPointer());
141 manager->GetModifiableGPUBufferedRegionIndex()->GetGPUBufferPointer());
145 m_KernelArgumentReady[kernelIdx][argIdx].m_GPUDataManager = manager->GetModifiableGPUBufferedRegionIndex();
152 manager->GetModifiableGPUBufferedRegionSize()->GetGPUBufferPointer());
156 m_KernelArgumentReady[kernelIdx][argIdx].m_GPUDataManager = manager->GetModifiableGPUBufferedRegionSize();
163 LaunchKernel(
int kernelIdx,
int dim,
size_t * globalWorkSize,
size_t * localWorkSize);
166 LaunchKernel1D(
int kernelIdx,
size_t globalWorkSize,
size_t localWorkSize);
170 size_t globalWorkSizeX,
171 size_t globalWorkSizeY,
172 size_t localWorkSizeX,
173 size_t localWorkSizeY);
177 size_t globalWorkSizeX,
178 size_t globalWorkSizeY,
179 size_t globalWorkSizeZ,
180 size_t localWorkSizeX,
181 size_t localWorkSizeY,
182 size_t localWorkSizeZ);
209 template <
typename TArg>
bool LaunchKernel2D(int kernelIdx, vcl_size_t globalWorkSizeX, vcl_size_t globalWorkSizeY, vcl_size_t localWorkSizeX, vcl_size_t localWorkSizeY)
~GPUKernelManager() override
bool LaunchKernel3D(int kernelIdx, vcl_size_t globalWorkSizeX, vcl_size_t globalWorkSizeY, vcl_size_t globalWorkSizeZ, vcl_size_t localWorkSizeX, vcl_size_t localWorkSizeY, vcl_size_t localWorkSizeZ)
bool SetKernelArgWithFloat(int kernelIdx, cl_uint argIdx, float argVal)
int GetCurrentCommandQueueID() const
bool SetKernelArgWithDouble(int kernelIdx, cl_uint argIdx, double argVal)
std::vector< std::vector< KernelArgumentList > > m_KernelArgumentReady
bool LoadProgramFromString(const char *cSource, const char *cPreamble="")
void SetCurrentCommandQueue(int queueid)
void OpenCLCheckError(cl_int error, const char *filename="", int lineno=0, const char *location="")
bool SetKernelArgWithUShort(int kernelIdx, cl_uint argIdx, unsigned short argVal)
bool SetKernelArgWithShort(int kernelIdx, cl_uint argIdx, short argVal)
bool LaunchKernel1D(int kernelIdx, vcl_size_t globalWorkSize, vcl_size_t localWorkSize)
bool SetKernelArg(int kernelIdx, cl_uint argIdx, vcl_size_t argSize, const void *argVal)
GPU memory manager implemented using OpenCL. Required by GPUImage class.
Light weight base class for most itk classes.
bool SetKernelArgWithInt(int kernelIdx, cl_uint argIdx, int argVal)
GPUDataManager::Pointer m_GPUDataManager
bool LoadProgramFromFile(const char *filename, const char *cPreamble="")
bool SetKernelArgWithULongLong(int kernelIdx, cl_uint argIdx, unsigned long long argVal)
std::vector< cl_kernel > m_KernelContainer
bool SetKernelArgWithUInt(int kernelIdx, cl_uint argIdx, unsigned int argVal)
bool SetTypedKernelArg(int kernelIdx, cl_uint argIdx, TArg argVal)
bool SetKernelArgWithImage(int kernelIdx, cl_uint argIdx, GPUDataManager *manager)
cl_int GetKernelWorkGroupInfo(int kernelIdx, cl_kernel_work_group_info paramName, void *value)
Singleton class to store the GPU context.
bool SetKernelArgWithLongLong(int kernelIdx, cl_uint argIdx, long long argVal)
GPUContextManager * m_Manager
GPU kernel manager implemented using OpenCL.
void ResetArguments(int kernelIdx)
cl_int GetDeviceInfo(cl_kernel_work_group_info paramName, vcl_size_t argSize, void *argValue)
int CreateKernel(const char *kernelName)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
bool LaunchKernel(int kernelIdx, int dim, vcl_size_t *globalWorkSize, vcl_size_t *localWorkSize)
bool SetKernelArgWithChar(int kernelIdx, cl_uint argIdx, char argVal)
bool SetKernelArgWithUChar(int kernelIdx, cl_uint argIdx, unsigned char argVal)
bool CheckArgumentReady(int kernelIdx)
bool SetKernelArgWithImageAndBufferedRegion(int kernelIdx, cl_uint &argIdx, TGPUImageDataManager *manager)