Class LoadingCudaDetector

  • All Implemented Interfaces:
    CudaDetector

    public class LoadingCudaDetector
    extends java.lang.Object
    implements CudaDetector
    Checks if CUDA is available by attempting to load one of the OpenCV CUDA class' JNI. If the JNI cannot be loaded, then no compatible CUDA runtime is available. This approach is probably the most flexible; it's OS-agnostic, since it lets the JVM handle loading the JNI libraries and linking, and doesn't require knowledge of CUDA installation locations - it just needs to be on the PATH.

    Only one attempt is made to load the JNI, and the result is cached. Any later calls to isCompatibleCudaInstalled() will simply return the cached value.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isCompatibleCudaInstalled()
      Checks if a CUDA runtime is installed that is compatible with what we need for OpenCV.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LoadingCudaDetector

        public LoadingCudaDetector()
    • Method Detail

      • isCompatibleCudaInstalled

        public boolean isCompatibleCudaInstalled()
        Description copied from interface: CudaDetector
        Checks if a CUDA runtime is installed that is compatible with what we need for OpenCV.
        Specified by:
        isCompatibleCudaInstalled in interface CudaDetector