U
    hâËdCj  ã                   @   s(  d dl mZ d dlZd dlmZmZ d dlmZ d dl	m
Z
mZ d dlmZ d dlmZmZ edd	d
dgƒZdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ ZG dd„ deƒZedƒZG dd„ deƒZG dd„ deƒZdd „ Zd!d"„ ZG d#d$„ d$eƒZG d%d&„ d&eƒZ G d'd(„ d(eƒZ!G d)d*„ d*e!ƒZ"dS )+é    )Ú
namedtupleN)ÚConstantÚ	IRBuilder)Úir)ÚtypesÚcgutils)Úglobal_compiler_lock)Úmake_library_cacheÚ	NullCacheÚ_wrapper_infoÚlibraryÚenvÚnamec              
   C   sÞ   | ƒ }|j  |||	j|	j|¡\}}|j|jdd��T\}}|� ||ƒ W 5 Q R X |�( |
 ¡ }|j  ||
|¡ |
 |¡ W 5 Q R X W 5 Q R X t	||ƒD ]$\}}| 
| | |¡|j¡|¡ q–| 
| | |¡|j¡|¡ |jS ©NT©Zlikely)Ú	call_convÚcall_functionÚreturn_typeÚargsÚif_elseÚis_okÚ
gil_ensureÚraise_errorÚgil_releaseÚzipÚstoreÚaddÚloadÚstepÚcode)r   r   ÚcontextÚfuncÚbuilderÚarraysÚoutÚoffsetsÚstore_offsetÚ	signatureÚpyapir   ÚelemsÚstatusÚretvalZif_okZif_errorÚgilÚoffÚary© r/   úP/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/numba/np/ufunc/wrappers.pyÚ_build_ufunc_loop_body   s&    
 þÿr1   c              	   C   s¸   | ƒ }t jgt|	jƒ }|jdd��4 |j ||t j||¡\}}|D ]}| |¡ qDW 5 Q R X ||ƒ t||ƒD ]$\}}| 	| 
| |¡|j¡|¡ qp| 	| 
| |¡|j¡|¡ |jS )NT)Zkeep_new)r   ÚpyobjectÚlenr   Zerr_pushr   r   Údecrefr   r   r   r   r   r   )r   r   r    r!   r"   r#   r$   r%   r&   r'   r   r(   r)   Z_objargsr*   r+   Úelemr-   r.   r/   r/   r0   Ú_build_ufunc_loop_body_objmode,   s"    
 þÿr6   c
                    s@   ‡ ‡‡fdd„}
