
    J/Phʱ                        d dl mZ d dlZd dlZd dlmZmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZ d dl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m Z m!Z! d dl"m#Z# d dl$m%Z% d dl&m'Z'm(Z(m)Z)m*Z*m+Z+ d dl,m-Z-  ej.         ej/        d                    Z0e0Z1e0Z2 G d de3          Z4ej5        d             Z6 G d de3          Z7 G d de3          Z8d Z9 G d de3          Z:ej5        d             Z; e;             dS )    )defaultdictN)permutations	takewhile)contextmanager)cached_property)ir)Constant)typesutils	datamodel	debuginfofuncdescconfigcgutilsimputils)eventerrorstargetconfig)_dynfunc
_helperlib)global_compiler_lock	PythonAPI)user_functionuser_generatorbuiltin_registryimpl_ret_borrowedRegistryLoader)builtins   c                   H    e Zd ZdZd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 ZdS )OverloadSelectora   
    An object matching an actual signature against a registry of formal
    signatures and choosing the best candidate, if any.

    In the current implementation:
    - a "signature" is a tuple of type classes or type instances
    - the "best candidate" is the most specific match
    c                 "    g | _         i | _        d S N)versions_cacheselfs    O/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/numba/core/base.py__init__zOverloadSelector.__init__%   s        c                 |    | j                             |          }||                     |          }|| j         |<   |S r$   )r&   get_find)r(   sigouts      r)   findzOverloadSelector.find*   s:    kooc"";**S//C"DK
r+   c                     |                      |          }|r||                     |                   S t          j        |  d|           )Nz, )_select_compatible_best_signaturer   NumbaNotImplementedError)r(   r/   
candidatess      r)   r.   zOverloadSelector._find1   sV    ,,S11
 	Dd22:>>??1T2B2BS2B2BCCCr+   c                 Z    i }| j         D ] \  }}|                     ||          r|||<   !|S )zL
        Select all compatible signatures and their implementation.
        )r%   _match_arglist)r(   r/   r0   ver_sigimpls        r)   r3   z#OverloadSelector._select_compatible8   sE     !] 	$ 	$MGT""7C00 $#G
r+   c                    |                      |          \  }t          |          dk    r|d                  t          t          fd|                    }t          |          dk    rpd                    t          |                    g}|D ]"}|d                    |||                   gz  }#t          j        d                    |                    |d         S )zB
        Returns the best signature out of the candidates
           r   c                     |          k    S r$    )x
firstscore
genericitys    r)   <lambda>z2OverloadSelector._best_signature.<locals>.<lambda>J   s    JqMZ,G r+   z{n} ambiguous signatures)nz
{0} => {1}
)_sort_signatureslenlistr   formatr   NumbaTypeErrorjoin)r(   r6   orderedsamemsgr/   r@   rA   s         @@r)   r4   z OverloadSelector._best_signatureB   s     #33J??w<<!#GAJ/J	"G"G"G"G"G")+ + , ,D4yy1}}1883t998EEF G GCL//Z_EEFFCC+DIIcNN;;;qzr+   c                 $   t          t                    t          |                                d          D ].\  }}|                     ||          }|r|xx         dz  cc<   /t          |                                fd          }|fS )z
        Sort signatures in ascending level of genericity.

        Returns a 2-tuple:

            * ordered list of signatures
            * dictionary containing genericity scores
           )r)formal_argsactual_argsr<   c                     |          S r$   r>   )r?   rA   s    r)   rB   z3OverloadSelector._sort_signatures.<locals>.<lambda>d   s    *Q- r+   )key)r   intr   keysr8   sorted)r(   r6   thisothermatchedrK   rA   s         @r)   rE   z!OverloadSelector._sort_signaturesS   s     !%%
'
(9(9Q??? 	& 	&KD%))d)NNG &4   A%   **0G0G0G0GHHH
""r+   c                 h   |r^t          |d         t          j                  r>t          |          t          |          z
  dz   }|dd         |d         j        f|z  z   }t          |          t          |          k    rdS t          ||          D ]\  }}|                     ||          s dS dS )z
        Returns True if the signature is "matching".
        A formal signature is "matching" if the actual signature matches exactly
        or if the formal signature is a compatible generic signature.
        r<   NFT)
isinstancer
   VarArgrF   dtypezip_match)r(   rQ   rR   ndiffformalactuals         r)   r8   zOverloadSelector._match_arglistg   s      	N:k"ou|DD 	N$$s;'7'77!;E%crc*k"o.C-E-MMK{s;////5!+{;; 	 	NFF;;vv.. uu tr+   c                    ||k    rdS t           j        |k    rdS t          |t                    rSt	          |t           j                  r;t          |t                    rt	          ||          rdS t          ||          rdS d S d S d S )NT)r
   Anyr]   type
issubclassType)r(   rc   rd   s      r)   ra   zOverloadSelector._match{   s    V4Y&  4%% 	*VUZ*H*H 	&$'' Jvv,F,F tFF++ t	 	 	 	 r+   c                     t          |t                    sJ ||f            | j                            ||f           | j                                         dS )zB
        Add a formal signature and its associated value.
        N)r]   tupler%   appendr&   clear)r(   valuer/   s      r)   rl   zOverloadSelector.append   sZ     #u%%33s|333c5\***r+   N)__name__
__module____qualname____doc__r*   r1   r.   r3   r4   rE   r8   ra   rl   r>   r+   r)   r"   r"      s           
  D D D    "# # #(  (      r+   r"   c                     t          j        dt          d                     t          j        t
          j        fD ]6} |                                 D ]\  }}d|z   }t          j        ||            7t          j        j	        
                                D ]V}t          |t                    r?t          |t                    r*t          j        d|j        z  t          |                     WdS )zM
    Execute once to install special symbols into the LLVM symbol table.
    _Py_NoneStructNnumba_zPyExc_%s)ll
add_symbolidr   	c_helpersr   itemsr   r   __dict__valuesr]   rg   rh   BaseExceptionro   )ry   py_name	c_addressc_nameobjs        r)   _load_global_helpersr      s     M"BtHH--- !*H,>? - -	"+//"3"3 	- 	-GY'FM&),,,,	-
 ~&--// @ @c4   	@Z]%C%C 	@M*5r#ww???@ @r+   c                   D   e Zd ZdZdZdZdZdZej	        Z	e
