+
    :i(                        ^ RI t ^ RIHtHtHtHtHtHtHtH	t	H
t
 ^ RIt]P                  ! R]P                  3R]P                  3.RR7      t]	! ]4      t]P                   ;tt]P                   '       * t]
! ]]]R7      R 4       t]
! ]]]R7      R	 4       t]
! ]]]R7      R
 4       t]
! ]]]R7      R 4       t]
! ]]]R7      R 4       t]
! ]]]R7      R 4       t]
! ]]]R7      R 4       t]
! ]]]R7      R 4       t]P                  ! ^] P8                  ,          4      t]P
                  ! ^] P8                  ,          4      t]
! ]]]R7      R 4       t]
! ]]]R7      R 4       t ]
! ]]]R7      R 4       t!RR lt"RR lt#R# )    N)	configcudafloat32float64uint32int64uint64
from_dtypejits0s1T)align)forceobjloopliftnopythonc                R   \        V4      p\        V4      pV\        R4      ,           pW3\        ^4      ,	          ,          \        R4      ,          pW3\        ^4      ,	          ,          \        R4      ,          pW3\        ^4      ,	          ,          pW0V,          R&   W0V,          R&   R# )a  Use SplitMix64 to generate an xoroshiro128p state from 64-bit seed.

This ensures that manually set small seeds don't result in a predictable
initial sequence from the random number generator.

:type states: 1D array, dtype=xoroshiro128p_dtype
:param states: array of RNG states
:type index: uint64
:param index: offset in states to update
:type seed: int64
:param seed: seed value to use when initializing state
l   |~fq	 l   e9z l   b&&&	 r   r   N)r   r	   r   )statesindexseedzs   &&& O/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/cuda/random.pyinit_xoroshiro128p_stater   .   s     %LE$<Dv())A	
6":o	&);"<<A	
6":o	&);"<<A	&*_A5M$5M$    c                z    \        V 4      p \        V4      pW,          V \        ^@V,
          4      ,	          ,          # )zLeft rotate x by k bits.)r	   r   )xks   &&r   rotlr   H   s0     	q	Aq	AFqF26N*++r   c                P   \        V4      pW,          R,          pW,          R,          pW#,           pW2,          p\        \        V\        ^74      4      4      V,          V\        ^4      ,          ,          W,          R&   \        \        V\        ^$4      4      4      W,          R&   V# )zReturn the next random uint64 and advance the RNG in states[index].

:type states: 1D array, dtype=xoroshiro128p_dtype
:param states: array of RNG states
:type index: int64
:param index: offset in states to update
:rtype: uint64
r   r   )r   r	   r   r   )r   r   r   r   results   &&   r   xoroshiro128p_nextr    P   s     %LE	t	B	t	BWFHB b&*!56;rVBZ?OPFM$ b&*!56FM$Mr   c                   \        V4      p\        R4      \        R4      3p\        ^ 4      p\        ^ 4      p\        ^4       Fz  p\        ^@4       Fh  pW%,          \        ^4      \        V4      ,          ,          '       d-   W0V,          R,          ,          pW@V,          R,          ,          p\	        W4       Kj  	  K|  	  W0V,          R&   W@V,          R&   R# )zAdvance the RNG in ``states[index]`` by 2**64 steps.

