org.encog.engine.opencl
Class EncogCLDevice

java.lang.Object
  extended by org.encog.engine.opencl.EncogCLItem
      extended by org.encog.engine.opencl.EncogCLDevice

public class EncogCLDevice
extends EncogCLItem

An OpenCL compute device. One of these will be created for each GPU on your system. Some GPU drivers will also map your CPU as a compute device. A device will likely have parallel processing capabilities. A CPU device will have multiple cores. A GPU, will have multiple compute units. Devices are held by Platforms. A platform is a way to group all devices from a single vendor or driver.


Constructor Summary
EncogCLDevice(EncogCLPlatform platform, org.jocl.cl_device_id device)
          Construct an OpenCL device.
 
Method Summary
 org.jocl.cl_device_id getDevice()
           
 long getDeviceLong(int param)
          Get a long param from the device.
 String getDeviceString(int param)
          Get a config string from the device.
 long getGlobalMemorySize()
           
 long getLocalMemorySize()
           
 long getMaxClockFrequency()
           
 long getMaxComputeUnits()
           
 long getMaxWorkGroupSize()
           
 EncogCLPlatform getPlatform()
           
 EncogCLQueue getQueue()
           
 boolean isCPU()
           
 String toString()
          
 
Methods inherited from class org.encog.engine.opencl.EncogCLItem
getName, getVender, isEnabled, setEnabled, setName, setVender
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EncogCLDevice

public EncogCLDevice(EncogCLPlatform platform,
                     org.jocl.cl_device_id device)
Construct an OpenCL device.

Parameters:
platform - The platform.
device - The device.
Method Detail

getDevice

public org.jocl.cl_device_id getDevice()
Returns:
The OpenCL device.

getDeviceLong

public long getDeviceLong(int param)
Get a long param from the device.

Parameters:
param - The param desired.
Returns:
The param value.

getDeviceString

public String getDeviceString(int param)
Get a config string from the device.

Parameters:
param - The param to get.
Returns:
The config string.

getGlobalMemorySize

public long getGlobalMemorySize()
Returns:
The size of the global memory.

getLocalMemorySize

public long getLocalMemorySize()
Returns:
The size of the local memory.

getMaxClockFrequency

public long getMaxClockFrequency()
Returns:
The max clock frequency.

getMaxComputeUnits

public long getMaxComputeUnits()
Returns:
The number of compute units.

getMaxWorkGroupSize

public long getMaxWorkGroupSize()
Returns:
The max workgroup size.

getPlatform

public EncogCLPlatform getPlatform()
Returns:
The OpenCL platform.

getQueue

public EncogCLQueue getQueue()
Returns:
the queue

isCPU

public boolean isCPU()
Returns:
Determine if this device is a CPU.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.