Clover Git
OpenCL 1.1 software implementation
Public Member Functions

Coal::DeviceKernel Class Reference

Device-specific kernel data. More...

#include <deviceinterface.h>

Inheritance diagram for Coal::DeviceKernel:

List of all members.

Public Member Functions

 DeviceKernel ()
virtual ~DeviceKernel ()
virtual size_t workGroupSize () const =0
 Maximum work-group size of a kernel.
virtual cl_ulong localMemSize () const =0
 Local memory used by the kernel.
virtual cl_ulong privateMemSize () const =0
 Private memory used by the kernel.
virtual size_t preferredWorkGroupSizeMultiple () const =0
 Preferred work-group size multiple.
virtual size_t guessWorkGroupSize (cl_uint num_dims, cl_uint dim, size_t global_work_size) const =0
 Optimal work-group size.

Detailed Description

Device-specific kernel data.

Definition at line 274 of file deviceinterface.h.


Constructor & Destructor Documentation

Coal::DeviceKernel::DeviceKernel ( ) [inline]

Definition at line 277 of file deviceinterface.h.

virtual Coal::DeviceKernel::~DeviceKernel ( ) [inline, virtual]

Definition at line 278 of file deviceinterface.h.


Member Function Documentation

virtual size_t Coal::DeviceKernel::guessWorkGroupSize ( cl_uint  num_dims,
cl_uint  dim,
size_t  global_work_size 
) const [pure virtual]

Optimal work-group size.

This function allows a device to calculate the optimal work-group size for this kernel, using it's memory usage, SIMD dimension, etc.

Coal::CPUDevice tries to split the kernel into a number of work-groups the closest possible to the number of CPU cores.

Parameters:
num_dimsNumber of working dimensions
dimDimension for which the multiple is being calculated
global_work_sizeTotal number of work-items to split into work-groups
Returns:
optimal size of a work-group, for the dim dimension.

Implemented in Coal::CPUKernel.

Referenced by Coal::KernelEvent::KernelEvent().

virtual cl_ulong Coal::DeviceKernel::localMemSize ( ) const [pure virtual]

Local memory used by the kernel.

Returns:
Local memory used by the kernel, in bytes

Implemented in Coal::CPUKernel.

Referenced by Coal::Kernel::workGroupInfo().

virtual size_t Coal::DeviceKernel::preferredWorkGroupSizeMultiple ( ) const [pure virtual]

Preferred work-group size multiple.

Returns:
The size multiple a work-group can have to work the best and the fastest on the device

Implemented in Coal::CPUKernel.

Referenced by Coal::Kernel::workGroupInfo().

virtual cl_ulong Coal::DeviceKernel::privateMemSize ( ) const [pure virtual]

Private memory used by the kernel.

Returns:
Private memory used by the kernel, in bytes

Implemented in Coal::CPUKernel.

Referenced by Coal::Kernel::workGroupInfo().

virtual size_t Coal::DeviceKernel::workGroupSize ( ) const [pure virtual]

Maximum work-group size of a kernel.

Returns:
Maximum work-group size of the kernel based on device-specific data such as memory usage, register pressure, etc)

Implemented in Coal::CPUKernel.

Referenced by Coal::Kernel::workGroupInfo().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines