
    xKg                        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
y)   )jit    NT)devicec                 J    t         j                  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     `/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/numba/cuda/intrinsic_wrapper.pyall_syncr      "     ::))$9=a@@    c                 J    t         j                  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                 J    t         j                  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                 J    t         j                  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                 N    t         j                  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!LLr   c                 N    t         j                  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%CAFFr   c                 N    t         j                  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%FqIIr   c                 N    t         j                  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J1MMr   )
decoratorsr   r   r   r   r   r   r    r$   r&   r)    r   r   <module>r,      s      DA A DA A DA A DA A DM M DG G DJ J DN Nr   