Class ClearCLBackends


  • public class ClearCLBackends
    extends Object
    Static methods to get the best ClearCL backend.
    Author:
    royer
    • Field Detail

      • sStdOutVerbose

        public static boolean sStdOutVerbose
        This flag controls verbosity of the backend.
    • Constructor Detail

      • ClearCLBackends

        public ClearCLBackends()
    • Method Detail

      • getBackendList

        public static final ArrayList<ClearCLBackendInterface> getBackendList()
        Returns the list of all available ClearCL backends.
        Returns:
        list of available backends
      • isFunctionalBackend

        public static final boolean isFunctionalBackend​(ClearCLBackendInterface pClearCLBackend)
        Tests whether the given backend can run some basic kernels. This is a good way to check if the backend is actually operational on a given platform.
        Parameters:
        pClearCLBackend - backend
        Returns:
        true if backend functional, false otherwise
      • getFunctionalBackend

        public static final ClearCLBackendInterface getFunctionalBackend()
        Returns the first functional backend that can be identified. The returned backend is tested to be able to run some basic kernels.
        Returns:
        functional backend, or null if none can be found.
      • getBestBackend

        public static final ClearCLBackendInterface getBestBackend()
        Returns the best backend. The definition of best means: i) compatible with the OS and OS version. ii) offers the highest OpenCL version. iii) Highest compatibility with CoreMem and native memory access. Moreover, we check if the backends can actually run some basic kernels.
        Returns:
        best ClearCL backend available.