Struct opencl3::platform::Platform[][src]

pub struct Platform { /* fields omitted */ }
Expand description

An OpenCL platform id and methods to query it.
The query methods calls clGetPlatformInfo with the relevant param_name, see: Platform Queries.

Implementations

Accessor for the underlying platform id.

Get the ids of available devices of the given type on the Platform.

Examples
use opencl3::platform::get_platforms;
use cl3::device::CL_DEVICE_TYPE_GPU;

let platforms = get_platforms().unwrap();
assert!(0 < platforms.len());

// Choose a the first platform
let platform = &platforms[0];
let device_ids = platform.get_devices(CL_DEVICE_TYPE_GPU).unwrap();
println!("CL_DEVICE_TYPE_GPU count: {}", device_ids.len());
assert!(0 < device_ids.len());

The OpenCL profile supported by the Platform, it can be FULL_PROFILE or EMBEDDED_PROFILE.

The OpenCL profile version supported by the Platform, e.g. OpenCL 1.2, OpenCL 2.0, OpenCL 2.1, etc.

The OpenCL Platform name string.

The OpenCL Platform vendor string.

A space separated list of extension names supported by the Platform.

The resolution of the host timer in nanoseconds as used by clGetDeviceAndHostTimer.
CL_VERSION_2_1

The detailed (major, minor, patch) version supported by the platform.
CL_VERSION_3_0

An array of description (name and version) structures that lists all the extensions supported by the platform.
CL_VERSION_3_0

cl_khr_external_memory

cl_khr_external_semaphore

cl_khr_external_semaphore

cl_khr_semaphore

Get data about an OpenCL platform. Calls clGetPlatformInfo to get the desired data about the platform.

Unload an OpenCL compiler for a platform. CL_VERSION_1_2

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.