o
    ۾i                     @   sx   d dl mZmZ d dlZd dlmZmZ d dlmZ e	e
  dedG dd dejZed	kr:e  dS dS )
    )unittestskip_on_cudasimN)typestyping)nvvmz
No libNVVMz+Skip on simulator due to use of cuda_targetc                   @   s   e Zd Zdd Zdd ZdS )TestFunctionResolutionc                 C   s   ddl m} tjtjtjtjtjtjf}|D ])}t	j
}|j}|  ||}||||fi }| j|t|||t|d qd S Nr   )cuda_target)msg)numba.cuda.descriptorr	   operatoraddiaddsubisubmulimulr   float16typing_contextrefreshresolve_value_typeresolve_function_typeassertEqualr   	signaturestrselfr	   opsopfp16	typingctxfntyout r#   d/home/ubuntu/.local/lib/python3.10/site-packages/numba/cuda/tests/nocuda/test_function_resolution.pytest_fp16_binary_operators
   s   
z1TestFunctionResolution.test_fp16_binary_operatorsc                 C   sn   ddl m} tjtf}|D ]'}tj}|j}|  |	|}|
||fi }| j|t||t|d qd S r   )r   r	   r   negabsr   r   r   r   r   r   r   r   r   r   r   r#   r#   r$   test_fp16_unary_operators   s   

z0TestFunctionResolution.test_fp16_unary_operatorsN)__name__
__module____qualname__r%   r(   r#   r#   r#   r$   r      s    r   __main__)numba.cuda.testingr   r   r   
numba.corer   r   numba.cuda.cudadrvr   skipIfis_availableTestCaser   r)   mainr#   r#   r#   r$   <module>   s    