org.encog.engine.opencl
Class EncogCL

java.lang.Object
  extended by org.encog.engine.opencl.EncogCL

public class EncogCL
extends Object

An OpenCL platform. A platform is a collection of OpenCL devices from the same vendor. Often, you will have only a single platform.


Constructor Summary
EncogCL()
          Construct an Encog OpenCL object.
 
Method Summary
 boolean areCPUsPresent()
           
 EncogCLDevice chooseDevice()
          Choose a device.
 EncogCLDevice chooseDevice(boolean useGPU)
          Choose a device.
 void disableAllCPUs()
          Disable all devices that are CPU's.
 void enableAllCPUs()
          Enable all devices that are CPU's.
 List<EncogCLDevice> getDevices()
           
 List<EncogCLDevice> getEnabledDevices()
           
 List<EncogCLPlatform> getPlatforms()
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EncogCL

public EncogCL()
Construct an Encog OpenCL object.

Method Detail

areCPUsPresent

public boolean areCPUsPresent()
Returns:
True if CPUs are present.

chooseDevice

public EncogCLDevice chooseDevice()
Choose a device. If a GPU is found, return that. Otherwise try to find a CPU.

Returns:
The first device detected.

chooseDevice

public EncogCLDevice chooseDevice(boolean useGPU)
Choose a device. Simply returns the first device detected.

Parameters:
useGPU - Do we prefer to use the GPU?
Returns:
The first device detected.

disableAllCPUs

public void disableAllCPUs()
Disable all devices that are CPU's. This is a good idea to do if you are going to use regular CPU processing in conjunction with OpenCL processing where the CPU is made to look like a OpenCL device. Otherwise, you end up with the CPU serving as both a "regular CPU training task" and as an "OpenCL training task".


enableAllCPUs

public void enableAllCPUs()
Enable all devices that are CPU's.


getDevices

public List<EncogCLDevice> getDevices()
Returns:
The devices used by EncogCL, this spans over platform boundaries.

getEnabledDevices

public List<EncogCLDevice> getEnabledDevices()
Returns:
The devices used by EncogCL, this spans over platform boundaries. Does not include disabled devices or devices from disabled platforms.

getPlatforms

public List<EncogCLPlatform> getPlatforms()
Returns:
All platforms detected.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.