d             Zej        d             ZdZdZdZdZdZdZdZdZd Zd Zd Zd	 Zd
dddZd Zd Zd Zd Ze
d             Zed             Z ed             Z!d Z"d Z#d Z$d Z%d Z&d Z'd Z(didZ)didZ*d Z+d Z,d Z-d  Z.d! Z/djd"Z0d# Z1d$ Z2d% Z3d& Z4d' Z5djd(Z6djd)Z7d* Z8d+ Z9d, Z:d- Z;dkd/Z<d0 Z=d1 Z>d2 Z?d3 Z@d4 ZAd5 ZBd6 ZCd7 ZDd8 ZEd9 ZFd: ZGd; ZHd< ZId= ZJd> ZKd? ZLd@ ZMdA ZNdldBZOdC ZPdD ZQdjdEZRdF ZSdG ZTdH ZUdI ZVdJ ZWdK ZXi dfdLZYi dd.fdMZZi fdNZ[dO Z\dP Z]dQ Z^dR Z_dS Z`dT ZadmdVZbdndWZcdodXZddjdYZedZ Zfd[ Zgdjd\Zhd] Zid^ Zjd_ Zkd` Zlda Zmdb Zndc Zodd Zpe
de             Zqerdf             Zsdg Ztdh ZudS )pBaseContexta   

    Notes on Structure
    ------------------

    Most objects are lowered as plain-old-data structure in the generated
    llvm.  They are passed around by reference (a pointer to the structure).
    Only POD structure can live across function boundaries by copying the
    data.
    Fc                 @    t           j        t           j        S | j        S r$   )r   BOUNDSCHECK_boundscheckr'   s    r)   enable_boundscheckzBaseContext.enable_boundscheck   s    )%%  r+   c                     || _         d S r$   )r   )r(   rn   s     r)   r   zBaseContext.enable_boundscheck   s    !r+   Nc                    t                       t          j        | _        || _        ddlm} || _        ||         | _        i | _	        t          t                    | _        t          t                    | _        t          t                    | _        t                      | _        t                      | _        i | _        i | _        i | _        d | _        g | _        d| _        t.          j        | _        |                                  d S )Nr   )target_registryF)r   r   MACHINE_BITSaddress_sizetyping_contextnumba.core.target_extensionr   target_nametarget_registriesr   r"   _defns	_getattrs	_setattrs_casts_get_constants_generatorsspecial_opscached_internal_func_pid_codelib_stackr   r   default_managerdata_model_managerinit)r(   r   r   r   s       r)   r*   zBaseContext.__init__   s    !.,??????!%f- !"233$%566$%566&((.00$&!	 !"+"; 			r+   c                     dS )z3
        For subclasses to add initializer
        Nr>   r'   s    r)   r   zBaseContext.init         r+   c                     |                                   |                     t                     | j                                         dS )zy
        Refresh context with new declarations from known registries.
        Useful for third-party extensions.
        N)load_additional_registriesinstall_registryr   r   refreshr'   s    r)   r   zBaseContext.refresh  sJ     	''))) 	./// 	##%%%%%r+   c                     dS )zT
        Load target-specific registries.  Can be overridden by subclasses.
        Nr>   r'   s    r)   r   z&BaseContext.load_additional_registries  r   r+   r>   abi_tagsuidc                2    t          j        ||||          S )z(
        Perform name mangling.
        r   )r   default_mangler)r(   namer
   r   r   s        r)   manglerzBaseContext.mangler  s     'ehCPPPPr+   c                     |j         S )zGet the environment name given a FunctionDescriptor.

        Use this instead of the ``fndesc.env_name`` so that the target-context
        can provide necessary mangling of the symbol to meet ABI requirements.
        )env_name)r(   fndescs     r)   get_env_namezBaseContext.get_env_name"  s     r+   c                     ||j         vrKt          j        |t          j        |          }d|_        t          j        |j        j                  |_	        |j         |         S )a  Declare the Environment pointer as a global of the module.

        The pointer is initialized to NULL.  It must be filled by the runtime
        with the actual address of the Env before the associated function
        can be executed.

        Parameters
        ----------
        module :
            The LLVM Module
        envname : str
            The name of the global variable.
        )r   common)
globalsllvmirGlobalVariabler   	voidptr_tlinkageget_null_valuerg   pointeeinitializer)r(   moduleenvnamegvs       r)   declare_env_globalzBaseContext.declare_env_global*  sU     &.((&vw/@wOOOB!BJ$3BGODDBN~g&&r+   c                 6    t          j        | j        |          S r$   )r   	ArgPackerr   )r(   fe_argss     r)   get_arg_packerzBaseContext.get_arg_packer?  s    "4#:GDDDr+   c                 6    t          j        | j        |          S r$   )r   
DataPackerr   )r(   fe_typess     r)   get_data_packerzBaseContext.get_data_packerB  s    #D$;XFFFr+   c                     t           r$   NotImplementedErrorr'   s    r)   target_datazBaseContext.target_dataE  s    !!r+   c                     t                      S )zN
        All module attrs are constant for targets using BaseContext.
        )rk   r'   s    r)   nonconst_module_attrsz!BaseContext.nonconst_module_attrsI  s    
 wwr+   c                 0    ddl m}  || | j                  S )Nr   )
NRTContext)numba.core.runtime.contextr   
enable_nrt)r(   r   s     r)   nrtzBaseContext.nrtP  s(    999999z$000r+   c                 F   t          j         |           }|                                D ]H\  }}t          ||          s"t          d                    |                    t          |||           I|                                |                                 uri |_        |S )Nzunknown option {0!r})copyrz   hasattr	NameErrorrH   setattrcodegenr   )r(   kwsr   kvs        r)   	subtargetzBaseContext.subtargetU  s    iooIIKK 	 	DAq3?? B 6 = =a @ @AAACA;;==..')C$
r+   c                    	 | j         |         }n)# t          $ r t          |          }|| j         |<   Y nw xY w|                     |                    d                     |                     |                    d                     |                     |                    d                     |                     |                    d                     |                     |                    d                     dS )zx
        Install a *registry* (a imputils.Registry instance) of function
        and attribute implementations.
        	functionsgetattrssetattrscasts	constantsN)	r   KeyErrorr   insert_func_defnnew_registrations_insert_getattr_defn_insert_setattr_defn_insert_cast_defn_insert_get_constant_defn)r(   registryloaders      r)   r   zBaseContext.install_registry`  s   
	0%h/FF 	0 	0 	0#H--F)/DX&&&	0 	f66{CCDDD!!&":"::"F"FGGG!!&":"::"F"FGGGv77@@AAA&&v'?'?'L'LMMMMMs    #66c                 Z    |D ]'\  }}}| j         |                             ||           (d S r$   )r   rl   )r(   defnsr:   funcr/   s        r)   r   zBaseContext.insert_func_defnp  sA    $ 	0 	0OD$K$$T3////	0 	0r+   c                 Z    |D ]'\  }}}| j         |                             ||           (d S r$   )r   rl   r(   r   r:   attrr/   s        r)   r   z BaseContext._insert_getattr_defnt  A    $ 	3 	3OD$N4 ''c2222	3 	3r+   c                 Z    |D ]'\  }}}| j         |                             ||           (d S r$   )r   rl   r   s        r)   r   z BaseContext._insert_setattr_defnx  r   r+   c                 L    |D ] \  }}| j                             ||           !d S r$   )r   rl   r(   r   r:   r/   s       r)   r   zBaseContext._insert_cast_defn|  s:     	* 	*ID#KtS))))	* 	*r+   c                 L    |D ] \  }}| j                             ||           !d S r$   )r   rl   r   s       r)   r   z%BaseContext._insert_get_constant_defn  s;     	2 	2ID#&&tS1111	2 	2r+   c                 r    t          ||          }| j        |                             ||j                   d S r$   )r   r   rl   	signature)r(   r   r   libsr:   s        r)   insert_user_functionz BaseContext.insert_user_function  s6    VT**D  t~66666r+   c                 v    t          |t          j                  sJ t          ||          }||f| j        |<   d S r$   )r]   r
   	Generatorr   r   )r(   gentygendescr   r:   s        r)   insert_generatorzBaseContext.insert_generator  s@    %11111gt,,")4-r+   c                     | j         |= dS )zl
        Remove user function *func*.
        KeyError is raised if the function isn't known to us.
        N)r   )r(   r   s     r)   remove_user_functionz BaseContext.remove_user_function  s    
 Kr+   c                       fd|j         D             }                     |j                  }t          j        ||          }|S )Nc                 :    g | ]}                     |          S r>   )get_argument_type).0atyr(   s     r)   
<listcomp>z:BaseContext.get_external_function_type.<locals>.<listcomp>  s7     0 0 0 **3// 0 0 0r+   )argtypesr  restyper   FunctionType)r(   r   r  r	  fntys   `    r)   get_external_function_typez&BaseContext.get_external_function_type  s[    0 0 0 0%0 0 0 ((88"7H55r+   c                    | j                             |j        |j                  }t	          j        |||j                  }| j                             ||j        |j        |j	                   |j
        rN|j                            d           |j                            d           |j                            d           |S )N)noaliasalwaysinlinenoinlineoptnone)	call_convget_function_typer	  r  r   get_or_insert_functionmangled_namedecorate_functionargsr  inline
attributesadddiscard)r(   r   r   r  fns        r)   declare_functionzBaseContext.declare_function  s    ~//PP+FD&:MNN((V[&/SYSa(bbb= 	-Mn---M!!*---M!!),,,	r+   c                     |                      |          }t          j        |||j                  }|j        sJ t          |j        |j                  D ]\  }}d|z  |_        |S )Nzarg.%s)r  r   r  r  is_declarationr`   r  r   )r(   r   r   r  r  akavs          r)   declare_external_functionz%BaseContext.declare_external_function  sn    ..v66+FD&:MNN    &+rw// 	$ 	$FBmBGG	r+   c                     t           }d|z  }t          j        |                    d          dz             }|                     |||          }t          j        ||          S )zL
        Insert constant *string* (a str object) into module *mod*.
        z	.const.%szutf-8    )GENERIC_POINTERr   make_bytearrayencodeinsert_unique_constr	   bitcast)r(   modstring
stringtyper   textr   s          r)   insert_const_stringzBaseContext.insert_const_string  s^     %
V#%fmmG&<&<w&FGG%%c466J///r+   c                     t           }d|pt          |          z  }t          j        |          }|                     |||          }t          j        ||          S )zN
        Insert constant *byte* (a `bytes` object) into module *mod*.
        z	.bytes.%s)r%  hashr   r&  r(  r	   r)  )r(   r*  bytesr   r,  r-  r   s          r)   insert_const_byteszBaseContext.insert_const_bytes  sX     %
d1d5kk2%e,,%%c466J///r+   c                 ~    	 |                     |          }|S # t          $ r t          j        |||          cY S w xY w)zs
        Insert a unique internal constant named *name*, with LLVM value
        *val*, into module *mod*.
        )
get_globalr   r   global_constant)r(   r*  r   valr   s        r)   r(  zBaseContext.insert_unique_const  sW    
	%%B I  	; 	; 	;*3c:::::	;s     <<c                 @    | j         |                                         S r$   )r   r  r(   tys     r)   r  zBaseContext.get_argument_type  s    &r*<<>>>r+   c                 @    | j         |                                         S r$   )r   get_return_typer8  s     r)   r;  zBaseContext.get_return_type  s    &r*::<<<r+   c                 @    | j         |                                         S )a   
        Get a LLVM data representation of the Numba type *ty* that is safe
        for storage.  Record data are stored as byte array.

        The return value is a llvmlite.ir.Type object, or None if the type
        is an opaque pointer (???).
        r   get_data_typer8  s     r)   r>  zBaseContext.get_data_type  s     &r*88:::r+   c                 @    | j         |                                         S r$   )r   get_value_typer8  s     r)   r@  zBaseContext.get_value_type  s    &r*99;;;r+   c                 x    | j         |                             ||          }|                    |||           dS )z
        Pack value into the array storage at *ptr*.
        If *align* is given, it is the guaranteed alignment for *ptr*
        (by default, the standard ABI alignment).
        )alignN)r   as_datastore)r(   builderr9  rn   ptrrB  datavals          r)   
pack_valuezBaseContext.pack_value  s?     )"-55guEEgs%00000r+   c                 J    | j         |         }|                    |||          S )z
        Unpack value from the array storage at *ptr*.
        If *align* is given, it is the guaranteed alignment for *ptr*
        (by default, the standard ABI alignment).
        )r   load_from_data_pointer)r(   rE  r9  rF  rB  dms         r)   unpack_valuezBaseContext.unpack_value  s)     $R(((#u===r+   c                     	 | j                             |f          } || |||          S # t          $ r t          d|d          w xY w)zU
        Return a LLVM constant representing value *val* of Numba type *ty*.
        zCannot lower constant of type '')r   r1   r   )r(   rE  r9  r6  r:   s        r)   get_constant_genericz BaseContext.get_constant_generic  sm    	T&++RE22D4gr3///" 	T 	T 	T%%bbb&RSSS	Ts	   (+ A	c                 0    |                      d||          S )zx
        Same as get_constant_generic(), but without specifying *builder*.
        Works only for simple types.
        N)rO  )r(   r9  r6  s      r)   get_constantzBaseContext.get_constant  s     ((r3777r+   c                 `    |                      |          }t          |t          j                  S r$   )r@  r	   r   	Undefinedr(   r9  ltys      r)   get_constant_undefzBaseContext.get_constant_undef  s(    !!"%%V-...r+   c                 L    |                      |          }t          |d           S r$   )r@  r	   rT  s      r)   get_constant_nullzBaseContext.get_constant_null
  s%    !!"%%T"""r+   Tc                 h   |J |                                 }t          |t          j                  r#|                    |          }| j        |         }n|}| j        |         }	 t          |                    |j                  | |          S # t          j
        $ r Y nw xY wt          |t          j                  r4	 |                     t          |          |          S # t          $ r Y nw xY w|r,|                                  |                     ||d          S t          d||          )z
        Return the implementation of function *fn* for signature *sig*.
        The return value is a callable with the signature (builder, args).
        NF)
_firstcallNo definition for lowering )as_functionr]   r
   Callableget_impl_keyr   
_wrap_implr1   r  r   r5   ri   get_functionrg   r   r   )r(   r  r/   rZ  rT   	overloadss         r)   r`  zBaseContext.get_function  sJ   
 oob%.)) 	)//#&&CC(IICC(I	innSX66cBBB. 	 	 	D	b%*%% 	((b3777&     	@LLNNN$$R$???!!ssCC"PQQQs$   &(B B! B!?"C" "
C/.C/c                 (    | j         |         d         S )	
        r   )r   )r(   r   s     r)   get_generator_desczBaseContext.get_generator_desc0  s     &q))r+   c                 t    | j         |         d         }|                     t          |dd                     |S )rc  r<   r   r>   )r   add_linking_libsgetattr)r(   r   ress      r)   get_generator_implzBaseContext.get_generator_impl5  s;     u%a(gc6266777
r+   c                 F    |                      |          |j        k    sJ |S r$   )r@  rg   )r(   rE  r   r9  s       r)   get_bound_functionzBaseContext.get_bound_function<  s(    ""2&&#(2222
r+   c                     ||f j         v}t          |t          j                  }|rY|rW j                            ||          t          t          j                  rdS t          |j        |           fd}|S  j	        |         }	 |
                    |f          S # t          j        $ r Y nw xY w j	        d         }	 |
                    |f          S # t          j        $ r Y nw xY wt          d|d|          )z
        Get the getattr() implementation for the given type and attribute name.
        The return value is a callable with the signature
        (context, builder, typ, val, attr).
        Nc                 V                         |          }t          | ||          S r$   )rO  r   )	contextrE  typr6  r   llvalattrtypyvalr(   s	         r)   impz$BaseContext.get_getattr.<locals>.impS  s.     55gvuMME,WgvuMMMr+   r[  .)r   r]   r
   Moduler   resolve_module_constantsDummyrg  pymodr   r1   r   r5   r   )	r(   ro  r   
const_attr	is_modulers  ra  rq  rr  s	   `      @@r)   get_getattrzBaseContext.get_getattr@  sb    4[(BB
sEL11	 	 	 (AA#tLLF~FEK!@!@~ t	400N N N N N N N 
 N4(		>>3&))). 	 	 	D	 N4(		>>3&))). 	 	 	D	 "!TT"RSSSs$   B( (B:9B:C! !C32C3c                     t          j                  dk    sJ j        d         }j        d         } fd} j                 }	  ||                    ||f                    S # t          j        $ r Y nw xY w j        d         }	  ||                    ||f                    S # t          j        $ r Y nw xY wt          d|dd|          )	z
        Get the setattr() implementation for the given attribute name
        and signature.
        The return value is a callable with the signature (builder, args).
        rO   r   r<   c                       fd}|S )Nc                 "     | |          S r$   r>   )rE  r  r   r:   r(   r/   s     r)   wrappedz>BaseContext.get_setattr.<locals>.wrap_setattr.<locals>.wrappedr  s    tD'3d;;;r+   r>   )r:   r  r   r(   r/   s   ` r)   wrap_setattrz-BaseContext.get_setattr.<locals>.wrap_setattrq  s1    < < < < < < < <Nr+   Nr[  rt  z = )rF   r  r   r1   r   r5   r   )r(   r   r/   ro  valtyr  ra  s   ```    r)   get_setattrzBaseContext.get_setattrg  s2    38}}!!!!hqk	 	 	 	 	 	 	 N4(		<	U| < <===. 	 	 	D	 N4(		<	U| < <===. 	 	 	D	 "!%(SS$$$#7 8 8 	8s$   A- -A?>A?B0 0CCc                 D    | j         |                             ||          S )zG
        Argument representation to local value representation
        )r   from_argumentr(   rE  r9  r6  s       r)   get_argument_valuezBaseContext.get_argument_value  s"     &r*88#FFFr+   c                 D    | j         |                             ||          S )zK
        Return value representation to local value representation
        )r   from_returnr  s       r)   get_returned_valuezBaseContext.get_returned_value  s"     &r*66wDDDr+   c                 D    | j         |                             ||          S )zJ
        Local value representation to return type representation
        )r   	as_returnr  s       r)   get_return_valuezBaseContext.get_return_value  s"     &r*44WcBBBr+   c                 D    | j         |                             ||          S )zKPrepare local value representation as argument type representation
        )r   as_argumentr  s       r)   get_value_as_argumentz!BaseContext.get_value_as_argument  s"     &r*66wDDDr+   c                 D    | j         |                             ||          S r$   )r   rC  r  s       r)   get_value_as_datazBaseContext.get_value_as_data  s     &r*227C@@@r+   c                 D    | j         |                             ||          S r$   )r   	from_datar  s       r)   get_data_as_valuezBaseContext.get_data_as_value  s     &r*44WcBBBr+   c                 >    |                      |||          }|j        S )zD
        Extract the first element of a heterogeneous pair.
        )make_helperfirstr(   rE  r6  r9  pairs        r)   
pair_firstzBaseContext.pair_first  s#     S11zr+   c                 >    |                      |||          }|j        S )zE
        Extract the second element of a heterogeneous pair.
        )r  secondr  s        r)   pair_secondzBaseContext.pair_second  s#     S11{r+   c           	      0   |t           j        u r|                     |          S ||k    s|t           j        k    r|S 	 | j                            ||f          } || ||||          S # t          j        $ r t          j        d|d|d|          w xY w)z
        Cast a value of type *fromty* to type *toty*.
        This implements implicit conversions as can happen due to the
        granularity of the Numba type system, or lax Python semantics.
        zCannot cast z to z: )r
   
_undef_varrX  rf   r   r1   r   r5   )r(   rE  r6  fromtytotyr:   s         r)   castzBaseContext.cast  s     U%%%))$///t^^tuy00J	B;##VTN33D4gvtS999. 	B 	B 	B11.4ffdddCC@B B B	Bs   *A( (-Bc                    |\  }}|\  }}| j                             ||          }	|	J |                     ||||	          }
|                     ||||	          }| j                             |          }|                    | j         |	|	fi           }|                     ||          }|                     t          |dd                      |||
|f          S )z
        Compare the given LLVM values of the given Numba types using
        the comparison *key* (e.g. '==').  The values are first cast to
        a common safe conversion type.
        Nr   r>   )r   unify_typesr  resolve_value_typeget_call_typer`  rf  rg  )r(   rE  rT   r  r  atbtr!  bvr9  cavcbvr  cmpsigcmpfuncs                  r)   generic_comparezBaseContext.generic_compare  s     BB ,,R44~~~iiR,,iiR,,"55c::##D$7"b2FF##D&11ggvr::;;;wwc
