Platforms to show: All Mac Windows Linux Cross-Platform

Back to CLPlatformMBS class.

CLPlatformMBS.DeviceCount(types as Int64) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Queries number of devices with given types.
Example
dim Platforms(-1) as CLPlatformMBS = OpenCLMBS.Platforms

for each p as CLPlatformMBS in Platforms
MsgBox p.Name+": "+str(p.DeviceCount(CLDeviceMBS.kDeviceTypeAll))+" devices"
next

types: A bitfield that identifies the type of OpenCL device. The device_type can be used to query specific OpenCL devices or all OpenCL devices available. The valid values for device_type are specified in the following table.

cl_device_typeDescription
kDeviceTypeCPUAn OpenCL device that is the host processor. The host processor runs the OpenCL implementations and is a single or multi-core CPU.
kDeviceTypeGPUAn OpenCL device that is a GPU. By this we mean that the device can also be used to accelerate a 3D API such as OpenGL or DirectX.
kDeviceTypeAcceleratorDedicated OpenCL accelerators (for example the IBM CELL Blade). These devices communicate with the host processor using a peripheral interconnect such as PCIe.
kDeviceTypeDefaultThe default OpenCL device in the system.
kDeviceTypeAllAll OpenCL devices available in the system.

Lasterror is set.

CLPlatformMBS.Devices(types as Int64) as CLDeviceMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Queries devices with given types.
Example
// check all platforms
dim Platforms(-1) as CLPlatformMBS = OpenCLMBS.Platforms

for each p as CLPlatformMBS in Platforms
dim lines(-1) as string

lines.Append p.Name
lines.Append ""

// and show device names
for each d as CLDeviceMBS in p.Devices(CLDeviceMBS.kDeviceTypeAll)
lines.Append d.name
next

MsgBox Join(lines,EndOfLine)
next

types: A bitfield that identifies the type of OpenCL device. The device_type can be used to query specific OpenCL devices or all OpenCL devices available. The valid values for device_type are specified in the following table.

cl_device_typeDescription
kDeviceTypeCPUAn OpenCL device that is the host processor. The host processor runs the OpenCL implementations and is a single or multi-core CPU.
kDeviceTypeGPUAn OpenCL device that is a GPU. By this we mean that the device can also be used to accelerate a 3D API such as OpenGL or DirectX.
kDeviceTypeAcceleratorDedicated OpenCL accelerators (for example the IBM CELL Blade). These devices communicate with the host processor using a peripheral interconnect such as PCIe.
kDeviceTypeDefaultThe default OpenCL device in the system.
kDeviceTypeAllAll OpenCL devices available in the system.

Lasterror is set.

CLPlatformMBS.Extensions as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Returns a space-separated list of extension names (the extension names themselves do not contain any spaces) supported by the platform.
Example
dim Platforms(-1) as CLPlatformMBS = OpenCLMBS.Platforms

for each p as CLPlatformMBS in Platforms
MsgBox p.Name+": "+p.Extensions
next

Extensions defined here must be supported by all devices associated with this platform.
Lasterror is set.

CLPlatformMBS.Name as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Platform name string.
Example
dim Platforms(-1) as CLPlatformMBS = OpenCLMBS.Platforms

for each p as CLPlatformMBS in Platforms
MsgBox p.Name
next

Lasterror is set.

CLPlatformMBS.Profile as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
OpenCL profile string.
Example
dim Platforms(-1) as CLPlatformMBS = OpenCLMBS.Platforms

for each p as CLPlatformMBS in Platforms
MsgBox p.Name+": "+p.Profile
next

Returns the profile name supported by the implementation. The profile name returned can be one of the following strings:

FULL_PROFILE - if the implementation supports the OpenCL specification (functionality defined as part of the core specification and does not require any extensions to be supported).

EMBEDDED_PROFILE - if the implementation supports the OpenCL embedded profile. The embedded profile is defined to be a subset for each version of OpenCL.

Lasterror is set.

CLPlatformMBS.Vendor as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Platform vendor string.
Example
dim Platforms(-1) as CLPlatformMBS = OpenCLMBS.Platforms

for each p as CLPlatformMBS in Platforms
MsgBox p.Name+": "+p.Vendor
next

Lasterror is set.

CLPlatformMBS.Version as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
method OpenCL MBS MacFrameworks Plugin 11.1 ✅ Yes ❌ No ❌ No ✅ Yes All
OpenCL version string.
Example
dim Platforms(-1) as CLPlatformMBS = OpenCLMBS.Platforms

for each p as CLPlatformMBS in Platforms
MsgBox p.Name+": "+p.Version
next

Returns the OpenCL version supported by the implementation. This version string has the following format:

OpenCL<space><major_version.minor_version><space><platform-specific information>

The major_version.minor_version value returned will be 1.0.
Lasterror is set.

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...