35#ifndef __itkOpenCLKernelManager_h
36#define __itkOpenCLKernelManager_h
38#include <itkLightObject.h>
39#include <itkObjectFactory.h>
107 const std::string & prefixSourceCode = std::string(),
108 const std::string & postfixSourceCode = std::string(),
109 const std::string & extraBuildOptions = std::string() );
112 const std::string & prefixSourceCode = std::string(),
113 const std::string & postfixSourceCode = std::string(),
114 const std::string & extraBuildOptions = std::string() );
129 const cl_uint argId,
const std::size_t argSize,
const void * argVal );
132 const std::size_t argSize,
const void * argVal );
The OpenCLContext class represents an OpenCL context.
OpenCLEventList class represents a list of OpenCLEvent objects.
OpenCLEvent class represents an OpenCL event object.
OpenCL kernel manager implemented using OpenCL.
OpenCLEvent LaunchKernel(const std::vcl_size_t kernelId, const OpenCLEventList &event_list, const OpenCLSize &global_work_size, const OpenCLSize &local_work_size=OpenCLSize::null, const OpenCLSize &global_work_offset=OpenCLSize::null)
OpenCLEvent LaunchKernel(const std::vcl_size_t kernelId)
OpenCLContext * GetContext() const
std::vector< std::vector< KernelArgumentList > > m_KernelArgumentReady
OpenCLContext * m_Context
void ResetArguments(const std::vcl_size_t kernelIdx)
bool CheckArgumentReady(const std::vcl_size_t kernelId)
SmartPointer< Self > Pointer
OpenCLKernel & GetKernel(const std::vcl_size_t kernelId)
bool SetKernelArgForAllKernels(const cl_uint argId, const std::vcl_size_t argSize, const void *argVal)
OpenCLProgram BuildProgramFromSourceFile(const std::string &fileName, const std::string &prefixSourceCode=std::string(), const std::string &postfixSourceCode=std::string(), const std::string &extraBuildOptions=std::string())
void SetLocalWorkSizeForAllKernels(const OpenCLSize &size)
OpenCLProgram BuildProgramFromSourceCode(const std::string &sourceCode, const std::string &prefixSourceCode=std::string(), const std::string &postfixSourceCode=std::string(), const std::string &extraBuildOptions=std::string())
OpenCLEvent LaunchKernel(const std::vcl_size_t kernelId, const OpenCLEventList &event_list)
~OpenCLKernelManager() override
std::vector< OpenCLKernel > m_Kernels
std::vcl_size_t CreateKernel(const OpenCLProgram &program, const std::string &name)
OpenCLEvent LaunchKernel(const std::vcl_size_t kernelId, const OpenCLSize &global_work_size, const OpenCLSize &local_work_size=OpenCLSize::null, const OpenCLSize &global_work_offset=OpenCLSize::null)
bool SetKernelArgWithImage(const std::vcl_size_t kernelId, cl_uint argId, const GPUDataManager::Pointer manager)
bool SetKernelArg(const std::vcl_size_t kernelId, const cl_uint argId, const std::vcl_size_t argSize, const void *argVal)
OpenCLKernelManager(const Self &)
SmartPointer< const Self > ConstPointer
void operator=(const Self &)
void SetGlobalWorkOffsetForAllKernels(const OpenCLSize &offset)
void SetGlobalWorkSizeForAllKernels(const OpenCLSize &size)
The OpenCLKernel class represents an executable entry point function in an OpenCL program.
The OpenCLProgram class represents an OpenCL program object.
The OpenCLSize class defines the size of an item of work for an OpenCL kernel.
GPUDataManager::Pointer m_GPUDataManager