U
    ¿|eT!  ã                   @   s¬  d Z ddlZddlZddlZddlZd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T ddlm  mZ ddlT ddlmZ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l0m1Z1 ddl2Z0ddl2m3Z4 ddl2m5Z5 ddl6Z0ddl7Z0dd„ Z8d 9¡ ej: ej: Z:dZ;dZ<dd„ Z=dd„ Z>e=ƒ  ddl?Z?e>ƒ e_@dS )z5
Expose top-level symbols that are safe for import *
é    Nc                  C   sØ   d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|ƒ‚n|dkrŒtdƒ‚zddl}W n tk
r¬   Y n(X | |ƒ}|dk rÔd|j› d�}t|ƒ‚dS )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                 S   s   t tt| j d¡d d… ƒƒS )NÚ.é   )ÚtupleÚmapÚintÚ__version__Úsplit)Úmod© r
   úK/var/www/website-v5/atlas_env/lib/python3.8/site-packages/numba/__init__.pyÚextract_version   s    z._ensure_critical_deps.<locals>.extract_versionNr   )é   é   z.Numba needs Python 3.8 or greater. Got Python r   r   é   )r   é   z-Numba needs NumPy 1.21 or greater. Got NumPy )r   é   zNumba needs NumPy 1.24 or less)r   r   z7Numba requires SciPy version 1.0 or greater. Got SciPy )ÚsysÚversion_infoÚImportErrorÚnumpyÚscipyr   )r   Z	PYVERSIONÚmsgÚnpZnumpy_versionr   Ú
sp_versionr
   r
   r   Ú_ensure_critical_deps   s(    
r   r   )Úget_versions)Úgenerate_version_infoÚversion)Úconfig)ÚtypesÚerrors)ÚtypeofÚprangeÚpndindexÚgdbÚgdb_breakpointÚgdb_initÚ	literallyÚliteral_unroll)Ú*)ÚcfuncÚgenerated_jitÚ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                 K   s   ddl m} |j| f|ŽS )Nr   )Ú	_runtests)Znumba.testingr>   Úmain)ÚargvÚkwdsZruntestsr
   r
   r   Útests   s    rB   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                  C   sž   ddl } ddl}t d¡}| |j¡}|r^ttt| 	¡ ƒƒ}|t
k rhdt
|jf  }t|ƒ‚n
|  d¡ ddlm}m} |tk r”dt|  }t|ƒ‚|ƒ  dS )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   ÚwarnZllvmlite.bindingrE   rF   Ú_min_llvm_version)rG   rH   ÚregexÚmÚverr   rE   rF   r
   r
   r   Ú_ensure_llvm•   s&    

ý

ýrS   c                  C   sò   t jsîz¾tj d¡r"tj d¡ n:tj d¡r<tj d¡ n tj d¡rVtj d¡ nW dS zttjj	dƒƒ svW W dS W n8 t
k
r°   t ¡ d	kr¨t jr¨d
} t | ¡ Y W dS X tj dd¡ W dS    t ¡ d	krèt jrèt d¡ Y nX dS )zU
    Tries to enable SVML if configuration permits use and the library is found.
    Úlinuxz
libsvml.soÚdarwinzlibsvml.dylibÚwinZsvml_dispmdFZhas_svmlÚx86_64z>SVML was found but llvmlite >= 0.23.2 is needed to support it.ZSVMLz-vector-library=SVMLTz'SVML was not found/could not be loaded.)r   ZDISABLE_INTEL_SVMLr   ÚplatformÚ
startswithrH   ZbindingZload_library_permanentlyÚgetattrÚtargetsÚAttributeErrorÚmachineÚDEBUGrG   rN   Z
set_option)r   r
   r
   r   Ú_try_enable_svml¸   s.    

r_   )AÚ__doc__rX   rI   r   rG   r   Ú_versionr   Znumba.misc.init_utilsr   r   r   Z
numba.corer   r   r    Znumba.misc.specialr!   r"   r#   r$   r%   r&   r'   r(   Znumba.core.errorsZnumba.core.typesÚcoreZnumba.core.decoratorsr*   r+   r,   r-   r.   r/   Znumba.np.ufuncr0   r1   r2   r3   r4   r5   r6   r7   Znumba.np.numpy_supportr8   r9   r:   Únumbar;   Znumba.core.withcontextsr<   Zobjmoder=   Znumba.core.target_extensionZnumba.typedrB   r   Ú__all__rM   rO   rS   r_   rH   Z
USING_SVMLr
   r
   r
   r   Ú<module>   sP   *
( (êê#/