+++r+   c                     |                      |t          j        |                    }t          j        |_        |                                S r$   )r  r
   Optionalr   	false_bitvalid	_getvalue)r(   rE  valtypeoptvals       r)   make_optional_nonezBaseContext.make_optional_none  s=    !!'5>'+B+BCC(!!!r+   c                     |                      |t          j        |                    }t          j        |_        ||_        |                                S r$   )r  r
   r  r   true_bitr  datar  )r(   rE  r  rn   r  s        r)   make_optional_valuezBaseContext.make_optional_value  sD    !!'5>'+B+BCC'!!!r+   c                     | j                             t                    }|                    | j         |fi           }|                     ||          } |||f          S )zL
        Return the truth value of a value of the given Numba type.
        )r   r  boolr  r`  )r(   rE  ro  r6  r  r/   r:   s          r)   is_truezBaseContext.is_true  s_     "55d;;  !4sfbAA  s++tGcV$$$r+   c                     |j         j        }	 |j        |         }nF# t          $ r9 t	          j        |||          }|r| j        rt          j        dk    rd|_	        Y nw xY w|S )z
        Get a global value through its C-accessible *name*, with the given
        LLVM type.
        If *dllimport* is true, the symbol will be marked as imported
        from a DLL (necessary for AOT compilation under Windows).
        win32	dllimport)
functionr   r   r   r   add_global_variableaot_modesysplatformstorage_class)r(   rE  ro  r   r  r   r   s          r)   get_c_valuezBaseContext.get_c_value  s     !(	/%BB 	/ 	/ 	/,VS$??B /T] /s|w/F/F#. 	/ 	s    A AAc                 p      fdt          ||          D             }                    ||          }|S )Nc                 D    g | ]\  }}                     ||          S r>   )r  )r  r9  argrE  r(   s      r)   r  z6BaseContext.call_external_function.<locals>.<listcomp>  s?     2 2 2B **7B<< 2 2 2r+   )r`   call)r(   rE  calleeargtysr  retvals   ``    r)   call_external_functionz"BaseContext.call_external_function  sS    2 2 2 2 2"64002 2 2fd++r+   c                 @    | j         |                                         S r$   r=  )r(   ro  s     r)   get_function_pointer_typez%BaseContext.get_function_pointer_type   s    &s+99;;;r+   c                 2    |                     |||          S )N)cconv)r  )r(   rE  funcptrr  r  s        r)   call_function_pointerz!BaseContext.call_function_pointer  s    ||GT|777r+   c                     |j         }t          }t          j        t          j        d          |g          }t          j        ||d          }|                    ||g          S )N    puts)r   r%  r   r
  IntTyper   r  r  )r(   rE  r-  r*  cstringr  r  s          r)   print_stringzBaseContext.print_string  sV    n!"6>"#5#5yAA-c4@@||D4&)))r+   c                     |j         }|                     |t          |                    }|                     ||           d S r$   )r   r.  strr  )r(   rE  r-  r*  cstrs        r)   debug_printzBaseContext.debug_print  s@    n''SYY77'4(((((r+   c                 D   |j         }t          |t                    r|                     ||          }n|}t	          j        t	          j        d          t          fd          }t          j	        ||d          }|
                    ||ft          |          z             S )Nr  T)var_argprintf)r   r]   r  r.  r   r
  r  r%  r   r  r  rk   )r(   rE  format_stringr  r*  r  r  r  s           r)   r  zBaseContext.printf  s    nmS)) 	!++C??DD D"6>"#5#57ISWXXX+Cx@@||B%++ 5666r+   c                 R      fd|j         D             }t          j        |          S )zR
        Get the LLVM struct type for the given Structure class *struct*.
        c                 @    g | ]\  }}                     |          S r>   )r@  )r  _r   r(   s      r)   r  z/BaseContext.get_struct_type.<locals>.<listcomp>   s+    DDDTQ$%%a((DDDr+   )_fieldsr   LiteralStructType)r(   structfieldss   `  r)   get_struct_typezBaseContext.get_struct_type  s2     EDDDV^DDD'///r+   c                 F    t          |                                 d           S r$   )r	   get_dummy_typer'   s    r)   get_dummy_valuezBaseContext.get_dummy_value#  s    ++--t444r+   c                     t           S r$   )r%  r'   s    r)   r  zBaseContext.get_dummy_type&  s    r+   c                 4   ddl m} t          5  |                                 }|                    |j                  }|`t          j                    }	|                                }|	r7|		                                }
|

                    d          r|
j        rd|_        d|_        d|_        d|_        |                    | j        | |||j        |j        ||          }| j                            |j                   |cddd           S # 1 swxY w Y   dS )z
        Invoke the compiler to compile a function to be used inside a
        nopython function, but without generating code to call that
        function.

        Note this context's flags are not inherited.
        r   )compilerNr   T)locals)
numba.corer  r   r   create_libraryro   r   ConfigStackFlagstopis_setr   
no_compileno_cpython_wrapperno_cfunc_wrappercompile_internalr   r  return_typeactive_code_libraryadd_linking_librarylibrary)r(   rE  r:   r/   r  flagsr  r   r   cstk	tls_flagscress               r)   _compile_subroutine_no_cachez(BaseContext._compile_subroutine_no_cache)  sj    	('''''! 	 	llnnG,,T];;G}#/11 (( ) $

I ''.. )9= )$(	#E'+E$%)E",,T-@$-4-138-0_e4:	 - < <D $88FFF1	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   C2DDDc                 p   |j         |t          | j                  f}|sd}nB|j        r!|t	          d |j        D                       z  }| j                            |          }|$|                     |||||          }	|	| j        |<   | j        |         }	| j        	                    |	j
                   |	S )z
        Compile the function *impl* for the given *sig* (in nopython mode).
        Return an instance of CompileResult.

        If *caching* evaluates True, the function keeps the compiled function
        for reuse in *.cached_internal_func*.
        Nc              3   $   K   | ]}|j         V  d S r$   )cell_contents)r  cs     r)   	<genexpr>z1BaseContext.compile_subroutine.<locals>.<genexpr>_  s$      "M"Mq1?"M"M"M"M"M"Mr+   )r  r  )__code__rg   error_model__closure__rk   r   r-   r  r  r  r   )
r(   rE  r:   r/   r  r  caching	cache_keycachedr  s
             r)   compile_subroutinezBaseContext.compile_subroutineO  s     ]Cd.>)?)?@	 	>FF N U"M"MD<L"M"M"MMMM	.229==F>44WdC<B;@ 5 B BD 48D%i0(3 44T\BBBr+   c                 l    |                      ||||          }|                     ||j        ||          S )zf
        Like compile_subroutine(), but also call the function with the given
        *args*.
        )r  call_internalr   )r(   rE  r:   r/   r  r  r  s          r)   r  zBaseContext.compile_internall  s9    
 &&wc6BB!!'4;TBBBr+   c                    |                      ||||          \  }}t          j        ||j                  5  | j                            ||           ddd           n# 1 swxY w Y   t          j        | ||||          }|S )z
        Given the function descriptor of an internally compiled function,
        emit a call to that function with the given arguments.
        N)call_internal_no_propagater   if_unlikelyis_errorr  return_status_propagater   fix_returning_optional)r(   rE  r   r/   r  statusrh  s          r)   r  zBaseContext.call_internalt  s    
 55gvsDQQ &/:: 	D 	DN227FCCC	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D -dGS&#NN
s   AA"%A"c                     |j         }|                     ||          }| j                            |||j        |j        |          \  }}||fS )zpSimilar to `.call_internal()` but does not handle or propagate
        the return status automatically.
        )r   r  r  call_functionr  r  )	r(   rE  r   r/   r  llvm_modr  r  rh  s	            r)   r  z&BaseContext.call_internal_no_propagate  sV    
 >""8V44n227B368TC Cs{r+   c                    |                                  }| j                            |j        |j                  }|                    |||          }| j                            |||j        |j        |          \  }}	t          j        ||j	                  5  | j        
                    ||           ddd           n# 1 swxY w Y   t          j        | ||||	          }	|	S )aV  
        Insert a function call to an unresolved symbol with the given *name*.

        Note: this is used for recursive call.

        In the mutual recursion case::

            @njit
            def foo():
                ...  # calls bar()

            @njit
            def bar():
                ... # calls foo()

            foo()

        When foo() is called, the compilation of bar() is fully completed
        (codegen'ed and loaded) before foo() is. Since MCJIT's eager compilation
        doesn't allow loading modules with declare-only functions (which is
        needed for foo() in bar()), the call_unresolved injects a global
        variable that the "linker" can update even after the module is loaded by
        MCJIT. The linker would allocate space for the global variable before
        the bar() module is loaded. When later foo() module is defined, it will
        update bar()'s reference to foo().

        The legacy lazy JIT and the new ORC JIT would allow a declare-only
        function be used in a module as long as it is defined by the time of its
        first use.
        N)r   r  r  r  r  insert_unresolved_refr  r   r  r  r  r   r  )
r(   rE  r   r/   r  r   r  r  r  rh  s
             r)   call_unresolvedzBaseContext.call_unresolved  s"   @ ,,..~//JJ**7D$??n227B368TC C &/:: 	D 	DN227FCCC	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D -dGS&#NN
s   B>>CCc                     t           r$   r   )r(   r   r   envs       r)   get_executablezBaseContext.get_executable  s    !!r+   c                 "    t          | |          S r$   r   )r(   rE  s     r)   get_python_apizBaseContext.get_python_api  s    w'''r+   c                 `   | j         r|                    |          }|                    |          }t          |t          j                  r|j        }|                     |                     |                    }||z  r.d	                    |||          }t          j        |          dS dS )zH
        Assumes offset starts from a properly aligned location
        z*{rec}.{attr} of type {type} is not aligned)recr   rg   N)strict_alignmentoffsettypeofr]   r
   NestedArrayr_   get_abi_alignmentr>  rH   r   rI   )r(   rectypr   r)  elemtyrB  rM   s          r)   sentry_record_alignmentz#BaseContext.sentry_record_alignment  s       	1]]4((F]]4((F&%"344 &  **4+=+=f+E+EFFE~ 1BIIT J 8 8+C000	1 	11 1r+   rn   c                 ,    t          j        ||          S )z9
        Get a helper class for the given *typ*.
        )r   create_struct_proxy)r(   ro  kinds      r)   get_helper_classzBaseContext.get_helper_class  s     *3555r+   c                 L    |                      ||          } || |||          S )N)rn   ref)r3  )r(   rE  ro  rn   r5  r2  clss          r)   _make_helperzBaseContext._make_helper  s0    ##C..s437777r+   c                 6    |                      ||||d          S )zn
        Get a helper object to access the *typ*'s members,
        for the given value or reference.
        rn   )r2  r7  )r(   rE  ro  rn   r5  s        r)   r  zBaseContext.make_helper  s#    
   #uc HHHr+   c                 4    |                      |||d          S )zr
        As make_helper(), but considers the value as stored in memory,
        rather than a live value.
        r  )r5  r2  r9  )r(   rE  ro  r5  s       r)   make_data_helperzBaseContext.make_data_helper  s!    
   #3V DDDr+   c                 8    ddl m} |                    |          S )Nr   arrayobj)numba.npr>  
make_array)r(   ro  r>  s      r)   r@  zBaseContext.make_array  s(    %%%%%%""3'''r+   c                 *    ddl m}  |j        |fi |S )z+
        Populate array structure.
        r   r=  )r?  r>  populate_array)r(   arrkwargsr>  s       r)   rB  zBaseContext.populate_array  s1     	&%%%%%&x&s55f555r+   c                 x    t          |t          j                  s
J |            |                     |||          S )zS
        Get a helper object to access the given complex numbers' members.
        )r]   r
   Complexr  )r(   rE  ro  rn   s       r)   make_complexzBaseContext.make_complex  s<     #u}--22s222e444r+   c                     |                      |          }t          |          D ]\  }}|                    |||          }|S )zL
        Create a tuple of the given *typ* containing the *values*.
        )rV  	enumerateinsert_value)r(   rE  ro  r|   tupir6  s          r)   
make_tuplezBaseContext.make_tuple  sP     %%c**'' 	4 	4FAs&&sC33CC
r+   c           	                                |j                  }d} j        r|j        dvs|j        |k    r~|j        j        }                     ||t          t          |                              }                     |t          |          t          t          |                              }n|                    |j                  }	t          j        t          j        d          t!          |	j                            }
t          j        |d|
          }                     |          |_        d}                     t*          j                  } fd|j        D             }t          j        ||          } fd	|j        D             }t          j        ||          }                      |           |          }                     t*          j        |j        j                  }                     ||                    ||j        j	                  ||||d
           |                                S )z
        Create an array structure reifying the given constant array.
        A low-level contiguous array constant is created in the LLVM IR.
        i@B FC)info)orderr    z.const.array.dataNc                 P    g | ]"}                     t          j        |          #S r>   rQ  r
   intpr  sr(   s     r)   r  z3BaseContext.make_constant_array.<locals>.<listcomp>"  s+    III!T&&uz155IIIr+   c                 P    g | ]"}                     t          j        |          #S r>   rS  rU  s     r)   r  z3BaseContext.make_constant_array.<locals>.<listcomp>&  s+    LLL1d''
A66LLLr+   )r  shapestridesitemsizeparentmeminfo)r>  r_   allow_dynamic_globalslayoutnbytesctypesr  add_dynamic_addrr  rg   rx   flattenr   create_constant_arrayr   r  	bytearrayr5  r,  rB  r@  r
   rT  rX  rY  r@  rQ  rZ  rB  r)  r  )r(   rE  ro  arydatatype
size_limitdataptrr  rt_addrflatconstsllintp	shapevalscshape
stridevalscstridescaryintp_itemsizes   `                 r)   make_constant_arrayzBaseContext.make_constant_array  s   
 %%ci00
