summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLPlatform.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-10-19 19:26:15 +0200
committerMichael Bien <[email protected]>2009-10-19 19:26:15 +0200
commitcb7fa23952a10795215eda50848530828b92895e (patch)
treee9e34a7cf55505fe3a381e474ddeb9d224caf545 /src/com/mbien/opencl/CLPlatform.java
parent9abfd00399e4ca5c351df9cdf25cd85c960b3d44 (diff)
initial import of CLBuffer and CLKernel.
added hashCode(), equals() and toString() methods. updated JUnit test to test new classes.
Diffstat (limited to 'src/com/mbien/opencl/CLPlatform.java')
-rw-r--r--src/com/mbien/opencl/CLPlatform.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/com/mbien/opencl/CLPlatform.java b/src/com/mbien/opencl/CLPlatform.java
index a717564a..d9f8dd25 100644
--- a/src/com/mbien/opencl/CLPlatform.java
+++ b/src/com/mbien/opencl/CLPlatform.java
@@ -11,7 +11,7 @@ public final class CLPlatform {
/**
* OpenCL platform id for this platform.
*/
- public final long platformID;
+ public final long platformID;
private final CL cl;
@@ -94,7 +94,27 @@ public final class CLPlatform {
+" version:"+getVersion()+"]";
}
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final CLPlatform other = (CLPlatform) obj;
+ if (this.platformID != other.platformID) {
+ return false;
+ }
+ return true;
+ }
+ @Override
+ public int hashCode() {
+ int hash = 7;
+ hash = 71 * hash + (int) (this.platformID ^ (this.platformID >>> 32));
+ return hash;
+ }
}