org.ojalgo.concurrent
Class ProcessorCount

java.lang.Object
  extended by org.ojalgo.concurrent.ProcessorCount

public final class ProcessorCount
extends Object


Field Summary
 int count
           
 boolean modified
           
static int RUNTIME
          Deprecated. Use OjAlgoUtils.HARDWARE instead
 
Method Summary
static ProcessorCount countFullSystem()
          Total number of system threads.
static ProcessorCount countPerCore()
          The number of threads handled by one core.
static ProcessorCount countPerProcessor()
          The number of threads handled by one processor.
static ProcessorCount countPerUnit()
          The number of threads handled by one (L2) cache unit.
 ProcessorCount decrement()
           
 ProcessorCount halve()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RUNTIME

@Deprecated
public static final int RUNTIME
Deprecated. Use OjAlgoUtils.HARDWARE instead
See Also:
Runtime.availableProcessors()

count

public final int count

modified

public final boolean modified
Method Detail

countPerCore

public static ProcessorCount countPerCore()
The number of threads handled by one core.


countPerProcessor

public static ProcessorCount countPerProcessor()
The number of threads handled by one processor.


countPerUnit

public static ProcessorCount countPerUnit()
The number of threads handled by one (L2) cache unit.


countFullSystem

public static ProcessorCount countFullSystem()
Total number of system threads.


decrement

public ProcessorCount decrement()
Returns:
count - 1

halve

public ProcessorCount halve()
Returns:
count / 2