Struct fil_ocl::flags::DeviceType[][src]

pub struct DeviceType { /* fields omitted */ }

cl_device_type - bitfield

  • CL_DEVICE_TYPE_DEFAULT: The default OpenCL device in the system.
  • CL_DEVICE_TYPE_CPU: An OpenCL device that is the host processor. The host processor runs the OpenCL implementations and is a single or multi-core CPU.
  • CL_DEVICE_TYPE_GPU: An OpenCL device that is a GPU. By this we mean that the device can also be used to accelerate a 3D API such as OpenGL or DirectX.
  • CL_DEVICE_TYPE_ACCELERATOR: Dedicated OpenCL accelerators (for example the IBM CELL Blade). These devices communicate with the host processor using a peripheral interconnect such as PCIe.
  • CL_DEVICE_TYPE_ALL: A union of all flags.

Implementations

impl DeviceType[src]

pub fn new() -> DeviceType[src]

pub fn system_default(self) -> DeviceType[src]

pub fn cpu(self) -> DeviceType[src]

pub fn gpu(self) -> DeviceType[src]

pub fn accelerator(self) -> DeviceType[src]

pub fn custom(self) -> DeviceType[src]

impl DeviceType[src]

pub const DEFAULT: DeviceType[src]

pub const CPU: DeviceType[src]

pub const GPU: DeviceType[src]

pub const ACCELERATOR: DeviceType[src]

pub const CUSTOM: DeviceType[src]

pub const ALL: DeviceType[src]

pub const fn empty() -> DeviceType[src]

Returns an empty set of flags

pub const fn all() -> DeviceType[src]

Returns the set containing all flags.

pub const fn bits(&self) -> u64[src]

Returns the raw value of the flags currently stored.

pub fn from_bits(bits: u64) -> Option<DeviceType>[src]

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

pub const fn from_bits_truncate(bits: u64) -> DeviceType[src]

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

pub const unsafe fn from_bits_unchecked(bits: u64) -> DeviceType[src]

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

pub const fn is_empty(&self) -> bool[src]

Returns true if no flags are currently stored.

pub const fn is_all(&self) -> bool[src]

Returns true if all flags are currently set.

pub const fn intersects(&self, other: DeviceType) -> bool[src]

Returns true if there are flags common to both self and other.

pub const fn contains(&self, other: DeviceType) -> bool[src]

Returns true all of the flags in other are contained within self.

pub fn insert(&mut self, other: DeviceType)[src]

Inserts the specified flags in-place.

pub fn remove(&mut self, other: DeviceType)[src]

Removes the specified flags in-place.

pub fn toggle(&mut self, other: DeviceType)[src]

Toggles the specified flags in-place.

pub fn set(&mut self, other: DeviceType, value: bool)[src]

Inserts or removes the specified flags depending on the passed value.

Trait Implementations

impl Binary for DeviceType[src]

impl BitAnd<DeviceType> for DeviceType[src]

type Output = DeviceType

The resulting type after applying the & operator.

pub fn bitand(self, other: DeviceType) -> DeviceType[src]

Returns the intersection between the two sets of flags.

impl BitAndAssign<DeviceType> for DeviceType[src]

pub fn bitand_assign(&mut self, other: DeviceType)[src]

Disables all flags disabled in the set.

impl BitOr<DeviceType> for DeviceType[src]

type Output = DeviceType

The resulting type after applying the | operator.

pub fn bitor(self, other: DeviceType) -> DeviceType[src]

Returns the union of the two sets of flags.

impl BitOrAssign<DeviceType> for DeviceType[src]

pub fn bitor_assign(&mut self, other: DeviceType)[src]

Adds the set of flags.

impl BitXor<DeviceType> for DeviceType[src]

type Output = DeviceType

The resulting type after applying the ^ operator.

pub fn bitxor(self, other: DeviceType) -> DeviceType[src]

Returns the left flags, but with all the right flags toggled.

impl BitXorAssign<DeviceType> for DeviceType[src]

pub fn bitxor_assign(&mut self, other: DeviceType)[src]

Toggles the set of flags.

impl Clone for DeviceType[src]

impl Copy for DeviceType[src]

impl Debug for DeviceType[src]

impl Default for DeviceType[src]

impl Eq for DeviceType[src]

impl Extend<DeviceType> for DeviceType[src]

impl From<DeviceType> for DeviceSpecifier[src]

impl FromIterator<DeviceType> for DeviceType[src]

impl Hash for DeviceType[src]

impl LowerHex for DeviceType[src]

impl Not for DeviceType[src]

type Output = DeviceType

The resulting type after applying the ! operator.

pub fn not(self) -> DeviceType[src]

Returns the complement of this set of flags.

impl Octal for DeviceType[src]

impl Ord for DeviceType[src]

impl PartialEq<DeviceType> for DeviceType[src]

impl PartialOrd<DeviceType> for DeviceType[src]

impl StructuralEq for DeviceType[src]

impl StructuralPartialEq for DeviceType[src]

impl Sub<DeviceType> for DeviceType[src]

type Output = DeviceType

The resulting type after applying the - operator.

pub fn sub(self, other: DeviceType) -> DeviceType[src]

Returns the set difference of the two sets of flags.

impl SubAssign<DeviceType> for DeviceType[src]

pub fn sub_assign(&mut self, other: DeviceType)[src]

Disables all flags enabled in the set.

impl UpperHex for DeviceType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.