Package deepnetts.util
Class DeepNettsThreadPool
java.lang.Object
deepnetts.util.DeepNettsThreadPool
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int[]
calculateCellsPerThread
(int width, int threadNum) static int
final int
void
void
run
(Collection<Callable<Void>> tasks) void
setThreadNum
(int threadNum) void
shutdown()
void
Future
<?> Submit a single task to thread pool.
-
Constructor Details
-
DeepNettsThreadPool
public DeepNettsThreadPool() -
DeepNettsThreadPool
public DeepNettsThreadPool(int threadNum)
-
-
Method Details
-
run
- Throws:
InterruptedException
-
submit
-
run
-
shutdown
public void shutdown() -
shutdownNow
public void shutdownNow() -
getThreadNum
public final int getThreadNum() -
setThreadNum
public void setThreadNum(int threadNum) -
getMaxThreadsNum
public static int getMaxThreadsNum() -
calculateCellsPerThread
public static int[] calculateCellsPerThread(int width, int threadNum)
-