org.encog.util.concurrency
Class DetermineWorkload
- java.lang.Object
-
- org.encog.util.concurrency.DetermineWorkload
-
public class DetermineWorkload extends java.lang.ObjectUsed 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
Fields Modifier and Type Field and Description static intMIN_WORTHWHILEWhat is the minimum number of workload entries for a thread to be worthwhile.
-
Constructor Summary
Constructors Constructor and Description DetermineWorkload(int threads, int workloadSize)Determine the workload.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.util.List<IntRange>calculateWorkers()Calculate the high and low ranges for each worker.intgetThreadCount()
-
-
-
Field Detail
-
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
-
-
Constructor Detail
-
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.
-
-
Method Detail
-
calculateWorkers
public java.util.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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG