(allocator=drv.mem_alloc)
Initialize libraries used by scikit-cuda.

    Initialize the CUBLAS, CULA, CUSOLVER, and MAGMA libraries used by 
    high-level functions provided by scikit-cuda.

    Parameters
    ----------
    allocator : an allocator used internally by some of the high-level
        functions.

    Notes
    -----
    This function does not initialize PyCUDA; it uses whatever device
    and context were initialized in the current host thread.
Initialize libraries used by scikit-cuda.
Initialize libraries used by scikit - cuda .
def init(allocator=drv.mem_alloc):
    """
    Initialize libraries used by scikit-cuda.

    Initialize the CUBLAS, CULA, CUSOLVER, and MAGMA libraries used by 
    high-level functions provided by scikit-cuda.

    Parameters
    ----------
    allocator : an allocator used internally by some of the high-level
        functions.

    Notes
    -----
    This function does not initialize PyCUDA; it uses whatever device
    and context were initialized in the current host thread.
    """

    # CUBLAS uses whatever device is being used by the host thread:
    global _global_cublas_handle, _global_cublas_allocator
    if not _global_cublas_handle:
        from . import cublas  # nest to avoid requiring cublas e.g. for FFT
        _global_cublas_handle = cublas.cublasCreate()
    
    if _global_cublas_allocator is None:
        _global_cublas_allocator = allocator

    # Initializing MAGMA after CUSOLVER causes some functions in the latter to
    # fail with internal errors:
    if _has_magma:
        magma.magma_init()

    global _global_cusolver_handle
    if not _global_cusolver_handle:
        from . import cusolver
        _global_cusolver_handle = cusolver.cusolverDnCreate()

    # culaSelectDevice() need not (and, in fact, cannot) be called
    # here because the host thread has already been bound to a GPU
    # device:
    if _has_cula:
        cula.culaInitialize()
def init ( allocator = drv . mem_alloc ) : # CUBLAS uses whatever device is being used by the host thread: global _global_cublas_handle , _global_cublas_allocator if not _global_cublas_handle : from . import cublas # nest to avoid requiring cublas e.g. for FFT _global_cublas_handle = cublas . cublasCreate ( ) if _global_cublas_allocator is None : _global_cublas_allocator = allocator # Initializing MAGMA after CUSOLVER causes some functions in the latter to # fail with internal errors: if _has_magma : magma . magma_init ( ) global _global_cusolver_handle if not _global_cusolver_handle : from . import cusolver _global_cusolver_handle = cusolver . cusolverDnCreate ( ) # culaSelectDevice() need not (and, in fact, cannot) be called # here because the host thread has already been bound to a GPU # device: if _has_cula : cula . culaInitialize ( )