# Struct ocl_core::types::structs::OpenclVersion [−] [src]

    pub struct OpenclVersion { /* fields omitted */ }

Parsed OpenCL version in the layout `({major}, {minor})`.

ex.: 'OpenCL 1.2' -> `OpenclVersion(1, 2)`.

## Methods

### `impl OpenclVersion`
[src]

#### `pub fn new(major: u16, minor: u16) -> OpenclVersion`
[src]

#### `pub fn max(&self) -> OpenclVersion`
[src]

#### `pub fn from_info_str(ver: &str) -> OclCoreResult<OpenclVersion>`
[src]

Parse the string `ver` and return a dual-integer result as `OpenclVersion`.

Looks for the sequence of chars, "OpenCL" (non-case-sensitive), then splits the word just after that (at '.') and parses the two results into integers (major and minor version numbers).

## Trait Implementations

### `impl Debug for OpenclVersion`
[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`
[src]

Formats the value using the given formatter. Read more

### `impl Clone for OpenclVersion`
[src]

#### `fn clone(&self) -> OpenclVersion`
[src]

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`
1.0.0
[src]

Performs copy-assignment from `source`. Read more

### `impl Copy for OpenclVersion`
[src]

### `impl PartialEq for OpenclVersion`
[src]

#### `fn eq(&self, __arg_0: &OpenclVersion) -> bool`
[src]

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

#### `fn ne(&self, __arg_0: &OpenclVersion) -> bool`
[src]

This method tests for `!=`.

### `impl Eq for OpenclVersion`
[src]

### `impl PartialOrd for OpenclVersion`
[src]

#### `fn partial_cmp(&self, __arg_0: &OpenclVersion) -> Option<Ordering>`
[src]

This method returns an ordering between `self` and `other` values if one exists. Read more

#### `fn lt(&self, __arg_0: &OpenclVersion) -> bool`
[src]

This method tests less than (for `self` and `other`) and is used by the `<` operator. Read more

#### `fn le(&self, __arg_0: &OpenclVersion) -> bool`
[src]

This method tests less than or equal to (for `self` and `other`) and is used by the `<=` operator. Read more

#### `fn gt(&self, __arg_0: &OpenclVersion) -> bool`
[src]

This method tests greater than (for `self` and `other`) and is used by the `>` operator. Read more

#### `fn ge(&self, __arg_0: &OpenclVersion) -> bool`
[src]

This method tests greater than or equal to (for `self` and `other`) and is used by the `>=` operator. Read more

### `impl Ord for OpenclVersion`
[src]

#### `fn cmp(&self, __arg_0: &OpenclVersion) -> Ordering`
[src]

This method returns an `Ordering` between `self` and `other`. Read more

#### `fn max(self, other: Self) -> Self`
1.21.0
[src]

Compares and returns the maximum of two values. Read more

#### `fn min(self, other: Self) -> Self`
1.21.0
[src]

Compares and returns the minimum of two values. Read more

### `impl From<[u16; 2]> for OpenclVersion`
[src]

#### `fn from(ver: [u16; 2]) -> OpenclVersion`
[src]

Performs the conversion.

### `impl Display for OpenclVersion`
[src]

#### `fn fmt(&self, f: &mut Formatter) -> Result`
[src]

Formats the value using the given formatter. Read more

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)