‡‡‡fdd„}t |
|| |ˆˆ ˆˆˆ|||	d�S )Nc                     s   ‡fdd„t ˆˆ ƒD ƒ} | S )Nc                    s    g | ]\}}|  ˆ  |¡¡‘qS r/   ©Úload_directr   ©Ú.0r-   r.   ©r"   r/   r0   Ú
<listcomp>O   s   ÿz6build_slow_loop_body.<locals>.load.<locals>.<listcomp>)r   ©r)   )r#   r"   r%   r/   r0   r   N   s    
ÿz"build_slow_loop_body.<locals>.loadc                    s   ˆ  | ˆ  ˆ¡¡ d S ©N)Ústore_directr   ©r+   )r"   r$   r&   r/   r0   r   S   s    z#build_slow_loop_body.<locals>.store©r   ©r1   )r    r!   r"   r#   r$   r%   r&   r'   r(   r   r   r   r/   )r#   r"   r%   r$   r&   r0   Úbuild_slow_loop_bodyL   s        þrC   c                    sb   |   ˆ|	¡}ˆ |
||	¡‰‡ ‡‡‡‡‡fdd„}‡‡‡‡‡fdd„}t||| |ˆˆ ˆˆˆˆ|	ˆƒS )Nc                     s8   ‡fdd„t ˆˆ ƒD ƒ} ‡‡fdd„t | ˆjƒD ƒ} | S )Nc                    s    g | ]\}}|  ˆ  |¡¡‘qS r/   r7   r9   r;   r/   r0   r<   b   s   ÿz5build_obj_loop_body.<locals>.load.<locals>.<listcomp>c                    s   g | ]\}}ˆ  ||ˆ ¡‘qS r/   )Úfrom_native_value)r:   ÚvÚt)Úenv_managerr(   r/   r0   r<   e   s   ÿ)r   r   r=   )r#   r"   rG   r%   r(   r'   r/   r0   r   `   s    
ÿ
ÿz!build_obj_loop_body.<locals>.loadc              	      sd   t  ˆ | ¡}ˆ j|dd��@ ˆ ˆj| ¡}|jd ks8t‚ˆ |jˆ  	ˆ¡¡ ˆ 
| ¡ W 5 Q R X d S r   )r   Zis_not_nullÚif_thenZto_native_valuer   ÚcleanupÚAssertionErrorr?   Úvaluer   r4   )r+   r   Únative)r"   r$   r(   r'   r&   r/   r0   r   i   s    z"build_obj_loop_body.<locals>.store)Zget_env_bodyZget_env_managerr6   )r    r!   r"   r#   r$   r%   r&   r'   r(   Úenvptrr   Zenv_bodyr   r   r/   )r#   r"   rG   r%   r$   r(   r'   r&   r0   Úbuild_obj_loop_body[   s    	     þrN   c                    s<   ‡ ‡fdd„}‡‡fdd„}t ||| ||ˆ ˆ||||	|
d�S )Nc                     s   ‡fdd„ˆ D ƒ} | S )Nc                    s   g | ]}|  ˆ ¡‘qS r/   )Úload_aligned)r:   r.   )Úindr/   r0   r<   ~   s   ÿz6build_fast_loop_body.<locals>.load.<locals>.<listcomp>r/   r=   )r#   rP   r/   r0   r   }   s    
ÿz"build_fast_loop_body.<locals>.loadc                    s   ˆ  | ˆ ¡ d S r>   )Ústore_alignedr@   )rP   r$   r/   r0   r   ‚   s    z#build_fast_loop_body.<locals>.storerA   rB   )r    r!   r"   r#   r$   r%   r&   r'   rP   r(   r   r   r   r/   )r#   rP   r$   r0   Úbuild_fast_loop_body{   s        þrR   c           *      C   sB  t |tƒst‚t d¡}t |¡}t |¡}| tj¡}	t |	¡}
t 	t 
¡ ||
|
|g¡}| ¡  d¡}| d¡}|r–|j tjtjgt|jƒ ¡}n|j |j|j¡}tj|||d�}|j d¡ t ||d|j ¡}|j\}}}}d|_d|_d	|_d
|_t| d¡ƒ}| |j¡}|j}| | |j|¡¡}|j|dd�}g }t |jƒD ]"\}}| !t"||||||ƒ¡ �qNt"||||t|ƒ|jƒ}g }| #tjd¡}|D ](} t$ %||	¡}!| !|!¡ | &||!¡ �q t$ %||	¡}"| &||"¡ t$j'}#|D ]}$| (|#|$j)¡}#�qì| *|¡}%|�rf|% +¡ }&t$j,|||	d��" t-|||||||"||%||ƒ W 5 Q R X |% .|&¡ | /¡  n¶| 0|#¡�ž\}'}(|'�B t$j,|||	d��&})t1|||||||"||)j2|%|d� W 5 Q R X W 5 Q R X |(�> t$j,|||	d��" t3|||||||"||%|d�
 W 5 Q R X W 5 Q R X W 5 Q R X | /¡  ~| 4|¡ | 5| ¡ t6|||jd�S )z�
    Wrap the scalar function with a loop that iterates over the arguments

    Returns
    -------
    (library, env, name)
    é   Zufunc_wrapperÚ ©r   Úalwaysinlinez
