com.jogamp.opencl.util
Class CLMultiContext

java.lang.Object
  extended by com.jogamp.opencl.util.CLMultiContext
All Implemented Interfaces:
CLResource

public class CLMultiContext
extends Object
implements CLResource

Utility for organizing multiple CLContexts.

Author:
Michael Bien

Method Summary
static CLMultiContext create(CLPlatform... platforms)
          Creates a multi context with all devices of the specified platforms.
static CLMultiContext create(CLPlatform[] platforms, CLDevice.Type... types)
          Creates a multi context with all devices of the specified platforms and types.
static CLMultiContext create(CLPlatform[] platforms, Filter<CLDevice>... filters)
          Creates a multi context with all matching devices of the specified platforms.
static CLMultiContext create(Collection<CLDevice> devices)
          Creates a multi context with the specified devices.
 List<CLContext> getContexts()
           
 List<CLDevice> getDevices()
          Returns a list containing all devices used in this multi context.
 boolean isReleased()
          Returns true if CLResource.release() has been called.
 void release()
          Releases all contexts.
 String toString()
           
static CLMultiContext wrap(CLContext... contexts)
          Creates a multi context with specified contexts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static CLMultiContext create(CLPlatform... platforms)
Creates a multi context with all devices of the specified platforms.


create

public static CLMultiContext create(CLPlatform[] platforms,
                                    CLDevice.Type... types)
Creates a multi context with all devices of the specified platforms and types.


create

public static CLMultiContext create(CLPlatform[] platforms,
                                    Filter<CLDevice>... filters)
Creates a multi context with all matching devices of the specified platforms.


create

public static CLMultiContext create(Collection<CLDevice> devices)
Creates a multi context with the specified devices. The devices don't have to be from the same platform.


wrap

public static CLMultiContext wrap(CLContext... contexts)
Creates a multi context with specified contexts.


release

public void release()
Releases all contexts.

Specified by:
release in interface CLResource
See Also:
CLContext.release()

getContexts

public List<CLContext> getContexts()

getDevices

public List<CLDevice> getDevices()
Returns a list containing all devices used in this multi context.


isReleased

public boolean isReleased()
Description copied from interface: CLResource
Returns true if CLResource.release() has been called.

Specified by:
isReleased in interface CLResource

toString

public String toString()
Overrides:
toString in class Object