U
    ¿|eCj  ã                   @   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©Ú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ÚretvalÚif_okÚif_errorÚgilÚoffÚary© r2   úT/var/www/website-v5/atlas_env/lib/python3.8/site-packages/numba/np/ufunc/wrappers.pyÚ_build_ufunc_loop_body   s&    
 þÿr4   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)Úkeep_new)r   ÚpyobjectÚlenr   Ú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,   Úelemr0   r1   r2   r2   r3   Ú_build_ufunc_loop_body_objmode,   s"    
 þÿr;   c
                    s@   ‡ ‡‡fdd„}
‡‡‡fdd„}t |
|| |ˆˆ ˆˆˆ|||	d�S )Nc                     s   ‡fdd„t ˆˆ ƒD ƒ} | S )Nc                    s    g | ]\}}|  ˆ  |¡¡‘qS r2   ©Úload_directr   ©Ú.0r0   r1   ©r#   r2   r3   Ú
<listcomp>O   s   ÿz6build_slow_loop_body.<locals>.load.<locals>.<listcomp>)r   ©r*   )r$   r#   r&   r2   r3   r   N   s    
ÿz"build_slow_loop_body.<locals>.loadc                    s   ˆ  | ˆ  ˆ¡¡ d S ©N)Ústore_directr   ©r,   )r#   r%   r'   r2   r3   r   S   s    z#build_slow_loop_body.<locals>.store©r   ©r4   )r!   r"   r#   r$   r%   r&   r'   r(   r)   r   r   r   r2   )r$   r#   r&   r%   r'   r3   Úbuild_slow_loop_bodyL   s        þrH   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 r2   r<   r>   r@   r2   r3   rA   b   s   ÿz5build_obj_loop_body.<locals>.load.<locals>.<listcomp>c                    s   g | ]\}}ˆ  ||ˆ ¡‘qS r2   )Úfrom_native_value)r?   ÚvÚt)Úenv_managerr)   r2   r3   rA   e   s   ÿ)r   r   rB   )r$   r#   rL   r&   r)   r(   r2   r3   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   Úis_not_nullÚif_thenÚto_native_valuer   ÚcleanupÚAssertionErrorrD   Úvaluer   r9   )r,   r   Únative)r#   r%   r)   r(   r'   r2   r3   r   i   s    z"build_obj_loop_body.<locals>.store)Úget_env_bodyÚget_env_managerr;   )r!   r"   r#   r$   r%   r&   r'   r(   r)   Úenvptrr   Úenv_bodyr   r   r2   )r$   r#   rL   r&   r%   r)   r(   r'   r3   Úbuild_obj_loop_body[   s    	     þrX   c                    s<   ‡ ‡fdd„}‡‡fdd„}t ||| ||ˆ ˆ||||	|
d�S )Nc                     s   ‡fdd„ˆ D ƒ} | S )Nc                    s   g | ]}|  ˆ ¡‘qS r2   )Úload_aligned)r?   r1   )Úindr2   r3   rA   ~   s   ÿz6build_fast_loop_body.<locals>.load.<locals>.<listcomp>r2   rB   )r$   rZ   r2   r3   r   }   s    
ÿz"build_fast_loop_body.<locals>.loadc                    s   ˆ  | ˆ ¡ d S rC   )Ústore_alignedrE   )rZ   r%   r2   r3   r   ‚   s    z#build_fast_loop_body.<locals>.storerF   rG   )r!   r"   r#   r$   r%   r&   r'   r(   rZ   r)   r   r   r   r2   )r$   rZ   r%   r3   Úbuild_fast_loop_body{   s        þr\   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   ©ÚintprF   ©r   r   r   )7Ú
isinstanceÚstrrQ   r   ÚIntTypeÚPointerTypeÚget_value_typer   rg   ÚFunctionTypeÚVoidTypeÚcodegenÚcreate_libraryÚcreate_ir_moduler   Úget_function_typer6   r7   r   r   ÚFunctionÚ
attributesr   r   r   Úappend_basic_blockÚget_env_nameÚfndescÚenvironmentr   Údeclare_env_globalÚmoduleÚ	enumerateÚappendÚ	UArrayArgÚget_constantr   Úalloca_oncer   Útrue_bitÚand_Úis_unit_stridedÚget_python_apir   Ú	for_rangerX   r   Úret_voidr   r\   ÚindexrH   Úadd_ir_moduleÚadd_linking_libraryr   )*r   r!   Úfnamer(   Ú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   rV   re   r$   ÚiÚtypr%   r&   ÚzeroÚ_Úpr'   Zunit_stridedr1   r)   r/   rƒ   Z
is_stridedÚloopr2   r2   r3   Ú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 )r~   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_typer   r   rg   r   ÚgepÚget_data_typeÚbitcastÚ
as_pointerÚdataptrÚget_abi_sizeofZabisizer   Úicmp_unsignedrƒ   )Úselfr!   r#   r   rb   rœ   r£   ÚoffsetZoffseted_argsÚ	data_typeÚsizeofZoffseted_stepr2   r2   r3   Ú__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Úptrr2   r2   r3   r=     s    zUArrayArg.load_directc                 C   s&   | j  | j|g¡}| j | j | j|¡S rC   )r#   r¤   r¨   r!   r±   r£   )r«   rZ   r³   r2   r2   r3   rY     s    zUArrayArg.load_alignedc                 C   s,   t  | j| j|¡}| j | j| j||¡ d S rC   )r   r°   r#   r¨   r!   Ú
pack_valuer£   )r«   rR   r²   r³   r2   r2   r3   rD     s    zUArrayArg.store_directc                 C   s,   | j  | j|g¡}| j | j | j||¡ d S rC   )r#   r¤   r¨   r!   r´   r£   )r«   rR   rZ   r³   r2   r2   r3   r[     s    zUArrayArg.store_alignedN)Ú__name__Ú
__module__Ú__qualname__r¯   r=   rY   rD   r[   r2   r2   r2   r3   r~   ù   s
   r~   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   r6   Zis_objectmodeÚGufWrapperCacher
   ÚcacheÚboolÚ
is_parfors)r«   r¹   rŒ   rº   r»   r½   r¿   r2   r2   r3   r¯   &  s    ÿÿz_GufuncWrapper.__init__c                 C   s   | j jS rC   )rŒ   r   ©r«   r2   r2   r3   r   6  s    z_GufuncWrapper.libraryc                 C   s   | j jS rC   )rŒ   Útarget_contextrÀ   r2   r2   r3   r!   :  s    z_GufuncWrapper.contextc                 C   s   | j jS rC   )r!   r   rÀ   r2   r2   r3   r   >  s    z_GufuncWrapper.call_convc                 C   s   | j jS rC   )rŒ   r(   rÀ   r2   r2   r3   r(   B  s    z_GufuncWrapper.signaturec                 C   s   | j jS rC   )rŒ   rx   rÀ   r2   r2   r3   rx   F  s    z_GufuncWrapper.fndescc                 C   s   | j jS rC   )rŒ   ry   rÀ   r2   r2   r3   r   J  s    z_GufuncWrapper.envc                 C   sR   t  d¡}t  |¡}t  |¡}| j tj¡}t  |¡}t  t  ¡ ||||g¡}|S )Nr]   )	r   rk   rl   r!   rm   r   rg   rn   ro   )r«   r�   rŽ   r�   r�   r‘   r’   r2   r2   r3   Ú_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_wrapperr_   r`   Úweak_odrr   ra   rb   rc   rd   re   é   z.returnrf   c                    s   g | ]}|  ˆ j¡‘qS r2   )Úget_array_at_offsetr‡   )r?   Úa©r¡   r2   r3   rA   œ  s     z1_GufuncWrapper._build_wrapper.<locals>.<listcomp>N)/r!   rm   r   rg   rÂ   rr   r   rs   rx   ÚrestypeÚargtypesÚllvm_func_namer   rt   ru   r   Úlinkager   r   r   rv   r   r„   Úsetrº   r»   r7   Úitemsr¤   r   r|   r   r(   Ú
GUArrayArgr}   Úgen_prologuer   r…   Úgen_loop_bodyÚcbranch_or_continueÚbranchÚposition_at_endÚgen_epiloguer†   rˆ   r‰   r   )!r«   r   r   r�   r’   r”   r•   rŠ   r"   r–   r—   r˜   r™   rš   r#   re   r)   Zunique_symsÚgrpÚsymsZsym_mapÚsÚsym_dimrœ   r$   Ústep_offsetr�   Úsymr1   Zbbreturnr   Ú	innercallÚerrorr2   rÇ   r3   Ú_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 rC   )r¿   r!   rp   rq   rj   rÝ   r½   Úload_overloadrŒ   r(   rÁ   Úenable_object_cachingÚsave_overload©r«   Úwrapper_namer“   r2   r2   r3   Ú_compile_wrapper­  s     ÿz_GufuncWrapper._compile_wrapperc                 C   s&   d| j j }|  |¡}t|| j|d�S )Nz__gufunc__.rh   )rx   Úmangled_namerã   r   r   rá   r2   r2   r3   Ú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   rN   Úis_errorr   r!   r   r   r    )r«   r#   r)   r"   r   r+   r,   r/   r2   r2   r3   rÐ   Í  s       þz_GufuncWrapper.gen_loop_bodyc                 C   s   d S rC   r2   ©r«   r#   r)   r2   r2   r3   rÏ   Ù  s    z_GufuncWrapper.gen_prologuec                 C   s   d S rC   r2   rç   r2   r2   r3   rÔ   Ü  s    z_GufuncWrapper.gen_epilogueN)rµ   r¶   r·   r¯   Úpropertyr   r!   r   r(   rx   r   rÂ   rÝ   rã   r   rå   rÐ   rÏ   rÔ   r2   r2   r2   r3   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 rC   )Ú_prepare_call_to_object_moder!   r(   )r«   r#   r)   r"   r   rÛ   rÜ   r2   r2   r3   rÐ   á  s      ýz"_GufuncObjectWrapper.gen_loop_bodyc                 C   s   |  ¡ | _d S rC   )r   r/   rç   r2   r2   r3   rÏ   è  s    z!_GufuncObjectWrapper.gen_prologuec                 C   s   |  | j¡ d S rC   )r   r/   rç   r2   r2   r3   rÔ   ì  s    z!_GufuncObjectWrapper.gen_epilogueN)rµ   r¶   r·   rÐ   rÏ   rÔ   r2   r2   r2   r3   ré   à  s   ré   c                 C   s2   |j }|jtjkrtnt}|| |||||d� ¡ S )N)r¿   )r(   r   r   r6   ré   r¸   rå   )r¹   rŒ   rº   r»   r½   r¿   r(   Zwrapclsr2   r2   r3   Ú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Ü   r_   T)Úzfill)rR   r   ÚshapeÚstrides)0r{   rv   rm   r   Úint32rg   r   rl   Úvoidptrr6   rn   r   Úget_or_insert_functionr€   rk   r   r�   r|   r   r   r}   ri   ÚArrayÚ
make_arrayr   Úndimr¤   Ú_get_ptr_by_namer¦   rc   ÚnpÚdtyperj   ÚnumÚitemsizeÚcallrI   Úis_nullrÑ   r7   r   r   ræ   r9   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œ   ÚargÚargtyZobjptrÚaryclsÚarrayrž   Úndra   rî   rc   r÷   Ztype_numrù   ÚobjÚobj_is_nullZ
object_sigr+   r,   rÛ   r2   r2   r3   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.ptrr_   rc   zcore.step.ptrr   rÄ   z.type and shape signature mismatch for arg #{0}c                    s   g | ]}ˆ | ‘qS r2   r2   )r?   r×   ©rØ   r2   r3   rA   {  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#   r   r   rg   r   r¤   rc   ri   rò   r7   rô   Ú	TypeErrorÚformatÚranger}   Ú_ArrayAsScalarArgLoaderÚ_ArrayArgLoaderr÷   Ú_loaderÚ_ScalarArgLoader)r«   r!   r#   r   rb   rœ   rÙ   r�   rÖ   rØ   r¬   rc   Zcore_step_ptrr  r  rô   rí   rî   ÚjZstepptrr   Zldclsr2   r  r3   r¯   \  s\    ÿ
ÿÿý
ÿþû
 ÿzGUArrayArg.__init__c                 C   s   | j j| j| j| j|d�S )N)r!   r#   rc   rZ   )r  r   r!   r#   rc   )r«   rZ   r2   r2   r3   rÅ   —  s     ÿzGUArrayArg.get_array_at_offsetN)rµ   r¶   r·   r¯   rÅ   r2   r2   r2   r3   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 rC   r  )r«   r÷   r	  r2   r2   r3   r¯   ¤  s    z_ScalarArgLoader.__init__c                 C   s:   |  || || j¡g¡}| || | j¡ ¡ ¡}| |¡S rC   )r¤   Úmulr	  r¦   r¥   r÷   r§   r   )r«   r!   r#   rc   rZ   Zdptrr2   r2   r3   r   ¨  s
    ÿz_ScalarArgLoader.loadN)rµ   r¶   r·   Ú__doc__r¯   r   r2   r2   r2   r3   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 rC   r  )r«   r÷   rô   r  r  rí   rî   r2   r2   r3   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ô   Úlayout)rc   rí   rî   rù   Úmeminfo)r   rò   r÷   rô   ró   r   r°   r  r  Ú_shape_and_stridesr©   r¥   Úpopulate_arrayr¦   rc   Útyper   rg   Ú	_getvalue)r«   r!   r#   rc   rZ   Zarytyprÿ   r   Zoffseted_datarí   rî   rù   r2   r2   r3   r   ½  s.    

ÿþÿÿù	z_ArrayArgLoader.loadc                 C   s$   t  || j¡}t  || j¡}||fS rC   )r   Ú
pack_arrayrí   rî   )r«   r!   r#   rí   rî   r2   r2   r3   r  Õ  s    z"_ArrayArgLoader._shape_and_stridesN)rµ   r¶   r·   r  r¯   r   r  r2   r2   r2   r3   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   )r   r   rg   r   r  )r«   r!   r#   Úonerž   rí   rî   r2   r2   r3   r  á  s
    z*_ArrayAsScalarArgLoader._shape_and_stridesN)rµ   r¶   r·   r  r  r2   r2   r2   r3   r  Û  s   r  )#Úcollectionsr   Únumpyrö   Úllvmlite.irr   r   Úllvmliter   Ú
numba.corer   r   Únumba.core.compiler_lockr   Únumba.core.cachingr	   r
   r   r4   r;   rH   rX   r\   r¢   Úobjectr~   r¼   r¸   ré   rë   rê   rÎ   r  r  r  r2   r2   r2   r3   Ú<module>   s0     o) <
`A+