__ufunc__.r   ÚdimsÚstepsÚdataÚentryÚ	loopcountr   ©ÚintprA   ©r   r   r   )7Ú
isinstanceÚstrrJ   r   ÚIntTypeÚPointerTypeÚget_value_typer   r]   ÚFunctionTypeÚVoidTypeÚcodegenÚcreate_libraryÚcreate_ir_moduler   Úget_function_typer2   r3   r   r   ÚFunctionÚ
attributesr   r   r   Úappend_basic_blockZget_env_nameÚfndescÚenvironmentr   Zdeclare_env_globalÚmoduleÚ	enumerateÚappendÚ	UArrayArgÚget_constantr   Úalloca_oncer   Útrue_bitÚand_Úis_unit_stridedÚget_python_apir   Ú	for_rangerN   r   Úret_voidr   rR   ÚindexrC   Úadd_ir_moduleÚadd_linking_libraryr   )*r   r    Úfnamer'   ZobjmodeÚcresÚbyte_tÚ
byte_ptr_tÚbyte_ptr_ptr_tÚintp_tÚ
intp_ptr_tÚfntyÚ
wrapperlibÚwrapper_moduleÚ	func_typer!   ÚwrapperÚarg_argsÚarg_dimsÚ	arg_stepsÚarg_datar"   Úenvnamer   rM   r[   r#   ÚiÚtypr$   r%   ÚzeroÚ_Úpr&   Zunit_stridedr.   r(   r,   rw   Z
is_stridedÚloopr/   r/   r0   Úbuild_ufunc_wrapperŠ   sÒ    



 ÿ
 ÿ ÿÿ

         þ

        ý       ý$

r•   c                   @   s4   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ ZdS )rr   c                 C   s°   || _ || _|| _| j  tj|¡}| j | ||g¡¡}| |¡}	| j 	||	 
¡ ¡| _| j  |	¡}
| j  tj|
¡| _| j ||g¡}| j |¡| _| d| j| j¡| _|| _d S )Nz==)r    r"   Úfe_typers   r   r]   r   ÚgepÚget_data_typeÚbitcastÚ
as_pointerÚdataptrÚget_abi_sizeofZabisizer   Zicmp_unsignedrw   )Úselfr    r"   r   rX   r�   r–   ÚoffsetZoffseted_argsZ	data_typeZsizeofZoffseted_stepr/   r/   r0   Ú__init__ú   s$    
ÿ ÿzUArrayArg.__init__c                 C   s&   t  | j| j|¡}| j | j| j|¡S )zm
        Generic load from the given *byteoffset*.  load_aligned() is
        preferred if possible.
        )r   Úpointer_addr"   r›   r    Úunpack_valuer–   )r�   Ú
byteoffsetÚptrr/   r/   r0   r8     s    zUArrayArg.load_directc                 C   s&   | j  | j|g¡}| j | j | j|¡S r>   )r"   r—   r›   r    r¡   r–   )r�   rP   r£   r/   r/   r0   rO     s    zUArrayArg.load_alignedc                 C   s,   t  | j| j|¡}| j | j| j||¡ d S r>   )r   r    r"   r›   r    Ú
pack_valuer–   )r�   rK   r¢   r£   r/   r/   r0   r?     s    zUArrayArg.store_directc                 C   s,   | j  | j|g¡}| j | j | j||¡ d S r>   )r"   r—   r›   r    r¤   r–   )r�   rK   rP   r£   r/   r/   r0   rQ     s    zUArrayArg.store_alignedN)Ú__name__Ú
__module__Ú__qualname__rŸ   r8   rO   r?   rQ   r/   r/   r/   r0   rr   ù   s
   rr   Zgufc                   @   s˜   e Zd Zdd„ Zedd„ ƒZedd„ ƒZedd„ ƒZed	d
