
    
f                     j   d dl mZ ddlZ ed          d             Z ed          d             Z ed          d             Z ed          d	             Z ed          d
             Z ed          d             Z ed          d             Z	 ed          d             Z
dS )   )jit    NT)devicec                 P    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	predicates     <lib/python3.11/site-packages/numba/cuda/intrinsic_wrapper.pyall_syncr      #     :))$9==a@@    c                 P    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   s     r   any_syncr      r   r   c                 P    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   s     r   eq_syncr      r   r   c                 P    t           j                            | d|          d         S )zo
    Returns a mask of all threads in the warp whose predicate is true,
    and are within the given mask.
       r   r   r   s     r   ballot_syncr       r   r   c                 T    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   valuesrc_lanes      r   	shfl_syncr    )   s'     :))$5(DII!LLr   c                 T    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   deltas      r   shfl_up_syncr$   3   s'     :))$5%CCAFFr   c                 T    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"   s      r   shfl_down_syncr&   =   s'     :))$5%FFqIIr   c                 T    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   	lane_masks      r   shfl_xor_syncr)   G   s'     :))$5)TJJ1MMr   )
decoratorsr   r   r   r   r   r   r    r$   r&   r)    r   r   <module>r,      s          DA A A DA A A DA A A DA A A DM M M DG G G DJ J J DN N N N Nr   