& 	4''3:
+B+BjoG(('DMM@R@R(SSD++GRWW3tCyy>>+RRGG ;;SZ;00D 26>!3D3DiPTPYFZFZ[[F*74GPPD//99DJG $$UZ00IIIIsyIII	.vyAA MLLLLLL
0DD $ts##D'22))%*ci6HIID!(ty~!F!F"($,%2#*$( 	 	* 	* 	* ~~r+   c                    | j         s
J d            t          |t                    s
J d            |j        }|                     t
          j                  }|                     t
          j        |          	                    |          }d
                    |          }t          j        |||          }d|_        ||_        |                    |          S )z
        Returns dynamic address as a void pointer `i8*`.

        Internally, a global variable is added to inform the lowerer about
        the usage of dynamic addresses.  Caching will be disabled.
        z#dyn globals disabled in this targetzdyn addr not of int typeznumba.dynamic.globals.{:x}linkonce)r]  r]   rU   r   r@  r
   voidptrrQ  uintpinttoptrrH   r   r  r   r   load)	r(   rE  intaddrrP  r*  	llvoidptraddrsymnamer   s	            r)   ra  zBaseContext.add_dynamic_addr7  s     )PP+PPPP'3''CC)CCCCn''66	  g66??	JJ.55g>>(iAA  
||Br+   c                 ~    t          |t          j                  s
J d            |                    | j                  S )z5
        Get the ABI size of LLVM type *ty*.
        Expected LLVM type)r]   r   ri   get_abi_sizer   r8  s     r)   get_abi_sizeofzBaseContext.get_abi_sizeofL  s:     "fk**@@,@@@@t/000r+   c                 ~    t          |t          j                  s