„ ƒZedd„ ƒZ	edd„ ƒZ
dd„ Zdd„ Zdd„ Zedd„ ƒZdd„ Zdd„ Zdd„ ZdS )Ú_GufuncWrapperc                 C   sN   || _ || _|| _|| _| jjtjk| _|r8t	| j d�nt
ƒ | _t|ƒ| _dS )a,  
        The *is_parfors* argument is a boolean that indicates if the GUfunc
        being built is to be used as a ParFors kernel. If True, it disables
        the caching on the wrapper as a separate unit because it will be linked
        into the caller function and cached along with it.
        )Úpy_funcN)r©   r   ÚsinÚsoutr'   r   r   r2   Zis_objectmodeÚGufWrapperCacher
   ÚcacheÚboolÚ
is_parfors)r�   r©   r   rª   r«   r­   r¯   r/   r/   r0   rŸ   &  s    ÿÿz_GufuncWrapper.__init__c                 C   s   | j jS r>   )r   r   ©r�   r/   r/   r0   r   6  s    z_GufuncWrapper.libraryc                 C   s   | j jS r>   )r   Útarget_contextr°   r/   r/   r0   r    :  s    z_GufuncWrapper.contextc                 C   s   | j jS r>   )r    r   r°   r/   r/   r0   r   >  s    z_GufuncWrapper.call_convc                 C   s   | j jS r>   )r   r'   r°   r/   r/   r0   r'   B  s    z_GufuncWrapper.signaturec                 C   s   | j jS r>   )r   rm   r°   r/   r/   r0   rm   F  s    z_GufuncWrapper.fndescc                 C   s   | j jS r>   )r   rn   r°   r/   r/   r0   r   J  s    z_GufuncWrapper.envc                 C   sR   t  d¡}t  |¡}t  |¡}| j tj¡}t  |¡}t  t  ¡ ||||g¡}|S )NrS   )	r   ra   rb   r    rc   r   r]   rd   re   )r�   r€   r�   r‚   rƒ   r„   r…   r/   r/   r0   Ú_wrapper_function_typeN  s    



 ÿz%_GufuncWrapper._wrapper_function_typec           !         sr  | j  tj¡}|  ¡ }| d¡}| j | jj	| jj
¡}| jj}tj|||d�}|j d¡ t |||¡}	d|	_|	j\}
}}}d|
_d|_d|_d|_t|	 d	¡ƒ}|j|d
d�}| j  |¡}tƒ }| j| jfD ]}|D ]}|t|ƒO }qÖqÎi }| jD ]"}|D ]}||krüt|ƒ||< qüqôi }| ¡ D ]2\}}| | || j  tj|d ¡g¡¡||< �q$g }t| jƒt| jƒ }tt| j j| j| j ƒƒD ]>\}\}}t!| j ||
||||||ƒ	}|t|ƒ7 }| "|¡ �qŠ| d¡}|  #||¡ t$j%|||d��:‰ ‡ fdd„|D ƒ}|  &||||¡\}} t$ '|| |¡ W 5 Q R X | (|¡ | )|¡ |  *||¡ | +¡  | ,|¡ | -| j.¡ dS )zí
        The LLVM IRBuilder code to create the gufunc wrapper.
        The *library* arg is the CodeLibrary to which the wrapper should
        be added.  The *name* arg is the name of the wrapper function being
        created.
        Z_gufunc_wrapperrU   rV   Zweak_odrr   rW   rX   rY   rZ   r[   é   z.returnr\   c                    s   g | ]}|  ˆ j¡‘qS r/   )Úget_array_at_offsetr{   )r:   Úa©r”   r/   r0   r<   œ  s     z1_GufuncWrapper._build_wrapper.<locals>.<listcomp>N)/r    rc   r   r]   r²   rh   r   ri   rm   ÚrestypeZargtypesZllvm_func_namer   rj   rk   r   Úlinkager   r   r   rl   r   rx   Úsetrª   r«   r3   Úitemsr—   rs   rp   r   r'   Ú
