Top Description Fields Constructors Methods
com.jogamp.opencl

public Class CLVersion

extends Object
implements Comparable<CLVersion>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
java.util.regex.Matcher, .Pattern

Version of an OpenCL Implementation. All comparison operations use the getSpecVersion() for comparison.
Author
Michael Bien

Field Summary

Modifier and TypeField and Description
public static final CLVersion
public static final CLVersion
public final String
fullversion

The full version String is defined as: OpenCL[space][major_version].[minor_version][space][platform-specific information]

public final String
implversion

The platform specific part of the version string.

public final short
major

Mayor version number.

public final short
minor

Minor version number.

private static final Pattern

Constructor Summary

AccessConstructor and Description
protected
CLVersion(final String version)

Method Summary

Modifier and TypeMethod and Description
public int
compareTo(final CLVersion
the object to be compared.
other
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
private int
compareTo(final int otherMajor, final int otherMinor)

public boolean
equals(final Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Returns true if both fullversion Strings match.
public String
getFullVersion()

Returns the full, unfiltered version string.

public String
public short
public short
public String
getSpecVersion()

Returns '"OpenCL " + major + "." + minor'.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.
public boolean
isAtLeast(final CLVersion other)

public boolean
isAtLeast(final int major, final int minor)

public boolean
isEqual(final CLVersion other)

public boolean
isEqual(final int major, final int minor)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

CL_1_0back to summary
public static final CLVersion CL_1_0
CL_1_1back to summary
public static final CLVersion CL_1_1
fullversionback to summary
public final String fullversion

The full version String is defined as: OpenCL[space][major_version].[minor_version][space][platform-specific information]

implversionback to summary
public final String implversion

The platform specific part of the version string.

See Also
fullversion
majorback to summary
public final short major

Mayor version number.

See Also
fullversion
minorback to summary
public final short minor

Minor version number.

See Also
fullversion
patternback to summary
private static final Pattern pattern

Constructor Detail

CLVersionback to summary
protected CLVersion(final String version)

Method Detail

compareToback to summary
public int compareTo(final CLVersion other)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
other:CLVersion

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

compareToback to summary
private int compareTo(final int otherMajor, final int otherMinor)
equalsback to summary
public boolean equals(final Object obj)

Overrides java.lang.Object.equals.

Returns true if both fullversion Strings match.

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getFullVersionback to summary
public String getFullVersion()

Returns the full, unfiltered version string.

See Also
fullversion
getImplVersionback to summary
public String getImplVersion()
See Also
implversion
getMajorback to summary
public short getMajor()
See Also
major
getMinorback to summary
public short getMinor()
See Also
minor
getSpecVersionback to summary
public String getSpecVersion()

Returns '"OpenCL " + major + "." + minor'.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
isAtLeastback to summary
public boolean isAtLeast(final CLVersion other)
isAtLeastback to summary
public boolean isAtLeast(final int major, final int minor)
isEqualback to summary
public boolean isEqual(final CLVersion other)
isEqualback to summary
public boolean isEqual(final int major, final int minor)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override