org.encog.util.concurrency
Class DetermineWorkload
java.lang.Object
org.encog.util.concurrency.DetermineWorkload
public class DetermineWorkload
- extends Object
Used by several Encog training methods to break up a workload. Can also be
used to determine the number of threads to use. If zero threads are
specified, Encog will query the processor count and determine the best number
of threads to use.
Field Summary |
static int |
MIN_WORTHWHILE
What is the minimum number of workload entries for a thread to be
worthwhile. |
Constructor Summary |
DetermineWorkload(int threads,
int workloadSize)
Determine the workload. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MIN_WORTHWHILE
public static final int MIN_WORTHWHILE
- What is the minimum number of workload entries for a thread to be
worthwhile.
- See Also:
- Constant Field Values
DetermineWorkload
public DetermineWorkload(int threads,
int workloadSize)
- Determine the workload.
- Parameters:
threads
- Threads to use, or zero to allow Encog to pick.workloadSize
- Total workload size.
calculateWorkers
public List<IntRange> calculateWorkers()
- Calculate the high and low ranges for each worker.
- Returns:
- A list of IntRange objects.
getThreadCount
public int getThreadCount()
- Returns:
- The thread count.
Copyright © 2014. All Rights Reserved.