GUArrayArgrq   Úgen_prologuer   ry   Úgen_loop_bodyÚcbranch_or_continueÚbranchÚposition_at_endÚgen_epiloguerz   r|   r}   r   )!r�   r   r   rƒ   r…   r‡   rˆ   r~   r!   r‰   rŠ   r‹   rŒ   r�   r"   r[   r(   Zunique_symsÚgrpÚsymsZsym_mapÚsÚsym_dimr�   r#   Ústep_offsetr�   Úsymr.   Zbbreturnr   Ú	innercallÚerrorr/   r¶   r0   Ú_build_wrapperY  s~    
ÿ

þÿ

ÿ
     ÿ



z_GufuncWrapper._build_wrapperc                 C   s„   | j r(| j ¡  t| ƒ¡}|  ||¡ nX| j | jj	| jj
¡}|d kr€| j ¡  t| ƒ¡}| ¡  |  ||¡ | j | jj	|¡ |S r>   )r¯   r    rf   rg   r`   rÊ   r­   Zload_overloadr   r'   r±   Zenable_object_cachingZsave_overload©r�   Zwrapper_namer†   r/   r/   r0   Ú_compile_wrapper­  s     ÿz_GufuncWrapper._compile_wrapperc                 C   s&   d| j j }|  |¡}t|| j|d�S )Nz__gufunc__.r^   )rm   Zmangled_namerÌ   r   r   rË   r/   r/   r0   ÚbuildÅ  s    
  ÿz_GufuncWrapper.buildc              	   C   sl   | j  ||| jj| jj|¡\}}|j|jdd��* | ¡ }| jj  	|||¡ | 
|¡ W 5 Q R X |j|jfS )NFr   )r   r   r'   r   r   rH   Úis_errorr   r    r   r   r   )r�   r"   r(   r!   r   r*   r+   r,   r/   r/   r0   r½   Í  s       þz_GufuncWrapper.gen_loop_bodyc                 C   s   d S r>   r/   ©r�   r"   r(   r/   r/   r0   r¼   Ù  s    z_GufuncWrapper.gen_prologuec                 C   s   d S r>   r/   rÏ   r/   r/   r0   rÁ   Ü  s    z_GufuncWrapper.gen_epilogueN)r¥   r¦   r§   rŸ   Úpropertyr   r    r   r'   rm   r   r²   rÊ   rÌ   r   rÍ   r½   r¼   rÁ   r/   r/   r/   r0   r¨   %  s*   





T
r¨   c                   @   s$   e Zd Zdd„ Zdd„ Zdd„ ZdS )Ú_GufuncObjectWrapperc                 C   s"   t | j|||| j|ƒ\}}||fS r>   )Ú_prepare_call_to_object_moder    r'   )r�   r"   r(   r!   r   rÈ   rÉ   r/   r/   r0   r½   á  s      ýz"_GufuncObjectWrapper.gen_loop_bodyc                 C   s   |  ¡ | _d S r>   )r   r,   rÏ   r/   r/   r0   r¼   è  s    z!_GufuncObjectWrapper.gen_prologuec                 C   s   |  | j¡ d S r>   )r   r,   rÏ   r/   r/   r0   rÁ   ì  s    z!_GufuncObjectWrapper.gen_epilogueN)r¥   r¦   r§   r½   r¼   rÁ   r/   r/   r/   r0   rÑ   à  s   rÑ   c                 C   s2   |j }|jtjkrtnt}|| |||||d� ¡ S )N)r¯   )r'   r   r   r2   rÑ   r¨   rÍ   )r©   r   rª   r«   r­   r¯   r'   Zwrapclsr/   r/   r0   Úbuild_gufunc_wrapperñ  s    
ÿþ     ÿrÓ   c           &   
   C   s\  |j }| d¡}|  tj¡}|  tj¡}	t |	¡}
|  tj¡}|  tj	¡}t 
|||
|
|||g¡}t ||d¡}tj|t d¡dd�}| tj|¡ g }g }tt||jƒƒD �]&\}\}}tj||dd�}| |¡ t|tjƒ�rŒ|  |¡}|| ||d�}t|d	ƒ}t||jƒ}| | d
¡||g¡}| | d¡||g¡}| |j|¡}t t |jƒ¡}t||j!ƒ}t||j"ƒ}| #|||||||g¡} n| $||¡} | | |¡ | | ¡ t %|| ¡}!| |!|¡ t &||!|¡ q¬tj	gt'|ƒ }"| j( )||tj	|"|¡\}#}$| |#j*|¡ | +|$¡ | ,|¡ | -|¡ |D ]}| +| .|¡¡ �q0|#j/}%|%| .|¡fS )Nzufunc.core.returnZnumba_ndarray_newr³   rÉ   rU   T)Úzfill)rK   r   ÚshapeÚstrides)0ro   rl   rc   r   Zint32r]   r   rb   Zvoidptrr2   rd   r   Zget_or_insert_functionrt   ra   r   ru   rp   r   r   rq   r_   ÚArrayÚ
make_arrayr   Úndimr—   Z_get_ptr_by_namer™   rY   ÚnpÚdtyper`   ÚnumÚitemsizeÚcallrD   Zis_nullr¾   r3   r   r   rÎ   r4   r¿   rÀ   r   r   )&r    r"   r(   r!   r'   r   ÚmodZbb_core_returnZll_intZll_intpZll_intp_ptrZ
ll_voidptrZll_pyobjr…   Zfn_array_newZerror_pointerZobject_argsZobject_pointersr�   ÚargZargtyZobjptrÚaryclsÚarrayr‘   ÚndrW   rÖ   rY   rÛ   Ztype_numrÝ   ÚobjZobj_is_nullZ
object_sigr*   r+   rÈ   r/   r/   r0   rÒ   û  s|    



  þÿ