:type states: 1D array, dtype=xoroshiro128p_dtype
:param states: array of RNG states
:type index: int64
:param index: offset in states to update
l   zKW`u l   "U.XC r   r   N)r   r	   ranger   r    )r   r   jumpr   r   ibs   &&     r   xoroshiro128p_jumpr&   f   s     %LE%&/A(BCD	B	B1XrAw&)vay011UmD))UmD))v-	   5M$5M$r   c                    \        V 4      p V \        ^4      ,	          \        ^4      \        ^4      \        ^54      ,          ,          ,          # )z7Convert uint64 to float64 value in the range [0.0, 1.0))r	   r   r   r   s   &r   uint64_to_unit_float64r)      s6     	q	AO
fQi6":.E FGGr   c                @    \        V 4      p \        \        V 4      4      # )z7Convert uint64 to float32 value in the range [0.0, 1.0))r	   r   r)   r(   s   &r   uint64_to_unit_float32r+      s     	q	A)!,--r   c                @    \        V4      p\        \        W4      4      # )zReturn a float32 in range [0.0, 1.0) and advance ``states[index]``.

:type states: 1D array, dtype=xoroshiro128p_dtype
:param states: array of RNG states
:type index: int64
:param index: offset in states to update
:rtype: float32
)r   r+   r    r   r   s   &&r   xoroshiro128p_uniform_float32r.           %LE!"4V"CDDr   c                @    \        V4      p\        \        W4      4      # )zReturn a float64 in range [0.0, 1.0) and advance ``states[index]``.

:type states: 1D array, dtype=xoroshiro128p_dtype
:param states: array of RNG states
:type index: int64
:param index: offset in states to update
:rtype: float64
)r   r)   r    r-   s   &&r   xoroshiro128p_uniform_float64r1      r/   r   c                
   \        V4      p\        W4      p\        W4      p\        P                  ! \	        R4      ) \        P
                  ! V4      ,          4      \        P                  ! \        V,          4      ,          pV# )av  Return a normally distributed float32 and advance ``states[index]``.

The return value is drawn from a Gaussian of mean=0 and sigma=1 using the
Box-Muller transform.  This advances the RNG sequence by two steps.

:type states: 1D array, dtype=xoroshiro128p_dtype
:param states: array of RNG states
:type index: int64
:param index: offset in states to update
:rtype: float32
       @)r   r.   mathsqrtr   logcosTWO_PI_FLOAT32r   r   u1u2z0s   &&   r   xoroshiro128p_normal_float32r=      \     %LE	&v	5B	&v	5B	GCL=488B</	0488NR<O3P	PB Ir   c                
   \        V4      p\        W4      p\        W4      p\        P                  ! \	        R4      ) \        P
                  ! V4      ,          4      \        P                  ! \        V,          4      ,          pV# )av  Return a normally distributed float32 and advance ``states[index]``.

The return value is drawn from a Gaussian of mean=0 and sigma=1 using the
Box-Muller transform.  This advances the RNG sequence by two steps.

:type states: 1D array, dtype=xoroshiro128p_dtype
:param states: array of RNG states
:type index: int64
:param index: offset in states to update
:rtype: float64
r3   )r   r.   r4   r5   r   r6   r7   TWO_PI_FLOAT64r9   s   &&   r   xoroshiro128p_normal_float64rA      r>   r   c                    V P                   ^ ,          p\        V4      p\        V4      pV^8  d]   \        V ^ V4       \        V4       F  p\	        V ^ 4       K  	  \        ^V4       F  pW^,
          ,          W&   \	        W4       K!  	  R# R# )r   N)shaper	   r   r"   r&   )r   r   subsequence_startn_r$   s   &&&   r   init_xoroshiro128p_states_cpurG      s    QA$<D01Av D1 ()Avq) * q!A1uFIv)  r   c                    \         P                  ! V P                  \        R7      p\	        WAV4       V P                  WCR7       R# )a  Initialize RNG states on the GPU for parallel generators.

This initializes the RNG states so that each state in the array corresponds
subsequences in the separated by 2**64 steps from each other in the main
sequence.  Therefore, as long no CUDA thread requests more than 2**64
random numbers, all of the RNG states produced by this function are
guaranteed to be independent.

The subsequence_start parameter can be used to advance the first RNG state
by a multiple of 2**64 steps.

:type states: 1D DeviceNDArray, dtype=xoroshiro128p_dtype
:param states: array of RNG states
:type seed: uint64
:param seed: starting seed for list of generators
)rC   dtype)streamN)npemptyrC   xoroshiro128p_dtyperG   copy_to_device)r   r   rD   rJ   
states_cpus   &&&& r   init_xoroshiro128p_statesrP      s5    & 4GHJ!*4EF
*4r   c                X    \         P                  ! V \        VR7      p\        WAW#4       V# )a  Returns a new device array initialized for n random number generators.

This initializes the RNG states so that each state in the array corresponds
subsequences in the separated by 2**64 steps from each other in the main
sequence.  Therefore, as long no CUDA thread requests more than 2**64
random numbers, all of the RNG states produced by this function are
guaranteed to be independent.

The subsequence_start parameter can be used to advance the first RNG state
by a multiple of 2**64 steps.

:type n: int
:param n: number of RNG states to create
:type seed: uint64
:param seed: starting seed for list of generators
:type subsequence_start: uint64
:param subsequence_start:
:type stream: CUDA stream
:param stream: stream to run initialization kernel on
)rI   rJ   )r   device_arrayrM   rP   )rE   r   rD   rJ   r   s   &&&& r   create_xoroshiro128p_statesrS     s)    * q(;FKFf,=FMr   )r   r   )$r4   numbar   r   r   r   r   r   r	   r
   r   numpyrK   rI   rM   xoroshiro128p_typeENABLE_CUDASIM	_forceobj	_looplift	_nopythonr   r   r    r&   r)   r+   r.   r1   pir8   r@   r=   rA   rG   rP   rS    r   r   <module>r]      s   $ $ $ 4 hhryy 1D"))3DE%)+  34  -- -	I%%%	 i)i@ A2 i)i@, A, i)i@ A* i)i@ A4 i)i@H AH i)i@. A. i)i@
E A
E i)i@
E A
E AK(AK( i)i@ A0 i)i@ A0 i)i@* A*$52r   