Struct ocl::Platform [] [src]

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 Platforms from a list of PlatformIdCores

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

  • The major_version.minor_version value returned will be 1.2.

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>

unsafe fn as_ptr(&self) -> cl_platform_id

Returns a pointer.

Trait Implementations

impl Debug for Platform
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Copy for Platform
[src]

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 ClPlatformIdPtr for Platform
[src]

unsafe fn as_ptr(&self) -> cl_platform_id

impl Default for Platform
[src]

fn default() -> Platform

Returns the "default value" for a type. Read more

impl Into<String> for Platform
[src]

fn into(self) -> String

Performs the conversion.

impl Into<PlatformIdCore> for Platform
[src]

fn into(self) -> PlatformIdCore

Performs the conversion.

impl Display for Platform
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.

impl AsRef<Platform> for Platform
[src]

fn as_ref(&self) -> &Platform

Performs the conversion.

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