Struct ocl::Platform
[−]
[src]
#[repr(C)]pub struct Platform(_);
A platform identifier.
Methods
impl Platform
[src]
fn list() -> Vec<Platform>
Returns a list of all platforms avaliable on the host machine.
fn new(id_core: PlatformIdCore) -> Platform
Creates a new Platform
from a PlatformIdCore
.
Safety
Not meant to be called unless you know what you're doing.
Use list to get a list of platforms.
fn list_from_core(platforms: Vec<PlatformIdCore>) -> Vec<Platform>
Returns a list of Platform
s from a list of PlatformIdCore
s
fn info(&self, info_kind: PlatformInfo) -> PlatformInfoResult
Returns info about the platform.
fn profile(&self) -> String
Returns the platform profile as a string.
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.
fn version(&self) -> String
Returns the platform driver version as a string.
Returns the OpenCL version supported by the implementation. This version string has the following format:
-
OpenCL
<major_version.minor_version> <platform-specific information> -
The major_version.minor_version value returned will be '1.2'.
-
TODO: Convert this to new version system returning an
OpenclVersion
.
fn name(&self) -> String
Returns the platform name as a string.
fn vendor(&self) -> String
Returns the platform vendor as a string.
fn extensions(&self) -> String
Returns the list of platform extensions as a string.
Returns a space-separated list of extension names (the extension names themselves do not contain any spaces) supported by the platform. Extensions defined here must be supported by all devices associated with this platform.
fn as_core(&self) -> &PlatformIdCore
Returns a reference to the underlying PlatformIdCore
.
Methods from Deref<Target = PlatformIdCore>
fn as_ptr(&self) -> *mut c_void
Returns a pointer.
fn version(&self) -> Result<OpenclVersion, Error>
Returns the queried and parsed OpenCL version for this platform.
Trait Implementations
impl Clone for Platform
[src]
fn clone(&self) -> Platform
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Platform
[src]
impl Debug for Platform
[src]
impl ClPlatformIdPtr for Platform
[src]
fn as_ptr(&self) -> cl_platform_id
impl Default for Platform
[src]
impl From<PlatformIdCore> for Platform
[src]
fn from(core: PlatformIdCore) -> Platform
Performs the conversion.
impl Display for Platform
[src]
impl Deref for Platform
[src]
type Target = PlatformIdCore
The resulting type after dereferencing
fn deref(&self) -> &PlatformIdCore
The method called to dereference a value
impl DerefMut for Platform
[src]
fn deref_mut(&mut self) -> &mut PlatformIdCore
The method called to mutably dereference a value