Struct ocl::Platform[][src]

#[repr(C)]
pub struct Platform(_);

A platform identifier.

Methods

impl Platform
[src]

Important traits for Vec<u8>

Returns a list of all platforms avaliable on the host machine.

Returns the first available platform.

This method differs from Platform::default() in two ways. First, it ignores the OCL_DEFAULT_PLATFORM_IDX environment variable (Platform::default always respects it). Second, this function will not panic if no platforms are available but will instead return an error.

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.

Important traits for Vec<u8>

Returns a list of Platforms from a list of PlatformIdCores

Returns info about the platform.

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.

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.

Returns the platform name as a string.

Returns the platform vendor as a string.

Returns the list of platform extensions.

Extensions defined here must be supported by all devices associated with this platform.

Returns a reference to the underlying PlatformIdCore.

Methods from Deref<Target = PlatformIdCore>

Returns a pointer.

Returns the queried and parsed OpenCL version for this platform.

Trait Implementations

impl Clone for Platform
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Platform
[src]

impl Debug for Platform
[src]

Formats the value using the given formatter. Read more

impl ClPlatformIdPtr for Platform
[src]

impl Default for Platform
[src]

Returns the first (0th) platform available, or the platform specified by the OCL_DEFAULT_PLATFORM_IDX environment variable if it is set.

Panics

Panics upon any OpenCL API error.

impl From<PlatformIdCore> for Platform
[src]

Performs the conversion.

impl From<Platform> for String
[src]

Performs the conversion.

impl From<Platform> for PlatformIdCore
[src]

Performs the conversion.

impl<'a> From<&'a Platform> for PlatformIdCore
[src]

Performs the conversion.

impl Display for Platform
[src]

Formats the value using the given formatter. Read more

impl Deref for Platform
[src]

The resulting type after dereferencing.

Dereferences the value.

impl DerefMut for Platform
[src]

Mutably dereferences the value.

Auto Trait Implementations

impl Send for Platform

impl Sync for Platform