+
    :i                        ^ RI Ht ^ RIHt ^ RIt^ RIt ! R R4      t ! R R]4      t]P                  ! RR	7      R
 4       t
]P                  ! RR	7      R 4       t]! ]
4      t]! ]4      t^t]P                  ! RR	7      R 4       t]P                  ! RR	7      R 4       t]P                  ! RR	7      R 4       t]! ]4      t]! ]4      t]P(                  ! R]P*                  3R]P,                  3.4      t]P(                  ! R]P*                  3R]P,                  3.RR7      t]P2                  ! ^]R7      t]! ]P8                  4       F)  t]^,           ]],          R&   ]R,           ]],          R&   K+  	  ]P<                  ! ]]R7      t]P                  ! RR	7      R 4       t ]! ] ]R7      t!]! ] ]R7      t"R t#]#! ^4      t$]#! ^4      t%]#! ^4      t&]#! ^	4      t']P                  ! RR	7      R 4       t(]! ](4      t)]P                  ! RR	7      R 4       t(]! ](4      t*]P                  ! RR	7      R 4       t+]P                  ! RR	7      R 4       t,]! ],4      t-]P                  ! RR	7      R 4       t.]! ].4      t/ ! R R]4      t0R t1R# )     )cuda)CUDATestCaseNc                   D   a  ] tR t^t o RtRR ltR t]R 4       tRt	V t
R# )UseCasea  
Provide a way to call a kernel as if it were a function.

This allows the CUDA cache tests to closely match the CPU cache tests, and
also to support calling cache use cases as njitted functions. The class
wraps a function that takes an array for the return value and arguments,
and provides an interface that accepts arguments, launches the kernel
appropriately, and returns the stored return value.

The return type is inferred from the type of the first argument, unless it
is explicitly overridden by the ``retty`` kwarg.
Nc                    Wn         W n        R # N_func_retty)selffuncrettys   &&&d/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/cuda/tests/cudapy/cache_usecases.py__init__UseCase.__init__   s    
    c                4   V Uu. uF  p\         P                  ! V4      NK  	  ppV P                  '       d$   \         P                  ! RV P                  R 7      pM\         P                  ! V^ ,          4      pV P
                  ! V.VO5!   VR,          # u upi )dtype )npasarrayr   ndarray
zeros_like_call)r   argsarg
array_argsarray_returns   &*   r   __call__UseCase.__call__   sn    156#bjjo
6;;;::b<L==A7L

<-*-B 7s   Bc                    V P                   # r   r
   )r   s   &r   r   UseCase.func"   s    zzr   r	   r   )__name__
__module____qualname____firstlineno____doc__r   r    propertyr   __static_attributes____classdictcell____classdict__s   @r   r   r      s(        r   r   c                   &   a  ] tR t^'t o R tRtV tR# )CUDAUseCasec                <    V P                   R,          ! V.VO5!   R# )   Nr2   r2   r#   )r   retr   s   &&*r   r   CUDAUseCase._call(   s    

4$t$r   r   N)r%   r&   r'   r(   r   r+   r,   r-   s   @r   r0   r0   '   s     % %r   r0   Tcachec                 P    VR,          VR,          ,           \         ,           V R&   R # Nr   Zrxys   &&&r   add_usecase_kernelr@   ,       bEAbEMAAbEr   Fc                 P    VR,          VR,          ,           \         ,           V R&   R # r9   r:   r<   s   &&&r   add_nocache_usecase_kernelrC   1   rA   r   c                 (    W,           \         ,           # r   r:   )r>   r?   s   &&r   innerrE   >   s    519r   c                 B    \        VR,          ) VR,          4      V R&   R # r9   rE   r<   s   &&&r   outer_kernelrH   C       1R5&!B% AbEr   c                 B    \        VR,          ) VR,          4      V R&   R # r9   rG   r<   s   &&&r   outer_uncached_kernelrK   H   rI   r   ab)alignr   g     @E@c                     W,          V R&   R # r9   r   )r=   aryis   &&&r   record_returnrR   _   s    FAbEr   )r   c                 Z   a  \         P                  ! R R7      V 3R l4       p\        V4      # )Tr6   c                 .   < SVR,          ,           V R&   R # r9   r   )r=   r?   r>   s   &&r   closuremake_closure.<locals>.closurek   s    AbE	"r   )r   jitr0   )r>   rU   s   f r   make_closurerX   j   s+    	XXD  wr   c                 ,    VR,          ^,           V R&   R# )   Nr   r   r=   r>   s   &&r   ambiguous_functionr\   z       bEAIAbEr   c                 ,    VR,          ^,           V R&   R# )   Nr   r   r[   s   &&r   r\   r\      r]   r   c                  	   \         P                  P                  R\        P                  4      p \         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p	\         P                  P                  R\        P                  4      p
\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p\         P                  P                  R\        P                  4      p^ V R&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ V	R&   ^ V
R&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   ^ VR&   R# )r2   :NNNNr3   )r   localarrayr   float64)aaabacadaeafagahaiajakalamanaoaparatauavawaxayazs                           r   many_localsr|      sJ   			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-B			&"**	-BBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEBqEr   c                     VR,          V R&   R # r9   r   r[   s   &&r   simple_usecase_kernelr~      s    bEAbEr   c                 b    \         P                  P                  4       pVP                  4        R # r   )r   cg	this_gridsync)r=   r>   grids   && r   cg_usecase_kernelr      s    77DIIKr   c                   *   a  ] tR t^t o RtR tRtV tR# )_TestModulez
Tests for functionality of this module's functions.
Note this does not define any "test_*" method, instead check_module()
should be called by hand.
c                   V P                  VP                  ^^4      ^4       V P                  VP                  ^^4      ^4       V P                  VP                  ^^4      ^4       VP	                  VP
                  ^4      pV P                  \        V4      R4       VP                  VP                  ^4      pV P                  \        V4      R4       VP                  ^4       R# )rZ   N)rZ   g     E@)
assertPreciseEqualadd_usecaseouter_uncachedouterrecord_return_packed
packed_arrtuplerecord_return_alignedaligned_arrsimple_usecase_caller)r   mod
packed_recaligned_recs   &&  r   check_module_TestModule.check_module   s    1 5q9 2 21a 8!<		!Q3--cnna@
j 19=//Ck 2I>!!!$r   r   N)r%   r&   r'   r(   r)   r   r+   r,   r-   s   @r   r   r      s     
% 
%r   r   c                  n    \         P                  \        ,          p \        4       P	                  V 4       R # r   )sysmodulesr%   r   r   )r   s    r   	self_testr      s     
++h
CMs#r   )2numbar   numba.cuda.testingr   numpyr   r   r   r0   rW   r@   rC   r   add_nocache_usecaser;   rE   rH   rK   r   r   r   int8rc   packed_record_typealigned_record_typeemptyr   rangesizerQ   rb   r   rR   r   r   rX   closure1closure2closure3closure4r\   renamed_function1renamed_function2r|   r~   r   r   
cg_usecaser   r   r   r   r   <module>r      s    +  
 @%' %
     ,-!"<= 
   ! ! ! ! 	L!23 XXRWW~RZZ/@AB hhbggbjj0AB$O XXa12
	z	AQJqM#TJqM# 
  hhz)<=   #=8JK #M9LM 
  ????
     23      23  1 1l   $$9: 
  
 *+
%, %($r   