Struct ocl::Device [] [src]

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

An individual device identifier (an OpenCL device_id).

Methods

impl Device
[src]

Returns the first available device on a platform.

Panics upon OpenCL error.

Returns a single device specified by a wrapped index.

Panics upon OpenCL error.

Returns a DeviceSpecifier useful for precisely specifying a set of devices.

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.

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.

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.

Returns a list of all devices avaliable for a given platform.

Equivalent to ::list(platform, None).

See ::list for other error information.

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.

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

Returns a list of Devices from a list of DeviceIdCores

Returns the device name.

Returns the device vendor as a string.

Returns the maximum workgroup size or an error.

Returns the memory base address alignment offset or an error.

Returns whether or not the device is available for use.

Returns info about the device.

Returns a string containing a formatted list of device properties.

Returns the underlying DeviceIdCore.

Methods from Deref<Target = DeviceIdCore>

Returns a pointer.

Returns the queried and parsed OpenCL version for this device.

Trait Implementations

impl Clone for Device
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Device
[src]

impl Debug for Device
[src]

Formats the value using the given formatter.

impl PartialEq for Device
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Device
[src]

impl ClDeviceIdPtr for Device
[src]

impl<'a> ClDeviceIdPtr for &'a Device
[src]

impl From<DeviceIdCore> for Device
[src]

Performs the conversion.

impl Display for Device
[src]

Formats the value using the given formatter. Read more

impl AsRef<Device> for Device
[src]

Performs the conversion.

impl Deref for Device
[src]

The resulting type after dereferencing

The method called to dereference a value

impl DerefMut for Device
[src]

The method called to mutably dereference a value