Declaration of the OpenCL Resources micro-service.
More...
#include <mitkOclResourceService.h>
|
virtual cl_context | GetContext () const =0 |
| Returns a valid OpenCL Context (if applicable) or nullptr if none present. More...
|
|
virtual cl_command_queue | GetCommandQueue () const =0 |
| Returns a valid cl_command_queue related to the (one) OpenCL context. More...
|
|
virtual cl_device_id | GetCurrentDevice () const =0 |
| Returns the identifier of an OpenCL device related to the current context. More...
|
|
virtual bool | GetIsFormatSupported (cl_image_format *format)=0 |
| Checks if an OpenCL image format passed in is supported on current device. More...
|
|
virtual void | PrintContextInfo () const =0 |
| Puts the OpenCL Context info in std::cout. More...
|
|
virtual void | InsertProgram (cl_program program, std::string string, bool flag)=0 |
| Insert program into the internal program storage. More...
|
|
virtual cl_program | GetProgram (const std::string &name)=0 |
| Get the cl_program by name. More...
|
|
virtual void | InvalidateStorage ()=0 |
| Remove all invalid (=do not compile) programs from the internal storage. More...
|
|
virtual void | RemoveProgram (const std::string &name)=0 |
| Remove given program from storage. More...
|
|
virtual unsigned int | GetMaximumImageSize (unsigned int dimension, cl_mem_object_type image)=0 |
| Get the maximum size of an image. More...
|
|
virtual | ~OclResourceService ()=0 |
|
Declaration of the OpenCL Resources micro-service.
The OclResourceService defines an service interface for providing access to the essential OpenCL-related variables. In addition the service can also store compiled OpenCL Programs in order to avoid multiple compiling of a single program source
Definition at line 27 of file mitkOclResourceService.h.
◆ ~OclResourceService()
virtual OclResourceService::~OclResourceService |
( |
| ) |
|
|
pure virtual |
◆ GetCommandQueue()
virtual cl_command_queue OclResourceService::GetCommandQueue |
( |
| ) |
const |
|
pure virtual |
Returns a valid cl_command_queue related to the (one) OpenCL context.
◆ GetContext()
virtual cl_context OclResourceService::GetContext |
( |
| ) |
const |
|
pure virtual |
Returns a valid OpenCL Context (if applicable) or nullptr if none present.
◆ GetCurrentDevice()
virtual cl_device_id OclResourceService::GetCurrentDevice |
( |
| ) |
const |
|
pure virtual |
Returns the identifier of an OpenCL device related to the current context.
◆ GetIsFormatSupported()
virtual bool OclResourceService::GetIsFormatSupported |
( |
cl_image_format * |
format | ) |
|
|
pure virtual |
Checks if an OpenCL image format passed in is supported on current device.
◆ GetMaximumImageSize()
virtual unsigned int OclResourceService::GetMaximumImageSize |
( |
unsigned int |
dimension, |
|
|
cl_mem_object_type |
image |
|
) |
| |
|
pure virtual |
Get the maximum size of an image.
- Parameters
-
dimension | (unsigned int) identifier of the image diemsion in {0,1,2} |
image | object type, either CL_MEM_OBJECT_IMAGE2D, CL_MEM_OBJECT_IMAGE3D |
◆ GetProgram()
virtual cl_program OclResourceService::GetProgram |
( |
const std::string & |
name | ) |
|
|
pure virtual |
Get the cl_program by name.
- Parameters
-
name | Text identifier of the program. |
- Exceptions
-
◆ InsertProgram()
virtual void OclResourceService::InsertProgram |
( |
cl_program |
program, |
|
|
std::string |
string, |
|
|
bool |
flag |
|
) |
| |
|
pure virtual |
Insert program into the internal program storage.
- Parameters
-
program | A cl_program object. |
string | Text identifier of the inserted program. Used for getting the program. |
flag | |
◆ InvalidateStorage()
virtual void OclResourceService::InvalidateStorage |
( |
| ) |
|
|
pure virtual |
Remove all invalid (=do not compile) programs from the internal storage.
◆ PrintContextInfo()
virtual void OclResourceService::PrintContextInfo |
( |
| ) |
const |
|
pure virtual |
Puts the OpenCL Context info in std::cout.
◆ RemoveProgram()
virtual void OclResourceService::RemoveProgram |
( |
const std::string & |
name | ) |
|
|
pure virtual |
Remove given program from storage.
- Parameters
-
name | Text identifier of the program. |
The documentation for this class was generated from the following file: