B
      ›\h  ã               @   sF  d dl mZmZmZ ddlmZmZmZmZm	Z	m
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z" ddl#m$Z$ ddl%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z,m-Z-m.Z. dd	l/T dd
l/m0Z0 ddl1m2Z2 e2j3 Z4Z3ddl5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z= dd„ Z>dd„ Z?e( @¡  dS )é    )Úprint_functionÚabsolute_importÚdivisioné   )Ú	threadIdxÚblockIdxÚblockDimÚgridDimÚlaneidÚwarpsizeÚsyncthreadsÚsyncthreads_countÚsyncwarpÚsyncthreads_andÚsyncthreads_orÚsharedÚlocalÚconstÚgridÚgridsizeÚatomicÚshfl_sync_intrinsicÚvote_sync_intrinsicÚmatch_any_syncÚmatch_all_syncÚthreadfence_blockÚthreadfence_systemÚthreadfenceÚselpÚpopcÚbrevÚclzÚffsÚfma)ÚCudaSupportError)Únvvm)Ú
initialize)ÚKernelRuntimeError)ÚjitÚautojitÚdeclare_device)Ú*)Ú_auto_device)Ú	reduction)Úall_syncÚany_syncÚeq_syncÚballot_syncÚ	shfl_syncÚshfl_up_syncÚshfl_down_syncÚshfl_xor_syncc              C   s2   d} yt j j} W n tk
r$   Y nX | o0t ¡ S )z†Returns a boolean to indicate the availability of a CUDA GPU.

    This will initialize the driver if it hasn't been initialized.
    F)ÚdriverÚis_availabler$   r%   )Zdriver_is_available© r8   ú5lib/python3.7/site-packages/numba/cuda/device_init.pyr7      s    
r7   c               C   s   t j jS )zIReturns None or an exception if the CUDA driver fails to initialize.
    )r6   Zinitialization_errorr8   r8   r8   r9   Ú
cuda_error.   s    r:   N)AZ
__future__r   r   r   Zstubsr   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   Zcudadrv.errorr$   Zcudadrvr%   Ú r&   Úerrorsr'   Z
decoratorsr(   r)   r*   Zapir,   Zkernelsr-   ZReduceÚreduceZintrinsic_wrapperr.   r/   r0   r1   r2   r3   r4   r5   r7   r:   Zinitialize_allr8   r8   r8   r9   Ú<module>   s   €
(