+
    ړLj                     N   ^RI Ht ^RIHt ^RIHt ]P                  ! ^
4      t]]3R R ll4       t]]3R R ll4       t	]]3R R	 ll4       t
]]3R
 R ll4       t]R 4       t]]3R R ll4       t]]3R R ll4       t]R 4       t]]3R R ll4       t]]3R R ll4       tR# )   )jit)core)mathc                8    V ^8  d   QhR\         P                  /# r   n_roundstl	constexpr)formats   "B/app/.local/lib/python3.14/site-packages/triton/language/random.py__annotate__r      s      ",,     c                d   V P                   \        P                  8X  d
   RpRpRp	Rp
M:\        P                  ! V P                   \        P                  8H  R4       RpRpRp	R	p
\        P
                  ! V4       F  pT	pT
pYr\        P                  ! W4      V,          V,          p \        P                  ! W4      V,          V,          p\        P                  ! WR
R7      p\        P                  ! WR
R7      p\        P                  ! WGR
R7      p\        P                  ! WXR
R7      pK  	  WW#3# )zN
Run `n_rounds` rounds of Philox for state (c0, c1, c2, c3) and key (k0, k1).
l   yn< l   .v l   S$ l   W= z"dtype not supported in philox_impll   |~fq	 l   ;'	:=[ l   lB;: l   W$*	R F)sanitize_overflow)
dtyper
   uint32static_assertuint64static_ranger   umulhimuladd)c0c1c2c3k0k1r   PHILOX_KEY_APHILOX_KEY_BPHILOX_ROUND_APHILOX_ROUND_B_AB_c0_c2s   &&&&&&&         r   philox_implr)      s    
 
xx299%/%/'1'1
RYY.0TU%7%7'9'9__X& S[[ 2%*[[ 2%*VVAe4VVAe4VVB>VVB> ' 2>r   c                8    V ^8  d   QhR\         P                  /# r   r	   )r   s   "r   r   r   .   s     C C2<< Cr   c           	      ,   \         P                  ! V 4      p \         P                  ! V P                  P	                  4       4       V P                  \         P                  4      p \         P                  ! V4      p\         P                  ! V4      p\         P                  ! V4      p\         P                  ! V4      p\         P                  ! VP                  P                  4      ^ 8X  de   \         P                  pV ^ ,	          R,          P                  \         P                  4      pV R,          P                  \         P                  4      pMm\         P                  ! \         P                  ! VP                  P                  4      ^@8H  R4       \         P                  p\         P                  ! R^ VR7      pT pVP                  VRR7      pVP                  VRR7      pVP                  VRR7      pVP                  VRR7      p\        WW4WV4      # )    l    z bitwidth not supported in philox)r   Tbitcast)   )r
   	to_tensorr   r   is_inttor   r   primitive_bitwidthr   fullr)   )	seedr   r   r   r   r   	int_dtypeseed_hiseed_los	   &&&&&&   r   philoxr9   -   sq   <<DTZZ&&()77299D	b	B	b	B	b	B	b	B	||BHH//0B6II	BJ*,00;*$((3
bhh&A&ABbHJlmII	''%)4	y$	'B	y$	'B	y$	'B	y$	'BrrwBBr   c                8    V ^8  d   QhR\         P                  /# r   r	   )r   s   "r   r   r   I   s      BLL r   c                (    \        WV4      w  p  pV# )aU  
Given a :code:`seed` scalar and an :code:`offset` block, returns a single
block of random :code:`int32`.

If you need multiple streams of random numbers,
using `randint4x` is likely to be faster than calling `randint` 4 times.

:param seed: The seed for generating random numbers.
:param offset: The offsets to generate random numbers for.
)	randint4x)r5   offsetr   retr$   s   &&&  r   randintr?   H   s     T84LCAqJr   c                8    V ^8  d   QhR\         P                  /# r   r	   )r   s   "r   r   r   Y   s     @ @bll @r   c                   VP                  \        P                  4      pV^ ,          p\        P                  ! VP                  P
                  4      ^ 8  d(   V^ ,	          P                  \        P                  4      pMTp\        WWTWB4      # )a9  
Given a :code:`seed` scalar and an :code:`offset` block, returns four
blocks of random :code:`int32`.

This is the maximally efficient entry point
to Triton's Philox pseudo-random number generator.

:param seed: The seed for generating random numbers.
:param offsets: The offsets to generate random numbers for.
)r2   r
   r   r   r   r3   r9   )r5   r=   r   	offset_lo_0	offset_his   &&&   r   r<   r<   X   sf     		"))$I	QB	||FLL334r9r\%%bii0		$9"??r   c                   \         P                  ! V P                  \         P                  8H  4      '       g8   \         P                  ! V P                  \         P                  8H  4      '       d%   V P                  \         P                  RR7      p RpM\         P                  ! \         P                  ! V P                  \         P                  8H  4      ;'       g2    \         P                  ! V P                  \         P                  8H  4      4       V P                  \         P                  RR7      p Rp\         P                  ! V ^ 8  V ) ^,
          V 4      p W,          # )zg
