summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLDevice.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-05-25 00:21:37 +0200
committerMichael Bien <[email protected]>2011-05-25 00:21:37 +0200
commit10c82cf73a2c2e4a944d10294b7d51f4575e0f6e (patch)
treedbdcda2a5a663cce2d3e4b58af06385bdef6d4d5 /src/com/jogamp/opencl/CLDevice.java
parenta0b006f60512e30e362fbe8a15d4b40cc72609e2 (diff)
CLAccessor SPI - initial refactorings.
Diffstat (limited to 'src/com/jogamp/opencl/CLDevice.java')
-rw-r--r--src/com/jogamp/opencl/CLDevice.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/com/jogamp/opencl/CLDevice.java b/src/com/jogamp/opencl/CLDevice.java
index 0381038e..84a27f33 100644
--- a/src/com/jogamp/opencl/CLDevice.java
+++ b/src/com/jogamp/opencl/CLDevice.java
@@ -30,6 +30,7 @@ package com.jogamp.opencl;
import com.jogamp.opencl.util.CLUtil;
import com.jogamp.common.nio.NativeSizeBuffer;
+import com.jogamp.opencl.spi.CLInfoAccessor;
import java.nio.Buffer;
import java.nio.ByteOrder;
import java.util.ArrayList;
@@ -51,11 +52,11 @@ import static com.jogamp.opencl.CL.*;
* @see CLContext#getMaxFlopsDevice(com.jogamp.opencl.CLDevice.Type)
* @author Michael Bien
*/
-public final class CLDevice extends CLObject {
+public class CLDevice extends CLObject {
private Set<String> extensions;
- private final CLDeviceInfoAccessor deviceInfo;
+ private final CLInfoAccessor deviceInfo;
private final CLPlatform platform;
CLDevice(CL cl, CLPlatform platform, long id) {
@@ -64,6 +65,12 @@ public final class CLDevice extends CLObject {
this.deviceInfo = new CLDeviceInfoAccessor(cl, id);
}
+ protected CLDevice(CL cl, CLPlatform platform, CLInfoAccessor deviceAccessor, long id) {
+ super(cl, id);
+ this.platform = platform;
+ this.deviceInfo = deviceAccessor;
+ }
+
CLDevice(CLContext context, long id) {
super(context, id);
this.platform = context.getPlatform();
@@ -691,7 +698,7 @@ public final class CLDevice extends CLObject {
return CLUtil.obtainDeviceProperties(this);
}
- private final static class CLDeviceInfoAccessor extends CLInfoAccessor {
+ private final static class CLDeviceInfoAccessor extends CLTLInfoAccessor {
private final CL cl;
private final long ID;