Base Framework
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
OpenCL Class Reference

OpenCL. More...

#include <base/opencl/OpenCL.h>

Classes

class  HandleImpl
 
class  Kernel
 
class  Program
 
class  Queue
 

Public Types

enum  Type { TYPE_CPU, TYPE_GPU }
 
enum  { FLAG_CPU = 1, FLAG_GPU = 2, FLAG_ANY = FLAG_CPU | FLAG_GPU }
 
enum  Access { ACCESS_READ_ONLY, ACCESS_WRITE_ONLY }
 
typedef Reference< HandleImplHandle
 
typedef void * DeviceId
 

Public Member Functions

bool createContext (Type type)
 
bool createContext (DeviceId device)
 
bool isValid () const noexcept
 
Queue createCommandQueue (MemorySize size)
 
Program createProgram (const char *source)
 
Kernel createKernel ()
 
Queue createQueue ()
 
void * createBuffer (MemorySize size)
 

Static Public Member Functions

static unsigned int getNumberOfDevices ()
 
static Array< DeviceId > getDevices (unsigned int flags=FLAG_ANY)
 
static String getDeviceName (DeviceId device)
 
static uint32 getDeviceInfoUInt (DeviceId device)
 
static bool getDeviceInfoBool (DeviceId device)
 

Detailed Description

OpenCL.

OpenCL context.

Version
1.0

Member Function Documentation

◆ getDeviceInfoBool()

static bool OpenCL::getDeviceInfoBool ( DeviceId  device)
static

Returns bool value of the given device.

◆ getDeviceInfoUInt()

static uint32 OpenCL::getDeviceInfoUInt ( DeviceId  device)
static

Returns uint value of the given device.

◆ getDeviceName()

static String OpenCL::getDeviceName ( DeviceId  device)
static

Returns the name of the given device.

◆ getDevices()

static Array<DeviceId> OpenCL::getDevices ( unsigned int  flags = FLAG_ANY)
static

Returns the available devices.

◆ getNumberOfDevices()

static unsigned int OpenCL::getNumberOfDevices ( )
static

Returns the number of devices.

◆ isValid()

bool OpenCL::isValid ( ) const
inlinenoexcept

Returns true if context is valid.