Struct ocl::Device
[−]
[src]
pub struct Device(_);
A device identifier.
Methods
impl Device
[src]
fn new(id_core: DeviceIdCore) -> Device
Creates a new Device
from a DeviceIdCore
.
Safety
Not meant to be called unless you know what you're doing.
fn list(platform: Platform, device_types: Option<DeviceType>) -> 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
fn list_all(platform: &Platform) -> Vec<Device>
Returns a list of all devices avaliable for a given platform
.
Equivalent to ::list(platform, None)
.
fn list_from_core(devices: Vec<DeviceIdCore>) -> Vec<Device>
Returns a list of Device
s from a list of DeviceIdCore
s
fn name(&self) -> String
Returns the device name.
fn vendor(&self) -> String
Returns the device vendor as a string.
fn info(&self, info_kind: DeviceInfo) -> DeviceInfoResult
Returns info about the device.
fn to_string(&self) -> String
Returns a string containing a formatted list of device properties.
fn as_core(&self) -> &DeviceIdCore
Returns the underlying DeviceIdCore
.
Trait Implementations
impl Debug for Device
[src]
impl Clone for Device
[src]
fn clone(&self) -> Device
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl ClDeviceIdPtr for Device
[src]
unsafe fn as_ptr(&self) -> cl_device_id
impl Into<String> for Device
[src]
impl Into<DeviceIdCore> for Device
[src]
fn into(self) -> DeviceIdCore
Performs the conversion.