Class DefaultCPUBackend
java.lang.Object
org.episteme.core.technical.backend.cpu.DefaultCPUBackend
- All Implemented Interfaces:
Backend, ComputeBackend, CPUBackend
@AutoService({Backend.class,ComputeBackend.class,CPUBackend.class})
public class DefaultCPUBackend
extends Object
implements CPUBackend
Default (always-available) CPU compute backend.
This is the lowest-priority fallback backend that uses pure Java implementations with multi-core parallel streams. It is always available on any JVM.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates an execution context for running operations.Returns a description of the backend.getId()Returns the unique identifier for this backend (e.g., "javafx", "jmol", "cuda").getName()Returns the display name for UI presentation.intReturns the priority for auto-selection (higher = preferred).booleanChecks if this backend is currently available (libraries loaded, etc.).Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Backend
getAlgorithmProviders, getStatusMessage, isExplicitlyDisabled, shutdownMethods inherited from interface ComputeBackend
createBackendMethods inherited from interface CPUBackend
getAcceleratorType, getType, supportsComplexNumbers, supportsFloatingPoint, supportsParallelOps
-
Constructor Details
-
DefaultCPUBackend
public DefaultCPUBackend()
-
-
Method Details
-
getId
-
getName
-
getDescription
Description copied from interface:BackendReturns a description of the backend.- Specified by:
getDescriptionin interfaceBackend- Specified by:
getDescriptionin interfaceComputeBackend
-
isAvailable
public boolean isAvailable()Description copied from interface:BackendChecks if this backend is currently available (libraries loaded, etc.).Default implementation checks
Backend.isExplicitlyDisabled()and returns false if it is.- Specified by:
isAvailablein interfaceBackend
-
createContext
Description copied from interface:ComputeBackendCreates an execution context for running operations.The context should be used within a try-with-resources block to ensure proper cleanup of resources.
- Specified by:
createContextin interfaceComputeBackend- Returns:
- new execution context
-
getPriority
public int getPriority()Description copied from interface:BackendReturns the priority for auto-selection (higher = preferred). Used when multiple backends are available.- Specified by:
getPriorityin interfaceBackend
-