Skip to main content

Platform

Struct Platform 

Source
pub struct Platform(/* private fields */);
Expand description

Abstraction for SYCL platform.

The Platform struct encapsulates a single SYCL platform on which SYCL kernel functions may be executed. A SYCL platform must be associated with a single SYCL backend.

A Platform is also associated with one or more SYCL devices associated with the same SYCL backend.

Implementations§

Source§

impl Platform

Source

pub fn get_platforms() -> Vec<Self>

Returns a Vec containing all SYCL platforms from all SYCL backends available in the system.

Source

pub fn get_devices(&self) -> Vec<Device>

Returns a Vec containing all the root devices associated with this Platform.

Source

pub fn get_info<T: PlatformInfo>(&self) -> T::Item

Queries this Platform for information requested by the generic parameter Param. The associated type Param::Item must be defined in accordance with the info parameters in oneapi_rs::info::platform to facilitate returning the type associated with the Param parameter.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.