U
    ,d                     @   s>   d dl mZ d dlmZ G dd dejZedkr:e  dS )    )cuda)unittestc                   @   s   e Zd Zdd ZdS )TestCudaMandelc                 C   s   t jddddd }dS )z+Just make sure we can compile this
        zD(uint32, float64, float64, float64, float64, uint32, uint32, uint32)T)Zdevicec                 S   s   || | }|| | }	| | }
| | }||
|  }|||	  }t ||}d}t|D ]4}|| | }|j|j |j|j  dkrV|  S qV|S )Ny                   )complexrangerealimag)tidZmin_xZmax_xZmin_yZmax_ywidthheightZitersZpixel_size_xZpixel_size_yxyr   r	   czi r   G/tmp/pip-unpacked-wheel-eu7e0c37/numba/cuda/tests/cudapy/test_mandel.pymandel
   s    

z*TestCudaMandel.test_mandel.<locals>.mandelN)r   Zjit)selfr   r   r   r   test_mandel   s    zTestCudaMandel.test_mandelN)__name__
__module____qualname__r   r   r   r   r   r      s   r   __main__N)Znumbar   Znumba.cuda.testingr   ZTestCaser   r   mainr   r   r   r   <module>   s   