aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLDevice.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-02-22 23:38:56 +0100
committerMichael Bien <[email protected]>2010-02-22 23:38:56 +0100
commitd78faf0ef678cc87f5220d2cb8eccbe173449541 (patch)
tree8a4dcff14f70c88869d6bdc095817474ae729311 /src/com/mbien/opencl/CLDevice.java
parent7c83da1d2e3e8d122e562408a63a13928cc97c83 (diff)
introduced CLObject as common superclass for all OpenCL objects.
Diffstat (limited to 'src/com/mbien/opencl/CLDevice.java')
-rw-r--r--src/com/mbien/opencl/CLDevice.java20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/com/mbien/opencl/CLDevice.java b/src/com/mbien/opencl/CLDevice.java
index 941b8560..3c1c4e25 100644
--- a/src/com/mbien/opencl/CLDevice.java
+++ b/src/com/mbien/opencl/CLDevice.java
@@ -22,29 +22,19 @@ import static com.mbien.opencl.CL.*;
* @see CLContext#getMaxFlopsDevice(com.mbien.opencl.CLDevice.Type)
* @author Michael Bien
*/
-public final class CLDevice {
+public final class CLDevice extends CLObject {
- private final CL cl;
- private CLContext context;
private Set<String> extensions;
private final CLDeviceInfoAccessor deviceInfo;
- /**
- * OpenCL device id for this device.
- */
- public final long ID;
-
CLDevice(CL cl, long id) {
- this.cl = cl;
- this.ID = id;
+ super(cl, id);
this.deviceInfo = new CLDeviceInfoAccessor();
}
CLDevice(CLContext context, long id) {
- this.context = context;
- this.cl = context.cl;
- this.ID = id;
+ super(context, id);
this.deviceInfo = new CLDeviceInfoAccessor();
}
@@ -71,10 +61,6 @@ public final class CLDevice {
throw new IllegalStateException("this device is not associated with a context");
return context.createCommandQueue(this, properties);
}
-
- public CLContext getContext() {
- return context;
- }
/*keep this package private*/
void setContext(CLContext context) {