diff options
Diffstat (limited to 'src/com/jogamp/opencl/CLDevice.java')
-rw-r--r-- | src/com/jogamp/opencl/CLDevice.java | 10 |
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. */ |