U
    Ã9%eÍ  ã                   @   sV   d dl Z d dlZd dlmZ d dlmZ d dlZG dd„ dejƒZ	e
dkrRe ¡  dS )é    N)Únjit)Útypesc                   @   s   e Zd ZdZdd„ ZdS )Ú
TestMulti3a¢  
    This test is only relevant for 32-bit architectures.

    Test __multi3 implementation in _helperlib.c.
    The symbol defines a i128 multiplication.
    It is necessary for working around an issue in LLVM (see issue #969).
    The symbol does not exist in 32-bit platform, and should not be used by
    LLVM.  However, optimization passes will create i65 multiplication that
    is then lowered to __multi3.
    c                 C   st   t dƒdd„ ƒ}dddddd	d
ddddg}tdƒD ]}| t dd¡¡ q2dd„ }|D ]}|  ||ƒ||ƒ¡ qVd S )Nz(int64,)c                 S   s   d}t | ƒD ]}||7 }q|S )Nr   )Úrange)ÚxÚresÚi© r	   úV/var/www/html/Darija-Ai-API/env/lib/python3.8/site-packages/numba/tests/test_multi3.pyÚfunc   s    
z$TestMulti3.test_multi3.<locals>.funcéÿÿÿÿr   é   é   é   é   l   þÿ l   ÿÿ l        l   ïMWž	lüÿÿÿïMWž	iô  c                 S   s    | dkrdS | | d  d d@ S )Nr   r   é   l   ÿÿÿÿ r	   )r   r	   r	   r
   Úexpected"   s     z(TestMulti3.test_multi3.<locals>.expected)r   r   ÚappendÚrandomÚrandintÚassertEqual)Úselfr   Zx_casesÚ_r   r   r	   r	   r
   Útest_multi3   s    
   þzTestMulti3.test_multi3N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r	   r	   r	   r
   r   	   s   
r   Ú__main__)r   ÚnumpyÚnpZnumbar   Z
numba.corer   ZunittestZTestCaser   r   Úmainr	   r	   r	   r
   Ú<module>   s   !