
    xKg                         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ej                        Z	e
dk(  r ej                          yy)    N)njit)typesc                       e Zd ZdZd Zy)
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                     t        d      d        }g d}t        d      D ]'  }|j                  t        j                  dd             ) d }|D ]   }| j                   ||       ||             " y )Nz(int64,)c                 4    d}t        |       D ]  }||z  }	 |S )Nr   )range)xresis      [/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/numba/tests/test_multi3.pyfuncz$TestMulti3.test_multi3.<locals>.func   s#    C1Xq J    )r               l        l        l   MW	lMW	i  r   r   c                 *    | dk  ry| | dz
  z  dz  dz  S )Nr   r      l     )r
   s    r   expectedz(TestMulti3.test_multi3.<locals>.expected"   s#    Ava!a%[Q&955r   )r   r	   appendrandomrandintassertEqual)selfr   x_cases_r   r
   s         r   test_multi3zTestMulti3.test_multi3   sp    	j		 
	: sANN6>>!Z89 	6 AXa[$q'2 r   N)__name__
__module____qualname____doc__r!   r   r   r   r   r   	   s    	3r   r   __main__)r   numpynpnumbar   
numba.corer   unittestTestCaser   r"   mainr   r   r   <module>r.      sA        3"" 3B zHMMO r   