Interface ComputeBackend
- All Superinterfaces:
Backend
- All Known Subinterfaces:
AudioBackend, CPUBackend, DistributedBackend, GPUBackend, LinearAlgebraBackend<E>, MechanicsBackend, QuantumBackend, SIMDBackend, TensorBackend, VideoBackend, VisionBackend
- All Known Implementing Classes:
AbstractNativeCPULinearAlgebraBackend, AbstractNativeFFMBLASBackend, AbstractNativeSIMDLinearAlgebraBackend, AmazonBraketBackend, CARMALinearAlgebraProvider, ColtBackend, CommonsMathBackend, CPUDenseLinearAlgebraProvider, CPUDenseTensorBackend, CPUSparseLinearAlgebraProvider, CPUSparseTensorBackend, DefaultCPUBackend, EJMLBackend, EpistemeLinearAlgebraBackend, GenesisBackend, GRPCLinearAlgebraBackend, HDF5IOBackend, IBMQBackend, JavaAWTVisionBackend, JavaCVMediaBackend, JavaSoundAudioBackend, JBlasBackend, MinimAudioBackend, MPIDistributedBackend, MulticoreAudioBackend, MulticoreVideoBackend, MulticoreVisionBackend, NativeArrowBackend, NativeBulletBackend, NativeCollisionBackend, NativeCPUCBindingVisionBackend, NativeCPULinearAlgebraComplexBackend, NativeCPULinearAlgebraRealBackend, NativeCPUTensorBackend, NativeCPUVisionBackend, NativeCUDADenseLinearAlgebraDoubleBackend, NativeCUDADenseLinearAlgebraFloatBackend, NativeCUDANBodyBackend, NativeCUDASparseLinearAlgebraDoubleBackend, NativeCUDASparseLinearAlgebraFloatBackend, NativeCUDATensorBackend, NativeCUDAVisionBackend, NativeFFMBLASComplexBackend, NativeFFMBLASRealBackend, NativeFFTBackend, NativeJavaCVMediaBackend, NativeJBulletBackend, NativeMiniAudioBackend, NativeMPFRDenseLinearAlgebraBackend, NativeMPFRSparseLinearAlgebraBackend, NativeND4JCUDASparseTensorBackend, NativeND4JCUDATensorBackend, NativeND4JLinearAlgebraBackend, NativeND4JTensorBackend, NativeOpenCLDenseLinearAlgebraDoubleBackend, NativeOpenCLDenseLinearAlgebraFloatBackend, NativeOpenCLFFTBackend, NativeOpenCLLatticeBoltzmannBackend, NativeOpenCLNBodyBackend, NativeOpenCLSparseLinearAlgebraDoubleBackend, NativeOpenCLSparseLinearAlgebraFloatBackend, NativeOpenCLVisionBackend, NativeQuantumBackend, NativeSIMDComplexBackend, NativeSIMDRealBackend, NativeSimulationBackend, NativeVideoBackend, ND4JBaseTensorBackend, ODEBackend, ONNXBackend, PythonQuantumBackend, QiskitAerBackend, QiskitBackend, Quantum4JBackend, SparkDistributedBackend, StandardLinearAlgebraProvider, StrangeBackend, StrassenLinearAlgebraProvider, TarsosAudioBackend, VLCJMediaBackend
Service Provider Interface for pluggable compute backends.
Implementations can provide CPU, GPU, quantum, or distributed computing backends. Now unified with the Backend system.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptiondefault ObjectCreates and returns the backend instance (or returns self if it is the backend).Creates an execution context for running operations.Returns the type of hardware accelerator used by this backend.default StringReturns a description of the backend.default StringgetId()Returns the unique identifier for this backend (e.g., "javafx", "jmol", "cuda").default StringgetType()Returns the backend type category (e.g., "plotting", "molecular", "tensor", "math").default booleanChecks if this backend supports complex number arithmetic.default booleanChecks if this backend supports floating-point arithmetic.default booleanChecks if this backend supports parallel operations.Methods inherited from interface Backend
getAlgorithmProviders, getName, getPriority, getStatusMessage, isAvailable, isExplicitlyDisabled, shutdown
-
Method Details
-
getType
-
getId
-
getDescription
Description copied from interface:BackendReturns a description of the backend.- Specified by:
getDescriptionin interfaceBackend
-
createBackend
Description copied from interface:BackendCreates and returns the backend instance (or returns self if it is the backend).- Specified by:
createBackendin interfaceBackend- Returns:
- The backend implementation object
-
createContext
ExecutionContext createContext()Creates an execution context for running operations.The context should be used within a try-with-resources block to ensure proper cleanup of resources.
- Returns:
- new execution context
- Throws:
IllegalStateException- if backend is not available
-
supportsParallelOps
default boolean supportsParallelOps()Checks if this backend supports parallel operations.- Returns:
- true if parallel execution is supported
-
supportsFloatingPoint
default boolean supportsFloatingPoint()Checks if this backend supports floating-point arithmetic.- Returns:
- true if floating-point is supported
-
supportsComplexNumbers
default boolean supportsComplexNumbers()Checks if this backend supports complex number arithmetic.- Returns:
- true if complex numbers are supported
-
getAcceleratorType
HardwareAccelerator getAcceleratorType()Returns the type of hardware accelerator used by this backend.- Returns:
- the accelerator type
-