o
    ¦¸¢iÒ  ã                   @   sV  d dl Z d dlZd dlmZ d dlmZmZ d dlm	Z	m
Z
mZ d dlmZ d dlmZ e	dƒZde_e d	eef¡e d
d¡dd„ ƒƒZe dd¡dd„ ƒZe dd¡dd„ ƒZdZe dd¡dd„ ƒZe	dƒZde_e dd¡dd„ ƒZe dd¡dd„ ƒZe dd ¡d!d„ ƒZe d"d#¡d$d"„ ƒZe d%d#¡d&d'„ ƒZe d(d)¡d*d+„ ƒZe	d,ƒZe d-d)¡d.d-„ ƒZerÂe d/d)¡d0d/„ ƒZe d1d2¡d3d1„ ƒZ e d4d5¡d6d4„ ƒZ!e
d7d8gƒeƒ ed9ƒeƒ e d:d;¡d<d:„ ƒZ"e d=eeƒ¡d>d=„ ƒZ#e d?eeƒ¡d@d=„ ƒZ#e dAeƒ ¡dBd=„ ƒZ#e	dCƒZ$e$ dDdE¡dFdD„ ƒZ%e$ dGdE¡dHdG„ ƒZ&dS )Ié    N)Úfloat32)Úunicode_typeÚi8)ÚCCÚ
exportmanyÚexport)Úhas_blas)ÚtypedÚpycc_test_simpleFÚmultfÚmultiz
i4(i4, i4)c                 C   s   | | S ©N© ©ÚaÚbr   r   ú[/home/ubuntu/transcripts/venv/lib/python3.10/site-packages/numba/tests/compile_with_pycc.pyÚmult   s   r   Úget_noneznone()c                   C   s   d S r   r   r   r   r   r   r      s   Údivz
f8(f8, f8)c                 C   s   | | S r   r   )ÚxÚyr   r   r   r      ó   é   Úsquarezi8(i8)c                 C   s   | t  S r   )Ú_two©Úur   r   r   r   &   r   Úpycc_test_helperlibÚpowerz
i8(i8, i8)c                 C   s   | | S r   r   )r   Úvr   r   r   r   .   r   Úsqrtzc16(c16)c                 C   ó
   t  | ¡S r   )Úcmathr!   r   r   r   r   r!   2   ó   
Úsizez	i8(f8[:])c                 C   s   | j S r   )r%   ©Úarrr   r   r   r%   6   s   Únp_sqrtzf8(f8)c                 C   r"   r   )Únpr!   r   r   r   r   r(   ;   r$   Úspacingc                 C   r"   r   )r)   r*   r   r   r   r   Ú
np_spacing?   r$   r+   Úrandomzf8(i4)c                 C   s   | dkr
t j | ¡ t j ¡ S ©Néÿÿÿÿ)r)   r,   Úseed)r/   r   r   r   Úrandom_implE   s   
r0   Úpycc_test_nrtÚzero_scalarc                 C   s   t  | ¡}|d S r-   ©r)   Úzeros)Únr'   r   r   r   r2   N   s   
Ú
vector_dotc                 C   s   t  d| | ¡}t  ||¡S )Né   )r)   ÚlinspaceÚdot)r5   r   r   r   r   r6   U   s   r4   z	f8[:](i4)c                 C   r"   r   r3   )r5   r   r   r   r4   [   r$   Ú
np_argsortzintp[:](float64[:])c                 C   r"   r   )r)   Úargsortr&   r   r   r   r:   `   r$   zmultf f4(f4,f4)zmulti i4(i4,i4)zmult f8(f8, f8)Údict_usecasezintp[:](intp[:])c                 C   sP   t  ¡ }t| jƒD ]}| | ||< q	t | ¡}| ¡ D ]
\}}|| ||< q|S r   )r	   ÚDictÚranger%   r)   Ú
zeros_likeÚitems)r'   ÚdÚiÚoutÚkr    r   r   r   r<   n   s   
Úinternal_str_dictc                 C   s*   t j tt¡}| |vrt|ƒ|| < t|ƒS r   )r	   r=   Úemptyr   r   Úlen)r   rA   r   r   r   rE   y   s   Úhash_strc                 C   s   t | ƒS r   ©Úhash)r   r   r   r   rE   €   r   Úhash_literal_str_Ac                   C   s   t dƒS )NÚArI   r   r   r   r   rE   „   r   Úpycc_test_dynamic_excÚdo_setitem1zvoid(f8[:, :], f8[:, :])c                 C   ó   || d d …d d …f< d S r   r   r   r   r   r   rN      ó   Údo_setitem2c                 C   rO   r   r   r   r   r   r   rQ   ‘   rP   )'r#   Únumpyr)   Únumbar   Únumba.typesr   r   Ú
numba.pyccr   r   r   Únumba.tests.supportr   r	   ÚccÚuse_nrtr   r   r   r   r   Úcc_helperlibr   r!   r%   r(   r+   r0   Úcc_nrtr2   r6   r4   r:   r<   rE   Ú	cc_dynexcrN   rQ   r   r   r   r   Ú<module>   st    



































