Struct ocl::Device [] [src]

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

An individual device identifier (an OpenCL device_id).

Methods

impl Device
[src]

[src]

Returns the first available device on a platform.

[src]

Returns a single device specified by a wrapped index.

[src]

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

[src]

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.

Important traits for Vec<u8>
[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.

[src]

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.

[src]

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

Equivalent to ::list(platform, None).

See ::list for other error information.

[src]

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.

[src]

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

Important traits for Vec<u8>
[src]

Returns a list of Devices from a list of DeviceIdCores

[src]

Returns the device name.

[src]

Returns the device vendor as a string.

[src]

Returns the maximum workgroup size or an error.

[src]

Returns the memory base address alignment offset or an error.

[src]

Returns whether or not the device is available for use.

[src]

Returns info about the device.

[src]

Returns a string containing a formatted list of device properties.

[src]

Returns the underlying DeviceIdCore.

Methods from Deref<Target = DeviceIdCore>

[src]

Returns a pointer.

[src]

Returns the queried and parsed OpenCL version for this device.

Trait Implementations

impl From<Device> for DeviceSpecifier
[src]

[src]

Performs the conversion.

impl<'a> From<&'a Device> for DeviceSpecifier
[src]

[src]

Performs the conversion.

impl Clone for Device
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Device
[src]

impl Debug for Device
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for Device
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for Device
[src]

impl ClDeviceIdPtr for Device
[src]

[src]

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

[src]

impl From<DeviceIdCore> for Device
[src]

[src]

Performs the conversion.

impl From<Device> for String
[src]

[src]

Performs the conversion.

impl From<Device> for DeviceIdCore
[src]

[src]

Performs the conversion.

impl Display for Device
[src]

[src]

Formats the value using the given formatter. Read more

impl AsRef<Device> for Device
[src]

[src]

Performs the conversion.

impl Deref for Device
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl DerefMut for Device
[src]

[src]

Mutably dereferences the value.

Auto Trait Implementations

impl Send for Device

impl Sync for Device