Package org.cytoscape.cycl
Interface CyCLFactory
public interface CyCLFactory
CyCLFactory is the service that provides access to the OpenCL interface in Cytoscape.
Access CyCLFactory through the service registrar:
CyCLFactory cycl = serviceRegistrar.getService(CyCLFactory.class);
Once you have the CyCLFactory, callers must check to make sure
OpenCL is available on this computer by calling isInitialized(). If
isInitialized() returns false, then no OpenCL is available and all
other calls will fail.
-
Method Summary
Modifier and TypeMethodDescriptioncreateContext
(CyCLDevice device) Create a new context for a deviceReturn the best (or preferred) device for this computerReturn a list of all of the devices available on this computerboolean
Check to see if OpenCL has been initialized.void
makePreferred
(String name) Make a particular device the preferred device.
-
Method Details
-
isInitialized
boolean isInitialized()Check to see if OpenCL has been initialized. If this method returns false, there is no OpenCL context on this platform.- Returns:
- true if OpenCL is availalbe, false otherwise
-
getDevice
CyCLDevice getDevice()Return the best (or preferred) device for this computer- Returns:
- list of all OpenCL devices
-
getDevices
List<CyCLDevice> getDevices()Return a list of all of the devices available on this computer- Returns:
- list of all OpenCL devices
-
makePreferred
Make a particular device the preferred device. This avoids the internal benchmark step and can significantly improve initialization.- Parameters:
name
- the name of the device to be the preferred device
-
createContext
Create a new context for a device- Parameters:
device
- the devide to create the context for- Returns:
- a new context for this device
-