Numerically stable function to convert a random uint into a random float uniformly sampled in [0, 1).
Tr-   g=g   ;)
r
   r   r   r   int32r2   r   r   int64where)xscales   & r   uint_to_uniform_floatrK   ~   s     
||AGGryy())R\\!''RXX:M-N-NDD4D( 
agg&:;``r||AGGWYW_W_L_?`aDD4D(&
QQ"A9r   c                8    V ^8  d   QhR\         P                  /# r   r	   )r   s   "r   r   r      s     	) 	) 	)r   c                0    \        WV4      p\        V4      # )z
Given a :code:`seed` scalar and an :code:`offset` block,
returns a block of random :code:`float32` in :math:`U(0, 1)`.

:param seed: The seed for generating random numbers.
:param offsets: The offsets to generate random numbers for.
)r?   rK   )r5   r=   r   sources   &&& r   randrO      s     T8,F ((r   c                8    V ^8  d   QhR\         P                  /# r   r	   )r   s   "r   r   r      s      BLL r   c                    \        WV4      w  r4rV\        V4      p\        V4      p\        V4      p	\        V4      p
WxW3# )z
Given a :code:`seed` scalar and an :code:`offsets` block,
returns 4 blocks of random :code:`float32` in :math:`U(0, 1)`.

:param seed: The seed for generating random numbers.
:param offsets: The offsets to generate random numbers for.
)r<   rK   )r5   offsetsr   i1i2i3i4u1u2u3u4s   &&&        r   rand4xr[      sF     th7NBB	r	"B	r	"B	r	"B	r	"B2>r   c                   \         P                  ! RV 4      p RV,          p\        P                  ! R\        P                  ! V 4      ,          4      pV\        P
                  ! V4      ,          V\        P                  ! V4      ,          3# )zBox-Muller transformgHz>g-DT!@g       )r
   maximumr   sqrtlogcossin)rW   rX   thrs   &&  r   pair_uniform_to_normalrd      s^     
FB	B	R	B		$"%&Atxx|Q"---r   c                8    V ^8  d   QhR\         P                  /# r   r	   )r   s   "r   r   r      s      ",, r   c                l    \        WV4      w  r4 p\        V4      p\        V4      p\        Wg4      w  rV# )z
Given a :code:`seed` scalar and an :code:`offset` block,
returns a block of random :code:`float32` in :math:`\mathcal{N}(0, 1)`.

:param seed: The seed for generating random numbers.
:param offsets: The offsets to generate random numbers for.
)r<   rK   rd   )	r5   r=   r   rS   rT   r$   rW   rX   n1s	   &&&      r   randnrh      s;     T84LBAq	r	"B	r	"B"2*EBIr   c                8    V ^8  d   QhR\         P                  /# r   r	   )r   s   "r   r   r      s      BLL r   c                \    \        WV4      w  r4rV\        W44      w  rx\        WV4      w  rWxW3# )z
Given a :code:`seed` scalar and an :code:`offset` block,
returns 4 blocks of random :code:`float32` in :math:`\mathcal{N}(0, 1)`.

:param seed: The seed for generating random numbers.
:param offsets: The offsets to generate random numbers for.
)r[   rd   )r5   r=   r   rW   rX   rY   rZ   rg   n2n3n4s   &&&        r   randn4xrn      s6     D(3NBB#B+FB#B+FB2>r   N)runtime.jitr    r   r
   r   r   N_ROUNDS_DEFAULTr)   r9   r?   r<   rK   rO   r[   rd   rh   rn    r   r   <module>rs      s     <<#  AQ  @ :J C C4 3C   5E @ @J  & 0@ 	) 	) 3C  * . . 1A   3C  r   