go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
itk::OpenCLPlatform Class Reference

#include <itkOpenCLPlatform.h>

Detailed Description

The OpenCLPlatform represent platform model for OpenCL.

The platform model consists of a host connected to one or more OpenCL devices. An OpenCL device is divided into one or more compute units (CUs) which are further divided into one or more processing elements (PEs). Computations on a device occur within the processing elements.

The GetAllPlatforms() function can be used to obtain the list of OpenCL platforms that are accessible to the host. For each platform, OpenCLDevice::GetDevices() can be used to get devices with different capabilities under a single platform.

See also

Definition at line 44 of file itkOpenCLPlatform.h.

Public Types

typedef OpenCLPlatform Self
enum  VendorType {
  Default, Intel, NVidia, AMD,

Public Member Functions

std::list< std::string > GetExtensions () const
std::string GetExtensionSuffix () const
std::string GetName () const
OpenCLVersion GetOpenCLVersion () const
cl_platform_id GetPlatformId () const
std::string GetProfile () const
std::string GetVendor () const
std::string GetVersion () const
bool HasExtension (const std::string &name) const
bool IsEmbeddedProfile () const
bool IsFullProfile () const
bool IsNull () const
 OpenCLPlatform ()
 OpenCLPlatform (cl_platform_id id)

Static Public Member Functions

static std::list< OpenCLPlatformGetAllPlatforms ()
static OpenCLPlatform GetPlatform (const OpenCLPlatform::VendorType vendor)

Private Attributes

cl_platform_id m_Id
int m_Version

Member Typedef Documentation

Standard class typedefs.

Definition at line 49 of file itkOpenCLPlatform.h.

Member Enumeration Documentation


Definition at line 65 of file itkOpenCLPlatform.h.

Constructor & Destructor Documentation

itk::OpenCLPlatform::OpenCLPlatform ( )

Constructs a default OpenCL platform identifier.

Definition at line 52 of file itkOpenCLPlatform.h.

itk::OpenCLPlatform::OpenCLPlatform ( cl_platform_id  id)

Constructs an OpenCL platform identifier that corresponds to the native OpenCL value id.

Definition at line 56 of file itkOpenCLPlatform.h.

Member Function Documentation

static std::list< OpenCLPlatform > itk::OpenCLPlatform::GetAllPlatforms ( )

Returns a list of all OpenCL platforms that are supported by this host.

std::list< std::string > itk::OpenCLPlatform::GetExtensions ( ) const

Returns a list of the extensions supported by this OpenCL platform.

See also
std::string itk::OpenCLPlatform::GetExtensionSuffix ( ) const

Returns the vendor extension suffix for this platform if the {cl_khr_icd} extension is supported; an empty string otherwise.

std::string itk::OpenCLPlatform::GetName ( ) const

Returns the name of this OpenCL platform.

OpenCLVersion itk::OpenCLPlatform::GetOpenCLVersion ( ) const

Returns the OpenCL versions supported by this platform.

See also
GetVersion(), OpenCLDevice::GetOpenCLVersion()
static OpenCLPlatform itk::OpenCLPlatform::GetPlatform ( const OpenCLPlatform::VendorType  vendor)

Returns a list of all OpenCL platforms that are supported by this host.

cl_platform_id itk::OpenCLPlatform::GetPlatformId ( ) const

Returns the native OpenCL platform identifier for this object.

Definition at line 77 of file itkOpenCLPlatform.h.

std::string itk::OpenCLPlatform::GetProfile ( ) const

Returns the profile that is implemented by this OpenCL platform, usually FULL_PROFILE or EMBEDDED_PROFILE.

See also
IsFullProfile(), IsEmbeddedProfile()
std::string itk::OpenCLPlatform::GetVendor ( ) const

Returns the name of the vendor of this OpenCL platform.

std::string itk::OpenCLPlatform::GetVersion ( ) const

Returns the OpenCL versions supported by this platform as string, usually something like {OpenCL 1.2}.

See also
bool itk::OpenCLPlatform::HasExtension ( const std::string &  name) const

Returns true if this platform has an extension called name, false otherwise. This function is more efficient than checking for name in the return value from GetExtensions(), if the caller is only interested in a single extension. Use extensions() to check for several extensions at once.

See also
bool itk::OpenCLPlatform::IsEmbeddedProfile ( ) const

Returns true if profile() is EMBEDDED_PROFILE, false otherwise.

See also
bool itk::OpenCLPlatform::IsFullProfile ( ) const

Returns true if profile() is FULL_PROFILE, false otherwise.

See also
bool itk::OpenCLPlatform::IsNull ( ) const

Returns true if this OpenCL platform identifier is null.

Definition at line 74 of file itkOpenCLPlatform.h.

Field Documentation

cl_platform_id itk::OpenCLPlatform::m_Id

Definition at line 131 of file itkOpenCLPlatform.h.

int itk::OpenCLPlatform::m_Version

Definition at line 132 of file itkOpenCLPlatform.h.

Generated on 04-09-2015 for elastix by doxygen elastix logo