ÿ ÿ
   þ


rÒ   c                   @   s   e Zd Zdd„ Zdd„ ZdS )r»   c
                    sV  || _ || _| tj|¡}
|j|j||
gdd�dd�}|| _|j||
gdd�}| |¡}t|tj	ƒ�r*| }t
|ƒ|jkr¤t
|ƒdkr’|jdkr’ntd |d ¡ƒ‚|j}‡ fdd	„|D ƒ}g }t|ƒD ]8}|j|| tj|| ¡gd
d�}| |¡}| |¡ qÈ|�rtnt}||j|||||d�| _n(|�rDtd ||d ¡ƒ‚t||d�| _d S )Nzdata.ptrrU   rY   zcore.step.ptrr   r³   z.type and shape signature mismatch for arg #{0}c                    s   g | ]}ˆ | ‘qS r/   r/   )r:   rÄ   ©rÅ   r/   r0   r<   {  s     z'GUArrayArg.__init__.<locals>.<listcomp>zstep.ptr©rÛ   rÙ   Ú	core_stepÚ	as_scalarrÕ   rÖ   z2scalar type {0} given for non scalar argument #{1}©rÛ   Ústride)r    r"   rs   r   r]   r   r—   rY   r_   r×   r3   rÙ   Ú	TypeErrorÚformatÚrangerq   Ú_ArrayAsScalarArgLoaderÚ_ArrayArgLoaderrÛ   Ú_loaderÚ_ScalarArgLoader)r�   r    r"   r   rX   r�   rÆ   r�   rÃ   rÅ   rž   rY   Zcore_step_ptrrç   rè   rÙ   rÕ   rÖ   ÚjZstepptrr   Zldclsr/   rå   r0   rŸ   \  s\    ÿ
ÿÿý
ÿþû
 ÿzGUArrayArg.__init__c                 C   s   | j j| j| j| j|d�S )N)r    r"   rY   rP   )rð   r   r    r"   rY   )r�   rP   r/   r/   r0   r´   —  s     ÿzGUArrayArg.get_array_at_offsetN)r¥   r¦   r§   rŸ   r´   r/   r/   r/   r0   r»   [  s   ;r»   c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )rñ   zÊ
    Handle GFunc argument loading where a scalar type is used in the core
    function.
    Note: It still has a stride because the input to the gufunc can be an array
          for this argument.
    c                 C   s   || _ || _d S r>   ré   )r�   rÛ   rê   r/   r/   r0   rŸ   ¤  s    z_ScalarArgLoader.__init__c                 C   s:   |  || || j¡g¡}| || | j¡ ¡ ¡}| |¡S r>   )r—   Úmulrê   r™   r˜   rÛ   rš   r   )r�   r    r"   rY   rP   Zdptrr/   r/   r0   r   ¨  s
    ÿz_ScalarArgLoader.loadN)r¥   r¦   r§   Ú__doc__rŸ   r   r/   r/   r/   r0   rñ   œ  s   rñ   c                   @   s(   e Zd ZdZdd„ Zdd„ Zdd„ ZdS )	rï   zD
    Handle GUFunc argument loading where an array is expected.
    c                 C   s(   || _ || _|| _|| _|| _|| _d S r>   ræ   )r�   rÛ   rÙ   rç   rè   rÕ   rÖ   r/   r/   r0   rŸ   µ  s    z_ArrayArgLoader.__init__c              	   C   s–   t j| j| jdd�}| |¡}|||ƒ}t ||| | j|¡¡}|  	||¡\}	}
