
    xKg!                        d Z ddlZddlZddlZddlZd Z e        ddlmZ ddlm	Z	  e       d   Z
 e	e
      Z[[	ddlmZ dd	lmZmZ dd
lmZmZmZmZmZmZmZmZ ddl ddlmc mZ ddl ddlmZmZmZm Z m!Z! ddl"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z* ddl+m,Z,m-Z-m.Z. ddl/m0Z0 ddl1Z/ddl1m2Z3 ddl1m4Z4 ddl5Z/ddl6Z/d Z7djq                         ejr                  z   ejr                  z   Z9dZ:dZ;d Z<d Z= e<        ddl>Z>	  e=       e_?        y)z5
Expose top-level symbols that are safe for import *
    Nc                  z   d } t         j                  dd }|dk  rd|d    d|d    d}t        |      ddl} | |      }|d	k  rd
|d    d|d    d}t        |      |dkD  rd|d    d|d    d}t        |      	 ddl} | |      }|dk  rd|j
                   d}t        |      y# t        $ r Y yw xY w)a  
    Make sure the Python, NumPy and SciPy present are supported versions.
    This has to be done _before_ importing anything from Numba such that
    incompatible versions can be reported to the user. If this occurs _after_
    importing things from Numba and there's an issue in e.g. a Numba c-ext, a
    SystemError might have occurred which prevents reporting the likely cause of
    the problem (incompatible versions of critical dependencies).
    c                 l    t        t        t        | j                  j	                  d      d d             S )N.   )tuplemapint__version__split)mods    R/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/numba/__init__.pyextract_versionz._ensure_critical_deps.<locals>.extract_version   s*    Scoo33C8!<=>>    Nr   )   	   z.Numba needs Python 3.9 or greater. Got Python r   r      )r      z-Numba needs NumPy 1.22 or greater. Got NumPy )r   r   z)Numba needs NumPy 2.0 or less. Got NumPy )r   r   z7Numba requires SciPy version 1.0 or greater. Got SciPy )sysversion_infoImportErrornumpyscipyr
   )r   	PYVERSIONmsgnpnumpy_versionr   
sp_versions          r   _ensure_critical_depsr      s   ?   !$I6?A,q1a1##B'Mw>"#1]1%5$6a9#v:"#1]1%5$6a9#	# %U+
L''(+Cc"" 	  s   B. .	B:9B:r   )get_versions)generate_version_infoversion)config)typeserrors)typeofprangepndindexgdbgdb_breakpointgdb_init	literallyliteral_unroll)*)cfuncjitnjitstencil
jit_module)	vectorizeguvectorizethreading_layerget_num_threadsset_num_threadsset_parallel_chunksizeget_parallel_chunksizeget_thread_id)carrayfarray
from_dtype)experimental)objmode_context)parallel_chunksizec                 4    ddl m}  |j                  | fi |S )Nr   )	_runtests)numba.testingrB   main)argvkwdsruntestss      r   testrH   w   s     48==&&&r   aK  
    cfunc
    from_dtype
    guvectorize
    jit
    experimental
    njit
    stencil
    jit_module
    typeof
    prange
    gdb
    gdb_breakpoint
    gdb_init
    vectorize
    objmode
    literal_unroll
    get_num_threads
    set_num_threads
    set_parallel_chunksize
    get_parallel_chunksize
    parallel_chunksize
    )r   +   r   )   r   r   c                     ddl } ddl}t        j                  d      }|j	                  |j
                        }|rRt        t        t        |j                                     }|t        k  r4dt        |j
                  fz   z  }t        |       | j                  d       ddlm}m} |t         k  rdt         |z   z  }t        |       |        y)z,
    Make sure llvmlite is operational.
    r   Nz(\d+)\.(\d+).(\d+)zfNumba requires at least version %d.%d.%d of llvmlite.
Installed version is %s.
Please update llvmlite.z'llvmlite version format not recognized!)llvm_version_infocheck_jit_executionzNumba requires at least version %d.%d.%d of LLVM.
Installed llvmlite is built against version %d.%d.%d.
Please update llvmlite.)warningsllvmliterecompilematchr
   r   r   r	   groups_min_llvmlite_versionr   warnllvmlite.bindingrL   rM   _min_llvm_version)rN   rO   regexmverr   rL   rM   s           r   _ensure_llvmr[      s      JJ,-EH(()ACQXXZ()&&- *X-A-A,CCEC c"" 	?@G,,) "$557 #r   c                  ^   t         j                  s	 t        j                  j	                  d      r t
        j                  j                  d       nt        j                  j	                  d      r t
        j                  j                  d       n@t        j                  j	                  d      r t
        j                  j                  d       ny	  t        t
        j                  j                  d             sy	 t
        j                  j                  dd       yy# t        $ rA t        j                         d	k(  r't         j                  rd
} t        j                  |        Y yw xY w#  t        j                         d	k(  r%t         j                  rt        j                  d       Y yxY w)zU
    Tries to enable SVML if configuration permits use and the library is found.
    linuxz
libsvml.sodarwinzlibsvml.dylibwinsvml_dispmdFhas_svmlx86_64z>SVML was found but llvmlite >= 0.23.2 is needed to support it.SVMLz-vector-library=SVMLTz'SVML was not found/could not be loaded.)r"   DISABLE_INTEL_SVMLr   platform
startswithrO   bindingload_library_permanentlygetattrtargetsAttributeErrormachineDEBUGrN   rU   
set_option)r   s    r   _try_enable_svmlro      sC    $$'	I||&&w/  99,G((2  99/J((/  99-HDwx//77DF ! G ''0FG ! " ##%1fll3CMM#& 	I!X-&,,GHs1   B=E, )D <!E, AE)&E, (E))E, ,>F,)@__doc__re   rP   r   rN   r   _versionr   numba.misc.init_utilsr    r
   r   
numba.corer"   r#   r$   numba.misc.specialr%   r&   r'   r(   r)   r*   r+   r,   numba.core.errorsnumba.core.typescorenumba.core.decoratorsr.   r/   r0   r1   r2   numba.np.ufuncr3   r4   r5   r6   r7   r8   r9   r:   numba.np.numpy_supportr;   r<   r=   numbar>   numba.core.withcontextsr?   objmoder@   numba.core.target_extensionnumba.typedrH   r   __all__rT   rW   r[   ro   rO   
USING_SVML r   r   <module>r      s    	 
 
+#\  
 # 7nY'$[1  $     !   / /+ + + > =   > 6 # ', 	%--- , #)..-12 #   F-^   %& r   