summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/CLDevice.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-09-15 18:33:21 +0200
committerMichael Bien <[email protected]>2010-09-15 18:33:21 +0200
commit91938387529fe220323e0c7472f788c78e1ace72 (patch)
treeff843ed5b9c26359aa2319d21f2ef60b0dcd216b /src/com/jogamp/opencl/CLDevice.java
parent39d98824e916487ae838e3ade8230a3193db1ee9 (diff)
removed CLContext factory methods with CLPlatform + CLDevice list combinations.
justification: - information is now no longer needed since every CLDevice knows its CLPlatform - OpenCL device IDs are not portable between CLPlatforms changes: - Context factories will throw CLInvalidPlatformException if the platform of all CLDevices does not match related changes: - [persistance] CLProgramBuilder stores now the ICD suffix to be later able to map binaries back to the platform + device
Diffstat (limited to 'src/com/jogamp/opencl/CLDevice.java')
-rw-r--r--src/com/jogamp/opencl/CLDevice.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/jogamp/opencl/CLDevice.java b/src/com/jogamp/opencl/CLDevice.java
index c60f63f5..d20aa30c 100644
--- a/src/com/jogamp/opencl/CLDevice.java
+++ b/src/com/jogamp/opencl/CLDevice.java
@@ -29,14 +29,17 @@ public final class CLDevice extends CLObject {
private Set<String> extensions;
private final CLDeviceInfoAccessor deviceInfo;
+ private final CLPlatform platform;
- CLDevice(CL cl, long id) {
+ CLDevice(CL cl, CLPlatform platform, long id) {
super(cl, id);
+ this.platform = platform;
this.deviceInfo = new CLDeviceInfoAccessor();
}
CLDevice(CLContext context, long id) {
super(context, id);
+ this.platform = context.getPlatform();
this.deviceInfo = new CLDeviceInfoAccessor();
}
@@ -69,6 +72,11 @@ public final class CLDevice extends CLObject {
this.context = context;
}
+ @Override
+ public CLPlatform getPlatform() {
+ return platform;
+ }
+
/**
* Returns the name of this device.
*/