B
      \ē  ć               @   s“   d dl mZ ddlmZ d dlZedddd Zeddd	d
 Zedddd Zedddd Zedddd Z	edddd Z
edddd Zedddd ZdS )é    )Śabsolute_importé   )ŚjitNT)Zdevicec             C   s   t j | d|”d S )z
    If for all threads in the masked warp the predicate is true, then
    a non-zero value is returned, otherwise 0 is returned.
    r   r   )ŚnumbaŚcudaŚvote_sync_intrinsic)ŚmaskŚ	predicate© r
   ś;lib/python3.7/site-packages/numba/cuda/intrinsic_wrapper.pyŚall_sync   s    r   c             C   s   t j | d|”d S )z
    If for any thread in the masked warp the predicate is true, then
    a non-zero value is returned, otherwise 0 is returned.
    r   )r   r   r   )r   r	   r
   r
   r   Śany_sync   s    r   c             C   s   t j | d|”d S )z
    If for all threads in the masked warp the boolean predicate is the same,
    then a non-zero value is returned, otherwise 0 is returned.
    é   r   )r   r   r   )r   r	   r
   r
   r   Śeq_sync   s    r   c             C   s   t j | d|”d S )zp
    Returns a mask of all threads in the warp whoose predicate is true,
    and are within the given mask.
    é   r   )r   r   r   )r   r	   r
   r
   r   Śballot_sync!   s    r   c             C   s   t j | d||d”d S )z
    Shuffles value across the masked warp and returns the value
    from src_lane. If this is outside the warp, then the
    given value is returned.
    r   é   )r   r   Śshfl_sync_intrinsic)r   ŚvalueZsrc_laner
   r
   r   Ś	shfl_sync*   s    r   c             C   s   t j | d||d”d S )z£
    Shuffles value across the masked warp and returns the value
    from (laneid - delta). If this is outside the warp, then the
    given value is returned.
    r   r   )r   r   r   )r   r   Śdeltar
   r
   r   Śshfl_up_sync4   s    r   c             C   s   t j | d||d”d S )z£
    Shuffles value across the masked warp and returns the value
    from (laneid + delta). If this is outside the warp, then the
    given value is returned.
    r   r   r   )r   r   r   )r   r   r   r
   r
   r   Śshfl_down_sync>   s    r   c             C   s   t j | d||d”d S )zd
    Shuffles value across the masked warp and returns the value
    from (laneid ^ lane_mask).
    r   r   r   )r   r   r   )r   r   Z	lane_maskr
   r
   r   Śshfl_xor_syncH   s    r   )Z
__future__r   Z
decoratorsr   r   r   r   r   r   r   r   r   r   r
   r
   r
   r   Ś<module>   s   				


