U
    hâËd=  ã                   @   sZ   d dl mZmZ d dlmZ d dlmZmZ edƒG dd„ dejƒƒZ	e
dkrVe ¡  dS )	é    )Úfloat64Úuint32)Úcompile_ptx)Úskip_on_cudasimÚunittestz(Compilation unsupported in the simulatorc                   @   s   e Zd Zdd„ ZdS )ÚTestCudaMandelc                 C   s.   dd„ }t ttttt t t f}t||dd� dS )z+Just make sure we can compile this
        c                 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   ú\/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/numba/cuda/tests/cudapy/test_mandel.pyÚmandel   s    

z*TestCudaMandel.test_mandel.<locals>.mandelT)ZdeviceN)r   r   r   )Úselfr   Úargsr   r   r   Útest_mandel   s    
  ÿzTestCudaMandel.test_mandelN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   r   r      s   r   Ú__main__N)Znumbar   r   Znumba.cuda.compilerr   Znumba.cuda.testingr   r   ZTestCaser   r   Úmainr   r   r   r   Ú<module>   s   