Package org.jocl

Class LibInitializer

java.lang.Object
org.jocl.LibInitializer

class LibInitializer extends Object
Utility class for initializing the OpenCL implementation library
  • Field Details

    • logger

      private static final Logger logger
      The logger used in this class
    • level

      private static final Level level
      The default log level
  • Constructor Details

    • LibInitializer

      private LibInitializer()
      Private constructor to prevent instantiation
  • Method Details

    • initNativeLibrary

      static void initNativeLibrary()
      Initialize the native library by passing the name of the OpenCL implementation to the CL.initNativeLibrary(String) method.
      Throws:
      UnsatisfiedLinkError - If the implementation library could not be loaded.
    • createImplementationNameCandidates

      private static String[] createImplementationNameCandidates()
      Create a list of OpenCL shared library candidates that will be passed to the dlopen/LoadLibrary call on native side. For Windows and Linux, this will be the name of the OpenCL library itself. For MacOS, it will be the path to the OpenCL framework. For Android, this will be an absolute path to the shared library.
      Returns:
      A list of candidate paths / names.