SkePU(integratedwithStarPU)  0.8.1
 All Classes Namespaces Files Functions Enumerations Friends Macros Groups Pages
Public Member Functions | List of all members
skepu::Device_CL Class Reference

A class representing an OpenCL device. More...

#include <device_cl.h>

Public Member Functions

 Device_CL (cl_device_id id, cl_device_type type, cl_context context)
 
 ~Device_CL ()
 
size_t getMaxBlockSize () const
 
cl_uint getNumComputeUnits () const
 
cl_ulong getGlobalMemSize () const
 
cl_ulong getSharedMemPerBlock () const
 
int getMaxThreads () const
 
size_t getMaxBlocks () const
 
const cl_context & getContext () const
 
const cl_command_queue & getQueue () const
 
cl_device_type getType () const
 
cl_device_id getDeviceID () const
 

Detailed Description

A class representing an OpenCL device.

This class represents one OpenCL device which can be used to execute the skeletons on if OpenCL is used as backend. Stores various properties about the device and provides functions that return them. As actual OpenCL devices are managed by StarPU in this translation, so this class merely acts as a wrapper, encapsulating the properties obtained by StarPU. Also contains a OpenCL context and queue.

Constructor & Destructor Documentation

skepu::Device_CL::Device_CL ( cl_device_id  id,
cl_device_type  type,
cl_context  context 
)
inline

The constructor creates a device from an ID, device type (should be GPU in this version) and a context. It gets all the properties and creates a command-queue.

Parameters
idDevice ID for the device that is to be created.
typeThe OpenCL device type.
contextA valid OpenCL context.

References getMaxBlockSize().

Here is the call graph for this function:

skepu::Device_CL::~Device_CL ( )
inline

The destructor releases the OpenCL queue and context.

Member Function Documentation

const cl_context& skepu::Device_CL::getContext ( ) const
inline
Returns
OpenCL context.
cl_device_id skepu::Device_CL::getDeviceID ( ) const
inline
Returns
OpenCL device ID.
cl_ulong skepu::Device_CL::getGlobalMemSize ( ) const
inline
Returns
The global memory size.
size_t skepu::Device_CL::getMaxBlocks ( ) const
inline
Returns
The maximum number of blocks or groups for a kernel launch.
size_t skepu::Device_CL::getMaxBlockSize ( ) const
inline
Returns
The maximum block (work group) size.
int skepu::Device_CL::getMaxThreads ( ) const
inline
Returns
The maximum number of threads per block or group.
cl_uint skepu::Device_CL::getNumComputeUnits ( ) const
inline
Returns
The maximum number of compute units available.
const cl_command_queue& skepu::Device_CL::getQueue ( ) const
inline
Returns
OpenCL queue.
cl_ulong skepu::Device_CL::getSharedMemPerBlock ( ) const
inline
Returns
The local (shared) memory size.
cl_device_type skepu::Device_CL::getType ( ) const
inline
Returns
OpenCL device type.

The documentation for this class was generated from the following file: