Struct fil_ocl::Device [−][src]
An individual device identifier (an OpenCL device_id).
Implementations
impl Device
[src]
pub fn first<P: Borrow<Platform>>(platform: P) -> OclResult<Device>
[src]
Returns the first available device on a platform.
pub fn by_idx_wrap<P: Borrow<Platform>>(
platform: P,
device_idx_wrap: usize
) -> OclResult<Device>
[src]
platform: P,
device_idx_wrap: usize
) -> OclResult<Device>
Returns a single device specified by a wrapped index.
pub fn specifier() -> DeviceSpecifier
[src]
Returns a DeviceSpecifier
useful for precisely specifying a set
of devices.
pub fn resolve_idxs(
idxs: &[usize],
devices: &[Device]
) -> OclResult<Vec<Device>>
[src]
idxs: &[usize],
devices: &[Device]
) -> OclResult<Vec<Device>>
Resolves a list of indices into a list of valid devices.
devices
is the set of all indexable devices.
Errors
All indices in idxs
must be valid. Use resolve_idxs_wrap
for index
lists which may contain out of bounds indices.
pub fn resolve_idxs_wrap(idxs: &[usize], devices: &[Device]) -> Vec<Device>
[src]
Resolves a list of indices into a list of valid devices.
devices
is the set of all indexable devices.
Wraps indices around using modulo (%
) so that every index is valid.
pub fn list<P: Borrow<Platform>>(
platform: P,
device_types: Option<DeviceType>
) -> OclResult<Vec<Device>>
[src]
platform: P,
device_types: Option<DeviceType>
) -> OclResult<Vec<Device>>
Returns a list of all devices avaliable for a given platform which
optionally match the flags set in the bitfield, device_types
.
Setting device_types
to None
will return a list of all avaliable
devices for platform
regardless of type.
Errors
Returns an Err(ocl::core::Error::Status {...})
enum variant upon any
OpenCL error. Calling .status()
on the returned error will return
an Option(``[ocl::core::Status]``)
which can be unwrapped then
matched to determine the precise reason for failure.
pub fn list_all<P: Borrow<Platform>>(platform: P) -> OclResult<Vec<Device>>
[src]
Returns a list of all devices avaliable for a given platform
.
Equivalent to ::list(platform, None)
.
See ::list
for other
error information.
pub fn list_select<P: Borrow<Platform>>(
platform: P,
device_types: Option<DeviceType>,
idxs: &[usize]
) -> OclResult<Vec<Device>>
[src]
platform: P,
device_types: Option<DeviceType>,
idxs: &[usize]
) -> OclResult<Vec<Device>>
Returns a list of devices filtered by type then selected using a list of indices.
Errors
All indices in idxs
must be valid.
See ::list
for other
error information.
pub fn list_select_wrap<P: Borrow<Platform>>(
platform: P,
device_types: Option<DeviceType>,
idxs: &[usize]
) -> OclResult<Vec<Device>>
[src]
platform: P,
device_types: Option<DeviceType>,
idxs: &[usize]
) -> OclResult<Vec<Device>>
Returns a list of devices filtered by type then selected using a wrapping list of indices.
Wraps indices around (%
) so that every index is valid.
Errors
See ::list
pub fn list_from_core(devices: Vec<DeviceIdCore>) -> Vec<Device>
[src]
Returns a list of Device
s from a list of DeviceIdCore
s
pub fn name(&self) -> OclResult<String>
[src]
Returns the device name.
pub fn vendor(&self) -> OclResult<String>
[src]
Returns the device vendor as a string.
pub fn max_wg_size(&self) -> OclResult<usize>
[src]
Returns the maximum workgroup size or an error.
pub fn mem_base_addr_align(&self) -> OclResult<u32>
[src]
Returns the memory base address alignment offset or an error.
pub fn is_available(&self) -> OclResult<bool>
[src]
Returns whether or not the device is available for use.
pub fn info_raw(&self, info_kind: u32) -> OclResult<Vec<u8>>
[src]
Returns raw info about the device, as a vector of bytes. Intended for use with non-standard OpenCL extensions.
pub fn info(&self, info_kind: DeviceInfo) -> OclResult<DeviceInfoResult>
[src]
Returns info about the device.
pub fn to_string(&self) -> String
[src]
Returns a string containing a formatted list of device properties.
pub fn as_core(&self) -> &DeviceIdCore
[src]
Returns the underlying DeviceIdCore
.
Methods from Deref<Target = DeviceIdCore>
pub fn as_raw(&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 device.
Trait Implementations
impl AsRef<Device> for Device
[src]
impl ClDeviceIdPtr for Device
[src]
impl<'a> ClDeviceIdPtr for &'a Device
[src]
impl Clone for Device
[src]
impl Copy for Device
[src]
impl Debug for Device
[src]
impl Deref for Device
[src]
type Target = DeviceIdCore
The resulting type after dereferencing.
fn deref(&self) -> &DeviceIdCore
[src]
impl DerefMut for Device
[src]
fn deref_mut(&mut self) -> &mut DeviceIdCore
[src]
impl Display for Device
[src]
impl Eq for Device
[src]
impl<'a> From<&'a Device> for DeviceSpecifier
[src]
fn from(device: &'a Device) -> DeviceSpecifier
[src]
impl From<Device> for DeviceSpecifier
[src]
fn from(device: Device) -> DeviceSpecifier
[src]
impl From<Device> for DeviceIdCore
[src]
fn from(d: Device) -> DeviceIdCore
[src]
impl From<DeviceId> for Device
[src]
fn from(core: DeviceIdCore) -> Device
[src]
impl Hash for Device
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Device> for Device
[src]
impl StructuralEq for Device
[src]
impl StructuralPartialEq for Device
[src]
Auto Trait Implementations
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
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>,