o
    i                     @   sZ   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r+e  dS 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   sb   t ddd }g d}tdD ]}|tdd qdd	 }|D ]}| |||| q"d S )
Nz(int64,)c                 S   s   d}t | D ]}||7 }q|S )Nr   )range)xresi r	   T/home/ubuntu/veenaModal/venv/lib/python3.10/site-packages/numba/tests/test_multi3.pyfunc   s   
z$TestMulti3.test_multi3.<locals>.func)r               l        l        l   MW	lMW	i  r   r   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   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npnumbar   
numba.corer   unittestTestCaser   r   mainr	   r	   r	   r
   <module>   s    !