go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
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
OpenCLDevice

Definition at line 44 of file itkOpenCLPlatform.h.

Public Types

using Self = OpenCLPlatform
 
enum  VendorType {
  Default , Intel , NVidia , AMD ,
  IBM
}
 

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
 
VendorType GetVendorType () 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

◆ Self

Standard class typedefs.

Definition at line 48 of file itkOpenCLPlatform.h.

Member Enumeration Documentation

◆ VendorType

Enumerator
Default 
Intel 
NVidia 
AMD 
IBM 

Definition at line 70 of file itkOpenCLPlatform.h.

Constructor & Destructor Documentation

◆ OpenCLPlatform() [1/2]

itk::OpenCLPlatform::OpenCLPlatform ( )
inline

Constructs a default OpenCL platform identifier.

Definition at line 51 of file itkOpenCLPlatform.h.

◆ OpenCLPlatform() [2/2]

itk::OpenCLPlatform::OpenCLPlatform ( cl_platform_id id)
inline

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

Definition at line 58 of file itkOpenCLPlatform.h.

Member Function Documentation

◆ GetAllPlatforms()

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

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

◆ GetExtensions()

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

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

See also
HasExtension()

◆ GetExtensionSuffix()

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.

◆ GetName()

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

Returns the name of this OpenCL platform.

◆ GetOpenCLVersion()

OpenCLVersion itk::OpenCLPlatform::GetOpenCLVersion ( ) const

Returns the OpenCL versions supported by this platform.

See also
GetVersion(), OpenCLDevice::GetOpenCLVersion()

◆ GetPlatform()

static OpenCLPlatform itk::OpenCLPlatform::GetPlatform ( const OpenCLPlatform::VendorType vendor)
static

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

◆ GetPlatformId()

cl_platform_id itk::OpenCLPlatform::GetPlatformId ( ) const
inline

Returns the native OpenCL platform identifier for this object.

Definition at line 88 of file itkOpenCLPlatform.h.

◆ GetProfile()

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()

◆ GetVendor()

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

Returns the name of the vendor of this OpenCL platform.

◆ GetVendorType()

VendorType itk::OpenCLPlatform::GetVendorType ( ) const

Returns the OpenCLPlatform::VendorType of the vendor of this OpenCL platform.

See also
OpenCLPlatform::VendorType

◆ GetVersion()

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

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

See also
GetOpenCLVersion()

◆ HasExtension()

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
GetExtensions()

◆ IsEmbeddedProfile()

bool itk::OpenCLPlatform::IsEmbeddedProfile ( ) const

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

See also
IsFullProfile()

◆ IsFullProfile()

bool itk::OpenCLPlatform::IsFullProfile ( ) const

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

See also
IsEmbeddedProfile()

◆ IsNull()

bool itk::OpenCLPlatform::IsNull ( ) const
inline

Returns true if this OpenCL platform identifier is null.

Definition at line 81 of file itkOpenCLPlatform.h.

Field Documentation

◆ m_Id

cl_platform_id itk::OpenCLPlatform::m_Id
private

Definition at line 161 of file itkOpenCLPlatform.h.

◆ m_Version

int itk::OpenCLPlatform::m_Version
mutableprivate

Definition at line 162 of file itkOpenCLPlatform.h.



Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo