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.
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
pub fn platform_external_memory_import_handle_types_khr(
&self
) -> Result<Vec<cl_name_version>>
pub fn platform_external_memory_import_handle_types_khr(
&self
) -> Result<Vec<cl_name_version>>
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
Performs the conversion.
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more