| 
| | j¡¡}|j|| ||jj¡|	|
| t j|¡d d� | ¡ S )NÚA)rÛ   rÙ   Zlayout)rY   rÕ   rÖ   rÝ   Zmeminfo)r   r×   rÛ   rÙ   rØ   r   r    ró   rç   Ú_shape_and_stridesrœ   r˜   Zpopulate_arrayr™   rY   Útypers   r]   Z	_getvalue)r�   r    r"   rY   rP   Zarytyprá   râ   Zoffseted_datarÕ   rÖ   rÝ   r/   r/   r0   r   ½  s.    

ÿþÿÿù	z_ArrayArgLoader.loadc                 C   s$   t  || j¡}t  || j¡}||fS r>   )r   Ú
pack_arrayrÕ   rÖ   )r�   r    r"   rÕ   rÖ   r/   r/   r0   rö   Õ  s    z"_ArrayArgLoader._shape_and_stridesN)r¥   r¦   r§   rô   rŸ   r   rö   r/   r/   r/   r0   rï   °  s   rï   c                   @   s   e Zd ZdZdd„ ZdS )rî   z˜
    Handle GUFunc argument loading where the shape signature specifies
    a scalar "()" but a 1D array is used for the type of the core function.
    c                 C   s@   |  tjd¡}|  tjd¡}t ||g¡}t ||g¡}||fS )Nr³   r   )rs   r   r]   r   rø   )r�   r    r"   Úoner‘   rÕ   rÖ   r/   r/   r0   rö   á  s
    z*_ArrayAsScalarArgLoader._shape_and_stridesN)r¥   r¦   r§   rô   rö   r/   r/   r/   r0   rî   Û  s   rî   )#Úcollectionsr   ÚnumpyrÚ   Zllvmlite.irr   r   Zllvmliter   Z
numba.corer   r   Znumba.core.compiler_lockr   Znumba.core.cachingr	   r
   r   r1   r6   rC   rN   rR   r•   Úobjectrr   r¬   r¨   rÑ   rÓ   rÒ   r»   rñ   rï   rî   r/   r/   r/   r0   Ú<module>   s0     o) <
`A+