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

public interface ComputeBackend extends Backend
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 Details

    • getType

      default String getType()
      Description copied from interface: Backend
      Returns the backend type category (e.g., "plotting", "molecular", "tensor", "math").
      Specified by:
      getType in interface Backend
    • getId

      default String getId()
      Description copied from interface: Backend
      Returns the unique identifier for this backend (e.g., "javafx", "jmol", "cuda").
      Specified by:
      getId in interface Backend
    • getDescription

      default String getDescription()
      Description copied from interface: Backend
      Returns a description of the backend.
      Specified by:
      getDescription in interface Backend
    • createBackend

      default Object createBackend()
      Description copied from interface: Backend
      Creates and returns the backend instance (or returns self if it is the backend).
      Specified by:
      createBackend in interface Backend
      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