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]
fn new(major: u16, minor: u16) -> OpenclVersion
fn max(&self) -> OpenclVersion
fn from_info_str(ver: &str) -> OclResult<OpenclVersion>
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]
impl Clone for OpenclVersion[src]
fn clone(&self) -> OpenclVersion
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 Copy for OpenclVersion[src]
impl PartialEq for OpenclVersion[src]
fn eq(&self, __arg_0: &OpenclVersion) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &OpenclVersion) -> bool
This method tests for !=.
impl Eq for OpenclVersion[src]
impl PartialOrd for OpenclVersion[src]
fn partial_cmp(&self, __arg_0: &OpenclVersion) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, __arg_0: &OpenclVersion) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, __arg_0: &OpenclVersion) -> bool
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
This method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, __arg_0: &OpenclVersion) -> bool
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
This method returns an Ordering between self and other. Read more
impl From<[u16; 2]> for OpenclVersion[src]
fn from(ver: [u16; 2]) -> OpenclVersion
Performs the conversion.