summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2011-07-19 16:05:32 +0200
committerMichael Bien <[email protected]>2011-07-19 16:05:32 +0200
commitca10f28da06f31deb6b2e17d83e2dd111708aeb7 (patch)
treea50f2e532941081af1cbc1c3a331de31653150c4
parent11ab131ed1d8a743b8987ccc5b404198a42f4749 (diff)
fixed generics to accept subdevices.
-rw-r--r--src/com/jogamp/opencl/util/CLMultiContext.java4
-rw-r--r--src/com/jogamp/opencl/util/concurrent/CLCommandQueuePool.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/com/jogamp/opencl/util/CLMultiContext.java b/src/com/jogamp/opencl/util/CLMultiContext.java
index 8d021ae3..327cdd9a 100644
--- a/src/com/jogamp/opencl/util/CLMultiContext.java
+++ b/src/com/jogamp/opencl/util/CLMultiContext.java
@@ -68,7 +68,7 @@ public class CLMultiContext implements CLResource {
* Creates a multi context with the specified devices.
* The devices don't have to be from the same platform.
*/
- public static CLMultiContext create(Collection<CLDevice> devices) {
+ public static CLMultiContext create(Collection<? extends CLDevice> devices) {
if(devices.isEmpty()) {
throw new IllegalArgumentException("device list was empty");
@@ -103,7 +103,7 @@ public class CLMultiContext implements CLResource {
* filter devices; don't allow the same device to be used in more than one platform.
* example: a CPU available via the AMD and Intel SDKs shouldn't end up in two contexts
*/
- private static Map<CLPlatform, List<CLDevice>> filterPlatformConflicts(Collection<CLDevice> devices) {
+ private static Map<CLPlatform, List<CLDevice>> filterPlatformConflicts(Collection<? extends CLDevice> devices) {
// FIXME: devicename-platform is used as unique device identifier - replace if we have something better
diff --git a/src/com/jogamp/opencl/util/concurrent/CLCommandQueuePool.java b/src/com/jogamp/opencl/util/concurrent/CLCommandQueuePool.java
index 12bfba82..e9ae7acb 100644
--- a/src/com/jogamp/opencl/util/concurrent/CLCommandQueuePool.java
+++ b/src/com/jogamp/opencl/util/concurrent/CLCommandQueuePool.java
@@ -56,7 +56,7 @@ public class CLCommandQueuePool implements CLResource {
return create(mc.getDevices(), modes);
}
- public static CLCommandQueuePool create(Collection<CLDevice> devices, CLCommandQueue.Mode... modes) {
+ public static CLCommandQueuePool create(Collection<? extends CLDevice> devices, CLCommandQueue.Mode... modes) {
List<CLCommandQueue> queues = new ArrayList<CLCommandQueue>(devices.size());
for (CLDevice device : devices) {
queues.add(device.createCommandQueue(modes));