Package com.jogamp.opencl.util
Class CLMultiContext
- java.lang.Object
-
- com.jogamp.opencl.util.CLMultiContext
-
- All Implemented Interfaces:
CLResource
public class CLMultiContext extends Object implements CLResource
Utility for organizing multipleCLContext
s.- Author:
- Michael Bien
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 ifCLResource.release()
has been called.void
release()
Releases all contexts.String
toString()
static CLMultiContext
wrap(CLContext... contexts)
Creates a multi context with specified contexts.
-
-
-
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 interfaceCLResource
- See Also:
CLContext.release()
-
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 ifCLResource.release()
has been called.- Specified by:
isReleased
in interfaceCLResource
-
-