Struct fil_ocl::Platform[][src]

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

A platform identifier.

Implementations

impl Platform[src]

pub fn list() -> OclResult<Vec<Platform>>[src]

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

pub fn first() -> OclResult<Platform>[src]

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.

pub fn new(id_core: PlatformIdCore) -> Platform[src]

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.

pub fn list_from_core(platforms: Vec<PlatformIdCore>) -> Vec<Platform>[src]

Returns a list of Platforms from a list of PlatformIdCores

pub fn info(&self, info_kind: PlatformInfo) -> OclResult<PlatformInfoResult>[src]

Returns info about the platform.

pub fn profile(&self) -> OclResult<String>[src]

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.

pub fn version(&self) -> OclResult<String>[src]

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>

  • The major_version.minor_version value returned will be ‘1.2’.

  • TODO: Convert this to new version system returning an OpenclVersion.

pub fn name(&self) -> OclResult<String>[src]

Returns the platform name as a string.

pub fn vendor(&self) -> OclResult<String>[src]

Returns the platform vendor as a string.

pub fn extensions(&self) -> OclResult<Extensions>[src]

Returns the list of platform extensions.

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

pub fn as_core(&self) -> &PlatformIdCore[src]

Returns a reference to the underlying PlatformIdCore.

Methods from Deref<Target = PlatformIdCore>

pub fn as_ptr(&self) -> *mut c_void[src]

Returns a pointer.

pub fn version(&self) -> Result<OpenclVersion, Error>[src]

Returns the queried and parsed OpenCL version for this platform.

Trait Implementations

impl ClPlatformIdPtr for Platform[src]

impl Clone for Platform[src]

impl Copy for Platform[src]

impl Debug for Platform[src]

impl Default for Platform[src]

fn default() -> 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 Deref for Platform[src]

type Target = PlatformIdCore

The resulting type after dereferencing.

impl DerefMut for Platform[src]

impl Display for Platform[src]

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

impl From<Platform> for PlatformIdCore[src]

impl From<PlatformId> for Platform[src]

impl Hash for Platform[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.