Table of Contents

Class OpenCLPlatformInfo

Namespace
DotCompute.Backends.OpenCL.Models
Assembly
DotCompute.Backends.OpenCL.dll

Information about an OpenCL platform. Contains platform vendor, version, and supported extensions.

public sealed class OpenCLPlatformInfo
Inheritance
OpenCLPlatformInfo
Inherited Members

Properties

AcceleratorDevices

Gets accelerator devices available on this platform.

public IEnumerable<OpenCLDeviceInfo> AcceleratorDevices { get; }

Property Value

IEnumerable<OpenCLDeviceInfo>

AvailableDevices

Gets the list of available devices on this platform.

public IReadOnlyList<OpenCLDeviceInfo> AvailableDevices { get; init; }

Property Value

IReadOnlyList<OpenCLDeviceInfo>

CpuDevices

Gets CPU devices available on this platform.

public IEnumerable<OpenCLDeviceInfo> CpuDevices { get; }

Property Value

IEnumerable<OpenCLDeviceInfo>

Extensions

Gets the supported extensions as a space-separated string.

public string Extensions { get; init; }

Property Value

string

GpuDevices

Gets GPU devices available on this platform.

public IEnumerable<OpenCLDeviceInfo> GpuDevices { get; }

Property Value

IEnumerable<OpenCLDeviceInfo>

Name

Gets the platform name.

public string Name { get; init; }

Property Value

string

PlatformId

Gets the native platform ID handle.

public OpenCLTypes.PlatformId PlatformId { get; init; }

Property Value

OpenCLTypes.PlatformId

Profile

Gets the platform profile (FULL_PROFILE or EMBEDDED_PROFILE).

public string Profile { get; init; }

Property Value

string

SupportsOpenCL20

Gets whether this platform supports OpenCL 2.0 or later.

public bool SupportsOpenCL20 { get; }

Property Value

bool

SupportsOpenCL30

Gets whether this platform supports OpenCL 3.0 or later.

public bool SupportsOpenCL30 { get; }

Property Value

bool

TotalComputeUnits

Gets the total number of compute units across all devices.

public uint TotalComputeUnits { get; }

Property Value

uint

TotalGlobalMemory

Gets the total global memory across all devices in bytes.

public ulong TotalGlobalMemory { get; }

Property Value

ulong

Vendor

Gets the platform vendor.

public string Vendor { get; init; }

Property Value

string

Version

Gets the OpenCL version supported by the platform.

public string Version { get; init; }

Property Value

string

Methods

GetBestComputeDevice()

Gets the best device for compute workloads (highest compute units and memory).

public OpenCLDeviceInfo? GetBestComputeDevice()

Returns

OpenCLDeviceInfo

GetDevices(DeviceType, bool)

Gets devices by type with optional filtering.

public IEnumerable<OpenCLDeviceInfo> GetDevices(DeviceType deviceType = DeviceType.All, bool requireCompiler = true)

Parameters

deviceType DeviceType
requireCompiler bool

Returns

IEnumerable<OpenCLDeviceInfo>

ToString()

Creates a string representation of the platform information.

public override string ToString()

Returns

string