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

using Self = OpenCLPlatform
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
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


Definition at line 70 of file itkOpenCLPlatform.h.

Constructor & Destructor Documentation

◆ OpenCLPlatform() [1/2]

itk::OpenCLPlatform::OpenCLPlatform ( )

Constructs a default OpenCL platform identifier.

Definition at line 51 of file itkOpenCLPlatform.h.

◆ OpenCLPlatform() [2/2]

itk::OpenCLPlatform::OpenCLPlatform ( cl_platform_id  id)

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

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

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

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

◆ GetPlatformId()

cl_platform_id itk::OpenCLPlatform::GetPlatformId ( ) const

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

◆ 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

◆ 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

◆ IsEmbeddedProfile()

bool itk::OpenCLPlatform::IsEmbeddedProfile ( ) const

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

See also

◆ IsFullProfile()

bool itk::OpenCLPlatform::IsFullProfile ( ) const

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

See also

◆ IsNull()

bool itk::OpenCLPlatform::IsNull ( ) const

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

Definition at line 161 of file itkOpenCLPlatform.h.

◆ m_Version

int itk::OpenCLPlatform::m_Version

Definition at line 162 of file itkOpenCLPlatform.h.

Generated on Wed 12 Apr 2023 for elastix by doxygen 1.9.6 elastix logo