org.jocl.cloth.utils
Class CLSetup

java.lang.Object
  extended by org.jocl.cloth.utils.CLSetup

public class CLSetup
extends java.lang.Object

This class summarizes one setup for OpenCL execution, consisting of a context with one or more devices and associated command queues.


Constructor Summary
CLSetup(org.jocl.cl_context context, boolean profiling)
          Creates an OpenCL setup for the given context.
CLSetup(org.jocl.cl_context context, java.util.List<org.jocl.cl_device_id> devices, boolean profiling)
          Creates an OpenCL setup for the given context.
 
Method Summary
 void finishCommandQueues()
          Finishes all command queues
 java.util.List<org.jocl.cl_command_queue> getCommandQueues()
          Returns an unmodifiable list containing the command queues in this setup.
 org.jocl.cl_context getContext()
          Return the context of this setup
 java.util.List<org.jocl.cl_device_id> getDevices()
          Returns an unmodifiable list containing the devices in this setup.
 void shutdown()
          Finish and release all command queues and the CL context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CLSetup

public CLSetup(org.jocl.cl_context context,
               java.util.List<org.jocl.cl_device_id> devices,
               boolean profiling)
Creates an OpenCL setup for the given context. This will create one command queue for each each device in the given list.

Parameters:
context - The context
devices - The devices for which command queues should be created
profiling - Whether the command queues should be created with profiling enabled

CLSetup

public CLSetup(org.jocl.cl_context context,
               boolean profiling)
Creates an OpenCL setup for the given context. This will create one command queue for each device in the given context.

Parameters:
context - The context
profiling - Whether the command queues should be created with profiling enabled
Method Detail

shutdown

public void shutdown()
Finish and release all command queues and the CL context


getContext

public org.jocl.cl_context getContext()
Return the context of this setup

Returns:
The context of this setup

getCommandQueues

public java.util.List<org.jocl.cl_command_queue> getCommandQueues()
Returns an unmodifiable list containing the command queues in this setup.

Returns:
The list of command queues in this setup

getDevices

public java.util.List<org.jocl.cl_device_id> getDevices()
Returns an unmodifiable list containing the devices in this setup.

Returns:
The list of devices in this setup

finishCommandQueues

public void finishCommandQueues()
Finishes all command queues