org.encog.engine.concurrency.calc
Class CalcOpenCLDevice

java.lang.Object
  extended by org.encog.engine.concurrency.calc.CalcOpenCLDevice

public class CalcOpenCLDevice
extends Object

Holds an OpenCL device to perform calculation on.


Constructor Summary
CalcOpenCLDevice(EncogCLDevice device, ConcurrentCalculate calc)
          Construct a device to use.
 
Method Summary
 CalculationResult calculateError()
          Calculate the error for the neural network using the training set.
 ConcurrentCalculate getCalc()
           
 EncogCLDevice getDevice()
           
 void setNetwork(FlatNetwork network)
          Set the network that we will be using.
 void setTraining(EngineIndexableSet training)
          Set the training data that will be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CalcOpenCLDevice

public CalcOpenCLDevice(EncogCLDevice device,
                        ConcurrentCalculate calc)
Construct a device to use.

Parameters:
device - The underlying device.
calc - The owner.
Method Detail

calculateError

public CalculationResult calculateError()
Calculate the error for the neural network using the training set. If OpenCL is available, and enabled, the OpenCL device will be used to attempt to calculate the error.

Returns:
The error.

getCalc

public ConcurrentCalculate getCalc()
Returns:
The calculation object that this belongs to.

getDevice

public EncogCLDevice getDevice()
Returns:
The underlying device.

setNetwork

public void setNetwork(FlatNetwork network)
Set the network that we will be using.

Parameters:
network - The network to use.

setTraining

public void setTraining(EngineIndexableSet training)
Set the training data that will be used.

Parameters:
training - The training data that will be used.


Copyright © 2011. All Rights Reserved.