J d            |                    | j                  S )z:
        Get the ABI alignment of LLVM type *ty*.
        r  )r]   r   ri   r,  r   r8  s     r)   r,  zBaseContext.get_abi_alignmentS  s<     "fk**@@,@@@@##D$4555r+   c                     dS )zD
        Get preferred array alignment for Numba type *ty*.
        r  r>   )rn  r9  s     r)   get_preferred_array_alignmentz)BaseContext.get_preferred_array_alignmentZ  s	    
 rr+   c                     dS )z?Run target specific post-lowering transformation here.
        Nr>   )r(   r*  r   s      r)   post_loweringzBaseContext.post_loweringa  r   r+   c                     t           )zCreate a LLVM module

        The default implementation in BaseContext always raises a
        ``NotImplementedError`` exception. Subclasses should implement
        this method.
        r   )r(   r   s     r)   create_modulezBaseContext.create_modulee  s
     "!r+   c                     | j         d         S )z$Get the active code library
        r\   )r   r'   s    r)   r  zBaseContext.active_code_libraryn  s     "2&&r+   c              #      K   | j                             |           	 dV  | j                                          dS # | j                                          w xY w)z5Push the active code library for the context
        N)r   rl   pop)r(   libs     r)   push_code_libraryzBaseContext.push_code_libraryt  sc       	""3'''	&EEE##%%%%%D##%%%%s	   = Ac                 H    | j         }|D ]}|                    |           dS )zHAdd iterable of linking libraries to the *active_code_library*.
        N)r  r  )r(   r   colibr  s       r)   rf  zBaseContext.add_linking_libs~  s<     ( 	+ 	+C%%c****	+ 	+r+   c                 &    t          |  d          )a  Get the ufunc implementation for a given ufunc object.

        The default implementation in BaseContext always raises a
        ``NotImplementedError`` exception. Subclasses may raise ``KeyError``
        to signal that the given ``ufunc_key`` is not available.

        Parameters
        ----------
        ufunc_key : NumPy ufunc

        Returns
        -------
        res : dict[str, callable]
            A mapping of a NumPy ufunc type signature to a lower-level
            implementation.
        z does not support ufuncr   )r(   	ufunc_keys     r)   get_ufunc_infozBaseContext.get_ufunc_info  s    " "T"B"B"BCCCr+   )r>   r$   )T)F)rn   )NNrn   )NN)vro   rp   rq   rr   r(  implement_powi_as_math_callimplement_pow_as_math_callenable_debuginfor   	DIBuilderpropertyr   setterr   auto_parallelr  r  r]  fastmathenvironmentr   r*   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r"  r.  r2  r(  r  r;  r>  r@  rH  rL  rO  rQ  rV  rX  r`  rd  ri  rk  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r#  r%  r/  r3  r7  r  r;  r@  rB  rG  rM  rs  ra  r  r,  r  r  r  r  r   r  rf  r  r>   r+   r)   r   r      sC       	 	  #(!& #I ! ! X!
 " " " J M H K " H K F  >  
& & &$  
 02t Q Q Q Q Q  ' ' '*E E EG G G " " X"   _ 1 1 _1	 	 	N N N 0 0 03 3 33 3 3* * *2 2 27 7 7 70 0 0 0
    	 	 	  0 0 00 0 0 0
 
 
? ? ?= = =; ; ;< < <1 1 1 1> > > >T T T8 8 8/ / /# # # R  R  R  RD* * *
    %T %T %TN8 8 8>G G GE E EC C CE E E
A A AC C C    B B B$, , ,&" " "
" " "% % %      < < <8 8 8 8* * *) ) )
7 7 70 0 05 5 5   GI+/$ $ $ $L =?d#'   : AC C C C C
 
 
	 	 	* * *X" " "( ( (1 1 1$6 6 6 68 8 8 8I I I IE E E E( ( (6 6 65 5 5 5  1  1  1 f     *1 1 16 6 6    " " " ' ' X'
 & & ^&+ + +D D D D Dr+   r   c                   ,    e Zd ZdZd ZddZd Zd ZdS )r_  z
    A wrapper object to call an implementation function with some predefined
    (context, signature) arguments.
    The wrapper also forwards attribute queries, which is important.
    c                 |    t          |          | _        |                                 | _        || _        || _        d S r$   )_wrap_missing_loc	_callable_imp_context_sig)r(   rs  rn  r/   s       r)   r*   z_wrap_impl.__init__  s4    *3//NN$$				r+   Nc                     |                      | j        || j        ||          }| j                            t	          | dd                     |S )N)locr   r>   )r  r  r  rf  rg  )r(   rE  r  r  rh  s        r)   __call__z_wrap_impl.__call__  sH    iiw	4SiII&&wtVR'@'@AAA
r+   c                 ,    t          | j        |          S r$   )rg  r  )r(   items     r)   __getattr__z_wrap_impl.__getattr__  s    ty$'''r+   c                 0    dt          | j                  z  S Nz<wrapped %s>)reprr  r'   s    r)   __repr__z_wrap_impl.__repr__  s    T^ 4 444r+   r$   )ro   rp   rq   rr   r*   r  r  r  r>   r+   r)   r_  r_    s_              
( ( (5 5 5 5 5r+   r_  c                 <    t          j        |           }d|j        v S )z.Does function *fn* take ``loc`` argument?
    r  )r   pysignature
parameters)r  r/   s     r)   _has_locr    s!     
B

CCN""r+   c                        e Zd Zd Zd Zd ZdS )r  c                     || _         d S r$   r   )r(   r  s     r)   r*   z_wrap_missing_loc.__init__  s    			r+   c                     | j         t                    s@fd}d}|D ]4}	 t          |          }t          |||           %# t          $ r Y 1w xY w|S S )ziWrap function for missing ``loc`` keyword argument.
        Otherwise, return the original *fn*.
        c                  >    |                     d            | i |S )Nr  )r  )r  rD  r  s     r)   wrapperz+_wrap_missing_loc.__call__.<locals>.wrapper  s*    

5!!!r4*6***r+   )ro   r   )r   r  rg  r   AttributeError)r(   r  attrsr   r6  r  s        @r)   r  z_wrap_missing_loc.__call__  s     Y|| 	+ + + + + 'E 0 00!"d++C GT3//// &   D
 NIs   A
AAc                     d| j         z  S r  r  r'   s    r)   r  z_wrap_missing_loc.__repr__  s    	))r+   N)ro   rp   rq   r*   r  r  r>   r+   r)   r  r    sA            4* * * * *r+   r  c                  R    d } d }t           j                            | |           dS )z)Initial event triggers for LLVM lock
    c                  .    t          j        d           d S Nznumba:llvm_lock)r   start_eventr>   r+   r)   enter_fnz-_initialize_llvm_lock_event.<locals>.enter_fn  s    +,,,,,r+   c                  .    t          j        d           d S r  )r   	end_eventr>   r+   r)   exit_fnz,_initialize_llvm_lock_event.<locals>.exit_fn  s    )*****r+   N)rv   ffiregister_lock_callback)r  r  s     r)   _initialize_llvm_lock_eventr    s@    - - -+ + + F!!(G44444r+   )<collectionsr   r   r  	itertoolsr   r   
contextlibr   	functoolsr   llvmliter   r   llvmlite.irr	   llvmlite.bindingbindingrv   r  r
   r   r   r   r   r   r   r   r   r   r   numbar   r   numba.core.compiler_lockr   numba.core.pythonapir   numba.core.imputilsr   r   r   r   r   numba.cpythonr   PointerTyper  r%  PYOBJECTvoid_ptrobjectr"   runoncer   r   r_  r  r  r  r>   r+   r)   <module>r     s   # # # # # #  



 - - - - - - - - % % % % % % % % % % % % ! ! ! ! ! !                   ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ 2 2 2 2 2 2 2 2 2 2 & & & & & & & & 9 9 9 9 9 9 * * * * * *' ' ' ' ' ' ' ' ' ' ' ' ' ' # " " " " "$&$^V^A%6%677u u u u uv u u up @ @ @&oD oD oD oD oD& oD oD oDb5 5 5 5 5 5 5 50# # # *  *  *  *  *  *  *  *F 	5 	5 	5       r+   