Struct fil_ocl::Platform [−][src]
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 Platform
s from a list of PlatformIdCore
s
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.
fn deref(&self) -> &PlatformIdCore
[src]
impl DerefMut for Platform
[src]
fn deref_mut(&mut self) -> &mut PlatformIdCore
[src]
impl Display for Platform
[src]
impl<'a> From<&'a Platform> for PlatformIdCore
[src]
fn from(p: &Platform) -> PlatformIdCore
[src]
impl From<Platform> for PlatformIdCore
[src]
fn from(p: Platform) -> PlatformIdCore
[src]
impl From<PlatformId> for Platform
[src]
fn from(core: PlatformIdCore) -> Platform
[src]
impl Hash for Platform
[src]
Auto Trait Implementations
impl RefUnwindSafe for Platform
impl Send for Platform
impl Sync for Platform
impl Unpin for Platform
impl UnwindSafe for Platform
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,