U
    ?h                     @   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	   I/var/www/html/venv/lib/python3.8/site-packages/numba/tests/test_multi3.pyfunc   s    
z$TestMulti3.test_multi3.<locals>.funcr               l    l    l        l   MW	lMW	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randintZ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   !