+
    :i8                       ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt	^ RI
t
^ RIHt ^ RIt^ RIHt ^ RIt^ RIHtHt ^ RIt^ RIHtHt ^ RIt^ RIt^ RIHtHtHtHtH t H!t!H"t"H#t# ^ RI$HtH%t%H&t&H't'H(t(H)t)H*t*H+t+H,t, ^ RI-H.t.H/t/ ^ R	I0H1t1H2t2H3t3H4t4H5t5H6t6 ^ R
I7H8t8 ^ RI9H:t: ^ RI;H<t<H=t=H>t>H?t?H@t@HAtAHBtB ^ RICHDtE ^ RIFHGtGHHtH ^ RIIHJtJHKtK ^ RILHMtM ^ RINHOtOHPtPHQtQHRtRHStSHTtTHUtUHVtVHWtWHXtXHYtYHZtZH[t[H\t\ ^ RI]H^t^ ^ RI_H`t` ^ RI$Hata ^ RIbtb^ RIctc]U ! R R]O4      4       td]cP                  ! ]P                  ! 4       RQ9  R4      tg^th^ti]! RRR4      tjR tk][ ! R R]O4      4       tlR tmR tnR toR tpR  tqR! trR" tsR# ttR$ tuR% tvR& twRSR' ltxR( ty ! R) R*]z4      t{]U ! R+ R,]l4      4       t|]U ! R- R.]l4      4       t}]U ! R/ R0]l4      4       t~ ! R1 R2]O4      t]U ! R3 R4]l4      4       t]U ! R5 R6]Q]l4      4       t]U ! R7 R8]l4      4       t]U ! R9 R:]l4      4       t]U ! R; R<]l4      4       t]U ! R= R>]l4      4       t]U ! R? R@]l4      4       t ! RA RB]l4      t]U ! RC RD]4      4       t]^RE 4       t]U ! RF RG]4      4       t]U ! RH RI]O4      4       t]U]g ! RJ RK]4      4       4       t]U ! RL RM]O4      4       t]U ! RN RO]O4      4       t]RP8X  d   ]cEP                   ! 4        R# R# )T    Nreducerandn)defaultdict
namedtuple)cyclechain)njitprangeparallel_chunksizeget_parallel_chunksizeset_parallel_chunksizeset_num_threadsget_num_threadstypeof)	typeserrorsirrewritestyped_passesinline_closurecallconfigcompilercpu)DictList)overload_methodregister_modeltypeof_implunboxNativeValuemodels)
cpu_target)type_annotations)find_callnameguardbuild_definitionsget_definition
is_getitem
is_setitemindex_var_of_get_setitem)empty_inferred)CompilerBaseDefaultPassBuilder)register_passAnalysisPass)IRLegalization)TestCasecaptured_stdoutMemoryLeakMixinoverride_env_config
linux_onlytagskip_parfors_unsupported_32bit
needs_blasneeds_lapackdisabled_testskip_unless_scipyneeds_subprocessskip_ppc64le_invalid_ctr_loop)register_jitable)_fix_LOAD_GLOBAL_arg)utilsc                      a  ] tR t^Ct o Rt]P                  ! 4       R8w  d   RMRt R tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tRtV tR# )TestParforsRunnerFaarch64i  i  c                    V P                   pV P                  4       P                  R 4      R,          P                  R4      R,          pV P                  VVV P                  R7       R# )._)test_module
test_classtimeoutN)
__module__idsplitsubprocess_test_runner_TIMEOUT)selfthemodtest_clazz_names   &  V/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/tests/test_parfors.pyrunnerTestParforsRunner.runnerQ   sS    '')//#.r288=bA##/>,0MM 	$ 	;    c                &    V P                  4        R # NrW   rS   s   &rV   test_TestParforBasic&TestParforsRunner.test_TestParforBasicY       rY   c                &    V P                  4        R # r[   r\   r]   s   &rV   test_TestParforNumericalMisc.TestParforsRunner.test_TestParforNumericalMisc\   r`   rY   c                &    V P                  4        R # r[   r\   r]   s   &rV   test_TestParforNumPy&TestParforsRunner.test_TestParforNumPy_   r`   rY   c                &    V P                  4        R # r[   r\   r]   s   &rV   test_TestParfors"TestParforsRunner.test_TestParforsb   r`   rY   c                &    V P                  4        R # r[   r\   r]   s   &rV   test_TestParforsBitMask)TestParforsRunner.test_TestParforsBitMaske   r`   rY   c                &    V P                  4        R # r[   r\   r]   s   &rV   test_TestParforsDiagnostics-TestParforsRunner.test_TestParforsDiagnosticsh   r`   rY   c                &    V P                  4        R # r[   r\   r]   s   &rV   test_TestParforsLeaks'TestParforsRunner.test_TestParforsLeaksk   r`   rY   c                &    V P                  4        R # r[   r\   r]   s   &rV   test_TestParforsMisc&TestParforsRunner.test_TestParforsMiscn   r`   rY   c                &    V P                  4        R # r[   r\   r]   s   &rV   test_TestParforsOptions)TestParforsRunner.test_TestParforsOptionsq   r`   rY   c                &    V P                  4        R # r[   r\   r]   s   &rV   test_TestParforsSlice'TestParforsRunner.test_TestParforsSlicet   r`   rY   c                &    V P                  4        R # r[   r\   r]   s   &rV   test_TestParforsVectorizer,TestParforsRunner.test_TestParforsVectorizerw   r`   rY   c                &    V P                  4        R # r[   r\   r]   s   &rV   test_TestPrangeBasic&TestParforsRunner.test_TestPrangeBasicz   r`   rY   c                &    V P                  4        R # r[   r\   r]   s   &rV   test_TestPrangeSpecific)TestParforsRunner.test_TestPrangeSpecific}   r`   rY    N)__name__rN   __qualname____firstlineno___numba_parallel_test_platformmachinerR   rW   r^   rb   re   rh   rk   rn   rq   rt   rw   rz   r}   r   r   __static_attributes____classdictcell____classdict__s   @rV   rE   rE   C   sv      "  '')Y6tDH
; rY   rE   zx86 only testTestNamedTuplec                    R# )z
Used with check_arq_equality to indicate that we do not care
whether the value of the parameter at the end of the function
has a particular value.
Nr   abs   &&rV   null_comparerr      s     	rY   c                      a  ] tR t^t o RtRtR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tRR ltRR ltR tR tR tR tRtV tR# )TestParforsBasez
Base class for testing parfors.
Provides functions for compilation and three way comparison between
python functions, njit'd functions and parfor njit'd functions.
Fc                H    \        V3/ VB ! V4      P                  V,          # r[   )r   	overloads)rS   funcsigflagss   &&&,rV   _compile_thisTestParforsBase._compile_this   s$     C!5!$'11#66rY   c                (    V P                  WR R7      # )Tparallelr   rS   r   r   s   &&&rV   compile_parallel TestParforsBase.compile_parallel   s    !!$d!;;rY   c                *    V P                  WR R R7      # )T)r   fastmathr   r   s   &&&rV   compile_parallel_fastmath)TestParforsBase.compile_parallel_fastmath   s    !!$dT!JJrY   c                $    V P                  W4      # r[   r   r   s   &&&rV   compile_njitTestParforsBase.compile_njit   s    !!$,,rY   c                    \        V Uu. uF  p\        P                  ! V4      NK  	  up4      pV P                  W4      pV P	                  W4      pWv3# u upi r[   )tuplenumbar   r   r   )rS   pyfuncargskwargsxr   cpfunccfuncs   &&*,    rV   compile_allTestParforsBase.compile_all   sT    d3dU\\!_d34 &&v3 !!&.} 4s   Ac                B   VP                  RR4      pVP                  RR4      pVP                  RR4      pVP                  RR4      p	VP                  RR4      p
R pV! V!  pV! V!  pV! V!  pVP                  ! V!  pV! V!  pVP                  ! V!  pV
fi   \        P                  P                  ! W3/ VB  \        P                  P                  ! VV3/ VB  V P                  \        V4      \        V4      4       MH\        V4      \        V
4      8X  g   Q h\        WVV
4       F  w  ppppV! VV3/ VB  V! VV3/ VB  K  	  V	'       d   V P                  W64       Ve9   VP                  ! V! V!  !  p\        P                  P                  ! VV3/ VB  R# R# )	aM  
Checks python, njit and parfor impls produce the same result.

Arguments:
    pyfunc - the python function to test
    cfunc - CompilerResult from njit of pyfunc
    cpfunc - CompilerResult from njit(parallel=True) of pyfunc
    args - arguments for the function being tested
Keyword Arguments:
    scheduler_type - 'signed', 'unsigned' or None, default is None.
                   Supply in cases where the presence of a specific
                   scheduler is to be asserted.
    fastmath_pcres - a fastmath parallel compile result, if supplied
                     will be run to make sure the result is correct
    check_arg_equality - some functions need to check that a
                         parameter is modified rather than a certain
                         value returned.  If this keyword argument
                         is supplied, it should be a list of
                         comparison functions such that the i'th
                         function in the list is used to compare the
                         i'th parameter of the njit and parallel=True
                         functions against the i'th parameter of the
                         standard Python function, asserting if they
                         differ.  The length of this list must be equal
                         to the number of parameters to the function.
                         The null comparator is available for use
                         when you do not desire to test if some
                         particular parameter is changed.
    Remaining kwargs are passed to np.testing.assert_almost_equal
scheduler_typeNcheck_fastmathfastmath_pcrescheck_schedulingTcheck_arg_equalityc                     V '       g   \        4       # . pV  EF  p\        V\        P                  4      '       d#   VP	                  VP                  R 4      4       KF  \        V\        P                  4      '       d"   VP	                  VP                  4       4       K  \        V\        P                  4      '       d   VP	                  V4       K  Vf   VP	                  V4       K  \        V\         4      '       d)   VP	                  \
        P                  ! V4      4       EK  \        V\        4      '       d   VP	                  VR,          4       EK@  \        V\        4      '       d)   VP	                  \
        P
                  ! V4      4       EK~  \        V\        4      '       d)   VP	                  \
        P
                  ! V4      4       EK  \        R4      h	  \        V4      # )kNNNz%Unsupported argument type encountered)r   
isinstancenpndarrayappendcopynumbernumbersNumberdeepcopylistr   r   
ValueError)r   new_argsr   s   *  rV   	copy_args:TestParforsBase.check_parfors_vs_others.<locals>.copy_args   s*   wHa,,OOAFF3K0299--OOAFFH-7>>22OOA&YOOA&5))OODMM!$454((OOAaD)4((OODIIaL14((OODIIaL1$%LMM% & ?"rY   )
popentry_pointr   testingassert_almost_equalassertEqualtypelenzipr   )rS   r   r   r   r   r   r   r   r   r   check_args_for_equalityr   py_argspy_expected	njit_argsnjit_outputparfor_argsparfor_outputpyargnjitarg	parforargargcompparfor_fastmath_outputs   &&&&*,                 rV   check_parfors_vs_others'TestParforsBase.check_parfors_vs_others   s   >  $4d;$4d;$4d;!::&8$?"(**-A4"H	#4 T"g& t$	''3  &**K8"*JJ**;NvNJJ**=+PPT+.]0CDw<3'>#??@?69K1H7J2w	71&1	53F37J
 !!&9 %%3%?%?DAQ%R"JJ**+A; 5-35 &rY   c                `    V P                   ! V.VO5!  w  rEV P                  ! WV.VO5/ VB  R# )zChecks that pyfunc compiles for *args under parallel=True and njit
and asserts that all version execute and produce the same resultNr   r   rS   r   r   r   r   r   s   &&*,  rV   checkTestParforsBase.check  s5     ((7$7$$VFLTLVLrY   c           	         V! 4        FR  pV P                  \        \        \        V4      4      4      ;_uu_ 4        V P                  ! V.VO5/ VB  RRR4       KT  	  R#   + '       g   i     Ki  ; i)zHRun self.check(impl, ...) on array data generated from arg_gen.
        N)subTestr   mapr   r   )rS   implarg_genr   r   s   &&&, rV   check_variantsTestParforsBase.check_variants  sS     IDd3vt#4566

41$1&1 76 666s   A  A1c           	     $   V! 4        Fp  pV P                  \        \        \        V4      4      4      ;_uu_ 4        \	        \        \        V4      4      pV P                  \        W4      ^4       RRR4       Kr  	  R#   + '       g   i     K  ; i)zHRun self.countParfors(impl, ...) on array types generated from
arg_gen.
N)r   r   r   r   r   assertGreaterEqualcountParfors)rS   r   r   r   r   argtyss   &&&,  rV   count_parfors_variants&TestParforsBase.count_parfors_variants   sc     IDd3vt#4566s6401''T(BAF 76 666s   5A>>Bc                    R pVe,   VR9   d   VRV,           ,          pMRp\        WB,          4      hV P                  W1P                  P                  4       4       R# )z@do_schedulingNrI   z$Unknown scheduler_type specified: %s)signedunsigned)r   assertInlibraryget_llvm_str)rS   cresr   scheduler_strmsgs   &&&  rV   r    TestParforsBase.check_scheduling*  sQ    (%!77~!55< !566m\\%>%>%@ArY   c                   a V3R lp\        V! 4       4      p\        V4       Uu. uF  p\        V4      NK  	  up# u upi )zFMake *ct* sample 1D arrays of length *n* using np.linspace().
        c               3      <"   \         P                  ! ^ ^S 4      x  \         P                  ! ^^S 4      x  \         P                  ! ^^S 4      x  R# 5ir   Nr   linspacens   rV   gen)TestParforsBase.gen_linspace.<locals>.gen9  s?     ++aA&&++aA&&++aA&&s   AA)r	   rangenext)rS   r  ctr  srcis   &f&   rV   gen_linspaceTestParforsBase.gen_linspace6  s5    	'
 CEl#(9-9aS	9---s   <c              #    "   V P                  ^
VR7      x  V P                  ^VR7       Uu. uF  pVP                  R4      NK  	  ppVx  V Uu. uF  p\        P                  ! V4      NK  	  upx  V P                  ^VR7       Uu. uF  pVP                  R4      NK  	  ppVx  V Uu. uF  p\        P                  ! V4      NK  	  upx  R# u upi u upi u upi u upi 5i)z?Make 1D, 2D, 3D variants of the data in C and F orders
        )r  )r  r  N      )r  r     )r  reshaper   asfortranarray)rS   r  r   arr2dsarr3dss   &&   rV   gen_linspace_variants%TestParforsBase.gen_linspace_variantsA  s      r**  ,,u,<><a ))F#< 	 >-34Vr  #V44  ,,yR,@B@a ))I&@ 	 B-34Vr  #V44> 5B 5s4   +C(C
C(C0C(
C$
C(.C#C(Nc                    V Uu. uF  qBVP                   9   g   K  VNK  	  ppVe   V F  pV\        V4      9   d   K  Q h	  V# u upi )z-helper function to filter out modules by name)namestr)rS   modmagicstrcheckstrr   filts   &&&&  rV   _filter_modTestParforsBase._filter_modU  sM    53aaff"4353q6))) 	 6s
   AAc                L   VP                   P                  P                  P                  P                   Uu. uF  qDNK  	  ppV P                  WRVR7      pVP                   P                  4       p. pV F'  p	V	P                  V9   g   K  VP                  V	4       K)  	  V# u upi )zgets the gufunc LLVM Modules)r!  )	r   _codegen_engine_ee_modulesr#  get_asm_strr  r   )
rS   r   r   r!  r   r)  potential_matcheslib_asmretr  s
   &&&&      rV   _get_gufunc_modules#TestParforsBase._get_gufunc_modules]  s    #||44<<@@IIJI!AIJ !,,X6> - @ ,,**,$Cxx7"

3 % 
 Ks   
B!c                z    RpV P                  W4      p\        4       pV F  pV! V4      WVP                  &   K  	  V# )z#helper for gufunc IR/asm generation__numba_parfor_gufunc)r.  dictr  )rS   r   fnr   gufunc_modsr   r  s   &&&    rV   _get_gufunc_info TestParforsBase._get_gufunc_infol  s>     +..t>FCS'AhhK rY   c                .    V P                  V\        4      # )z
Returns the IR of the gufuncs used as parfor kernels
as a dict mapping the gufunc name to its IR.

Arguments:
 cres - a CompileResult from `njit(parallel=True, ...)`
)r5  r  )rS   r   s   &&rV   _get_gufunc_irTestParforsBase._get_gufunc_irv  s     $$T3//rY   c                r   a VP                   P                  P                  oV3R lpV P                  W4      # )z
Returns the assembly of the gufuncs used as parfor kernels
as a dict mapping the gufunc name to its assembly.

Arguments:
 cres - a CompileResult from `njit(parallel=True, ...)`
c                 8   < \        SP                  V 4      4      # r[   )r  emit_assembly)r  tms   &rV   emit_asm1TestParforsBase._get_gufunc_asm.<locals>.emit_asm  s    r'',--rY   )r   r&  _tmr5  )rS   r   r>  r=  s   && @rV   _get_gufunc_asmTestParforsBase._get_gufunc_asm  s0     \\""&&	.$$T44rY   c                   a  S P                  W4      pS P                  V4      pR pV 3R lpVP                  4        F  w  rxV! V4      p	V! V	4       K  	  R# )aP  
Asserts that the fastmath flag has some effect in that suitable
instructions are now labelled as `fast`. Whether LLVM can actually do
anything to optimise better now the derestrictions are supplied is
another matter!

Arguments:
 pyfunc - a function that contains operations with parallel semantics
 sig - the type signature of pyfunc
c                     V P                   ! 4       p. pV F1  p\        P                  ! R V4      pVf   K   VP                  V4       K3  	  V# )z\bfast\b)
splitlinesresearchr   )r   splitted	fast_instr   ms   &    rV   _get_fast_instructions?TestParforsBase.assert_fastmath.<locals>._get_fast_instructions  sG    }}HIIIk1-=$$Q'  rY   c                    < RpV  F<  p^ pV F  pVR,           pWR9   g   K  V^,          pK  	  SP                  V^ 8  4       K>  	  R# )faddz fastN)rN  fsubfmulfdivfremfcmpcall)
assertTrue)instrsopsinstcountopmatchrS   s   &     rV   _assert_fast5TestParforsBase.assert_fastmath.<locals>._assert_fast  sJ    JCBLE}
  	* rY   N)r   r8  items)
rS   r   r   r   _irrK  r\  r  guirrX  s
   f&&       rV   assert_fastmathTestParforsBase.assert_fastmath  sU     --f:!!$'		+ ))+JD)$/D &rY   r   r[   )r   rN   r   r   __doc__r   r   r   r   r   r   r   r   r   r   r   r  r  r#  r.  r5  r8  rA  ra  r   r   r   s   @rV   r   r      sw      "7
<K-	\5|M2G
B	.5(05$ $rY   r   c                    \         P                  ! W,          4      pR V,          V,          pV\         P                  ! V4      ,          pW&,           V,          V,           V,          pW,
          p	R RV,          ,           p
R RV	,          ,           pV\         P                  ! V) V,          4      ,          pW,          pW
,          V,
          pW,
          V ,           pV# )      ?      ?)r   logsqrtexp)sptpricestrikerate
volatilitytimevlogtermpowtermdend1d2NofXd1NofXd2futureValuec1rT  puts   &&&&&           rV   blackscholes_implry    s    ffX&'GJ+G
rwwu~
%CNe#w
.#	5B	B9r>!F9r>!F266D&5.11K		Br!D

x
'CJrY   c                     \        V4       Fm  pV\        P                  ! R R \        P                  ! V ) \        P                  ! W4      ,          4      ,           ,          R ,
          V ,          V4      ,          pKo  	  V# rf  )r
  r   dotri  )YXw
iterationsr  s   &&&& rV   lr_implr    sW    :	RVVcS2661"rvva|*;#<<=CqH1MM HrY   c                 :   TpV P                   w  rV\        V4       EF_  p\        P                  ! \        V4       UU	u. uFd  p\        V4       U	u. uFK  p	\        P
                  ! \        P                  ! WR 3,          WIR 3,          ,
          ^,          4      4      NKM  	  up	NKf  	  up	p4      p
\        P                  ! \        V4       Uu. uF  qVR 3,          P                  4       NK  	  up4      p\        P                  ! \        V4       UU	u. uFZ  p\        V4       U	u. uFA  p	\        P                  ! WV8H  V	3,          4      \        P                  ! W8H  4      ,          NKC  	  up	NK\  	  up	p4      pEKb  	  V# u up	i u up	pi u upi u up	i u up	pi r   )shaper
  r   arraymathrh  sumargmin)A	numCenternumIterinit_centroids	centroidsNDlr  jdistlabelss   &&&&        rV   example_kmeans_testr    sS   I77DA7^xxDI!HNDLqy)9;)9A ))BFFAcF9qS>,AA+E$FG)9;DLN OuQx@x!!9++-x@AHH=B9=MO=M%(4*2Q  "vva	1o6rvvfi7HHH*24=MO P	  ; N@4 Os7   FAF!F!F
F%AF,FFFc                    \         P                  p\         P                  p\        P                  ! V 4      pV'       d   \
        P                  ! V4      pM\
        P                  ! R 4      p\        W4W4      pVP                  4        VP                  4        \        P                  ! VP                  P                  VR R7      pVP                  4        \        P                  P!                  RVP                  4       \"        P$                  ! VP                  P&                  VP                  P(                  VP                  P                  VP                  P*                  R4      w  VP                  n        VP                  n        VP                  n        p	\2        P4                  ! VP                  P                  VP                  P,                  VP                  P0                  RRVP                  P*                  VP                  P.                  \6        P8                  R7       \:        P<                  P>                  PA                  4       p
\:        P<                  P>                  PC                  VP                  P                  VP                  P,                  VP                  P0                  VP                  P&                  VP                  P(                  VV
PD                  R7      pVP                  4        \        P                  P!                  RVP                  4       \        PF                  ! 4       p\:        P<                  P>                  PI                  VP                  P                  VP                  P,                  VP                  P0                  VP                  P.                  VP                  P&                  VP                  P(                  WlVP                  PJ                  V
R7
      pVP                  4        \:        P<                  P>                  PM                  VP                  P                  VP                  P,                  VP                  P0                  VP                  P.                  VP                  P&                  VP                  P(                  WlVP                  PJ                  V
R7
      pVP                  4        \:        P<                  P>                  PO                  VP                  P                  VP                  P,                  VP                  P0                  VP                  P.                  VP                  P&                  VP                  P(                  WlVP                  PJ                  V
R7
      pVP                  4        \Q        VPR                  4      Vn*        WW3# )	T)typedzbefore-inferenceN)func_irtypemap	calltypesliftedlifted_fromr   return_typehtml_output)swappedzafter-inference)diagnosticsr   )+r$   typing_contexttarget_contextr   run_frontendr   ParallelOptionsTestPipelinerefreshr   InlineClosureCallPassstater  runr   rewrite_registryapplyr   type_inference_stage	typingctx	targetctxr   r  r  r  r%   TypeAnnotationr   HTMLr   parforsparforParforDiagnosticsPreParforPassreplaced_fnsFlags
ParforPassmetadataParforFusionPassParforPreLoweringPassr(   blocks_definitions)	test_funcr   kwsr  r  test_iroptionstpinline_passrI   r  preparfor_passr   parfor_passs   &&,           rV   get_optimized_numba_irr    s   ))I))I##I.G
%%c*%%d+	iD	:B$::288;K;K<CBFHK OO##$6A %%bhh&8&8
BHH,,bhhmmTC BBHHbhh*BHH,> ##    (($$XX]]HH((KK! --&&88:K]]))77
"((**BHH,>,>
BHH..(( 8 *N ##$5rxx@NNE--&&11
"((**BHH,>,>
bhh00"((2D2D)){ 2 DK OO--&&77
"((**BHH,>,>
bhh00"((2D2D)){ 8 DK OO--&&<<
"((**BHH,>,>
bhh00"((2D2D)){ = DK OO,W^^<G;rY   c                 &   \        W3/ VB w  r4^ pVP                  P                  4        Fb  w  rg\        VP                  4       FD  w  r\        V	\        P                  P                  P                  4      '       g   K;  V^,          pKF  	  Kd  	  V# r   )
r  r  r^  	enumeratebodyr   r   r  r  Parfor)
r  r   r  r  r  	ret_countlabelblockr  rX  s
   &&,       rV   r   r     st    (@C@KGI,,. ,GA$ 4 4 ; ;<<Q	 - /
 rY   c                 r    \        W3/ VB w  r4\        VP                  VP                  P                  4      # r[   )r  _count_arrays_innerr  r  r  r  r   r  r  r  s   &&,  rV   countArraysr  %  s.    (@C@KGw~~rxx/?/?@@rY   c                 d   \        W3/ VB w  r4VP                  p^ pVP                  4        F  w  rx\        VP                  4       Fa  w  r\        V
\        P                  P                  P                  4      '       g   K;  V\        V
P                  P                  4      ,          pKc  	  K  	  V# r  )r  r  r^  r  r  r   r   r  r  r  r   
init_block)r  r   r  r  r  r  r  r  r  r  rX  s   &&,        rV   get_init_block_sizer  )  s    (@C@KG^^FI ,GA$ 4 4 ; ;<<S!5!566	 - '
 rY   c                    ^ p\        4       pV P                  4        EF  w  rE\        VP                  4       F  w  rg\	        V\
        P                  P                  P                  4      '       d<   VP                  P                  4       pVP                  V^ &   V\        W4      ,          p\	        V\        P                  4      '       g   K  \	        WP                  P                   ,          \"        P$                  4      '       g   K  VP'                  VP                  P                   4       K  	  EK  	  V\)        V4      ,          pV# r  )setr^  r  r  r   r   r  r  r  	loop_bodyr   r  r  r   Assigntargetr  r   ArrayCompatibleaddr   )	r  r  r  arr_setr  r  r  rX  parfor_blockss	   &&       rV   r  r  6  s    IeG ,GA$ 4 4 ; ;<< $ 3 3 5#'??a 0HH	4++"7;;+;+;#<$)$9$9; ;DKK,,- - ' WIrY   c                     \        W3/ VB w  r4^ pVP                  P                  4        F  pV\        W64      ,          pK  	  V# r  )r  r  values_count_array_allocs_inner)r  r   r  r  r  r  r  s   &&,    rV   countArrayAllocsr  H  sG    (@C@KGI&&(.w>>	 ) rY   c                    ^ pVP                    EF<  p\        V\        P                  P                  P
                  4      '       dP   V\        WP                  4      ,          pVP                  P                  4        F  pV\        W4      ,          pK  	  \        V\        P                  4      '       g   K  \        VP                  \        P                  4      '       g   K  VP                  P                  R8X  g   K  \        \         WP                  4      R8X  g#   \        \         WP                  4      R8X  g   EK3  V^,          pEK?  	  V# )r   rT  )emptynumpy)r-   znumba.np.unsafe.ndarray)r  r   r   r  r  r  r  r  r  r  r   r  valueExprrZ  r'   r&   )r  r  r  rX  r   s   &&   rV   r  r  Q  s    I

dEMM00778827OOLLI^^**,6wBB	 - tRYY''Jtzz277,K,KJJMMV+='::>BTT<DENI  rY   c                 r    \        W3/ VB w  r4\        W3P                  VP                  P                  4      # r[   )r  &_count_non_parfor_array_accesses_innerr  r  r  r  s   &&,  rV   countNonParforArrayAccessesr  b  s5    (@C@KG1'>>24((2B2BD DrY   c           	         ^ pVf   \        4       pVP                  4        EF5  w  rVVP                   EF  p\        V\        P
                  P                  P                  4      '       dd   VP                  VP                  P                  4       VP                  P                  4       pVP                  V^ &   V\        WW#4      ,          pK  \        V4      '       dm   \        W'P                   P                   P                  ,          \"        P$                  4      '       d)   \'        V \)        V4      V4      '       g   V^,          pEK  \+        V4      '       dc   \        W'P,                  P                  ,          \"        P$                  4      '       d)   \'        V \)        V4      V4      '       g   V^,          pEK  \        V\.        P0                  4      '       g   EK  \        VP                   \.        P2                  4      '       g   EK  VP                   P                  V9   g   EK  VP                  VP,                  P                  4       EK!  	  EK8  	  V# r  )r  r^  r  r   r   r  r  r  r  	index_varr  r  r   r  r  r*   r  r   r  _uses_indicesr,   r+   r  r   r  Var)	f_irr  r  parfor_indicesr  r  r  stmtr  s	   &&&&     rV   r  r  g  s   IJJD$ 4 4 ; ;<<""4>>#6#67 $ 3 3 5#'??a CB B	 T""z'**:J:J:O:O2P--(/ (/7D6t<n8N 8NQ	 T""z'++:J:J2K))(+ (+3@248.4J 4JQ	 T299--TZZ00**//^3""4;;#3#341  '6 rY   c                    VP                   V9   d   R # \        \        W4      p\        V\        P
                  4      '       dB   VP                  R8X  d1   \        R VP                   4       4      p\        WB,          4      ^ 8g  # R# )Tbuild_tuplec              3   8   "   T F  qP                   x  K  	  R # 5ir[   )r  ).0vs   & rV   	<genexpr> _uses_indices.<locals>.<genexpr>  s     5}!vv}s   F)
r  r'   r)   r   r   r  rZ  r  r^  r   )r  index	index_setind_defvarnamess   &&&  rV   r  r    sc    zzYND0G'277##

m(C5w}}558'(A--rY   c                   &   a  ] tR tRt o R tRtV tR# )r  i  c                B   \         P                  ! 4       V n        WP                  n        W P                  n        W0P                  n        W@P                  n        R V P                  n        R V P                  n        R V P                  n	        / V P                  n
        R # r[   )r   	StateDictr  r  r  r   r  r  r  r  r  )rS   r  r  r   r  s   &&&&&rV   __init__TestPipeline.__init__  si    '')
(

(



$

!

!%

#

 

rY   )r  N)r   rN   r   r   r  r   r   r   s   @rV   r  r    s     	! 	!rY   r  c                     a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR tR tR t]R 4       t]R 4       t]R 4       t]R 4       tR tR tR t]R 4       t]R 4       t ]R 4       t!R t"Rt#V t$R# ) TestParforBasici  zVSmoke tests for the parfors transforms. These tests check the most basic
functionalityc                   \         P                  ! V .VO5!   \        P                  ! \        P                  ! R 4      R4      p\        P                  ! R4      \        P                  ! R4      W"P
                  .V n        R# )      (@      @      @Nr  r  )r   r  r   r  arangeTsimple_args)rS   r   rJ  s   &* rV   r  TestParforBasic.__init__  sP      --JJryy~v.IIbM299R=!SSArY   c                    R  pV P                  \        4      ;_uu_ 4       pV P                  V4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)c                  .    \         P                  ! R4      # )Nr   r   onesr   rY   rV   	test_impl0TestParforBasic.test_simple01.<locals>.test_impl  s    772;rY   N'@do_scheduling' not foundassertRaisesAssertionErrorr   r   r  	exceptionrS   r  raisess   &  rV   test_simple01TestParforBasic.test_simple01  sN    	~..&JJy! /4c&:J:J6KL /.   A""A2	c                .    R  pV P                  V4       R# )c                  .    \         P                  ! R4      # )   r  r  r   rY   rV   r  0TestParforBasic.test_simple02.<locals>.test_impl  s    774= rY   Nr   rS   r  s   & rV   test_simple02TestParforBasic.test_simple02  s    	!

9rY   c                .    R  pV P                  V4       R# )c                  .    \         P                  ! R4      # r  r  r  r  r   rY   rV   r  0TestParforBasic.test_simple03.<locals>.test_impl      776?"rY   Nr   r!  s   & rV   test_simple03TestParforBasic.test_simple03      	#

9rY   c                .    R  pV P                  V4       R# )c                  .    \         P                  ! ^4      # r  r  r   rY   rV   r  0TestParforBasic.test_simple04.<locals>.test_impl  s    771:rY   Nr   r!  s   & rV   test_simple04TestParforBasic.test_simple04  s    	

9rY   c                .    R  pV P                  V4       R# )c                  N    \         P                  ! R\         P                  R7      # )r  dtyper'  r   r  
complex128r   rY   rV   r  0TestParforBasic.test_simple07.<locals>.test_impl  s    77677rY   Nr   r!  s   & rV   test_simple07TestParforBasic.test_simple07  s    	8

9rY   c                .    R  pV P                  V4       R# )c                  d    \         P                  ! R4      \         P                  ! R4      ,           # r&  r  r   rY   rV   r  0TestParforBasic.test_simple08.<locals>.test_impl  s    776?RWWV_44rY   Nr   r!  s   & rV   test_simple08TestParforBasic.test_simple08  s    	5

9rY   c                .    R  pV P                  V4       R# )c                  .    \         P                  ! R4      # )r  r  r  r  r   rY   rV   r  0TestParforBasic.test_simple09.<locals>.test_impl  r)  rY   Nr   r!  s   & rV   test_simple09TestParforBasic.test_simple09  r,  rY   c                .    R  pV P                  V4       R# )c                  .    \         P                  ! R4      # )r   r   r   r  r   rY   rV   r  0TestParforBasic.test_simple10.<locals>.test_impl  r)  rY   Nr   r!  s   & rV   test_simple10TestParforBasic.test_simple10  r,  rY   c                .    R  pV P                  V4       R# )c                  <    \         P                  ! R4      R,           # 
   rf  rO  rO  r  r   rY   rV   r  0TestParforBasic.test_simple11.<locals>.test_impl  s    778$r))rY   Nr   r!  s   & rV   test_simple11TestParforBasic.test_simple11  s    	*

9rY   c                .    R  pV P                  V4       R# )c                  d    \         P                  ! R4      \         P                  ! R4      ,           # rN  r6  r   rY   rV   r  0TestParforBasic.test_simple12.<locals>.test_impl  s    778$r}}R'888rY   Nr   r!  s   & rV   test_simple12TestParforBasic.test_simple12  s    	9

9rY   c                    R  pV P                  \        4      ;_uu_ 4       pV P                  V4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)c                  .    \         P                  ! R 4      # r{  )r   r7  r   rY   rV   r  0TestParforBasic.test_simple13.<locals>.test_impl  s    ==$$rY   Nr  r  r  s   &  rV   test_simple13TestParforBasic.test_simple13  sN    	%~..&JJy! /4c&:J:J6KL /.r  c                .    R  pV P                  V4       R# )c                  <    \         P                  ! R4      R,          # )rO  :r   N   rP  r  r   rY   rV   r  0TestParforBasic.test_simple14.<locals>.test_impl  s    778$U++rY   Nr   r!  s   & rV   test_simple14TestParforBasic.test_simple14  s    	,

9rY   c                H    R  pV P                   ! V.V P                  O5!   R# )c                     W ,           # r[   r   v1v2m1m2s   &&&&rV   r  0TestParforBasic.test_simple15.<locals>.test_impl  	    7NrY   Nr   r	  r!  s   & rV   test_simple15TestParforBasic.test_simple15      	

90t//0rY   c                H    R  pV P                   ! V.V P                  O5!   R# )c                     W",           # r[   r   rf  s   &&&&rV   r  0TestParforBasic.test_simple16.<locals>.test_impl  rl  rY   Nrm  r!  s   & rV   test_simple16TestParforBasic.test_simple16  rp  rY   c                H    R  pV P                   ! V.V P                  O5!   R# )c                     W0,           # r[   r   rf  s   &&&&rV   r  0TestParforBasic.test_simple17.<locals>.test_impl  rl  rY   Nrm  r!  s   & rV   test_simple17TestParforBasic.test_simple17  rp  rY   c                H    R  pV P                   ! V.V P                  O5!   R# )c                 p    VP                   \        P                  P                  V4      ^,          ,           # r  )r  r   linalgsvdrf  s   &&&&rV   r  0TestParforBasic.test_simple18.<locals>.test_impl  s#    44"))--+A...rY   Nrm  r!  s   & rV   test_simple18TestParforBasic.test_simple18  s    	/

90t//0rY   c                H    R  pV P                   ! V.V P                  O5!   R# )c                 .    \         P                  ! W!4      # r[   r   r|  rf  s   &&&&rV   r  0TestParforBasic.test_simple19.<locals>.test_impl      66">!rY   Nrm  r!  s   & rV   test_simple19TestParforBasic.test_simple19      	"

90t//0rY   c                   R  pV P                  \        4      ;_uu_ 4       pV P                  ! V.V P                  O5!   RRR4       V P	                  R\        XP                  4      4       R#   + '       g   i     L7; i)c                 .    \         P                  ! W#4      # r[   r  rf  s   &&&&rV   r  0TestParforBasic.test_simple20.<locals>.test_impl
  r  rY   Nr  )r  r  r   r	  r   r  r  r  s   &  rV   test_simple20TestParforBasic.test_simple20  s[    	" ~..&JJy44#3#34 /4c&:J:J6KL /.s   A//A?	c                H    R  pV P                   ! V.V P                  O5!   R# )c                 .    \         P                  ! W 4      # r[   r  rf  s   &&&&rV   r  0TestParforBasic.test_simple21.<locals>.test_impl  r  rY   Nrm  r!  s   & rV   test_simple21TestParforBasic.test_simple21  r  rY   c                H    R  pV P                   ! V.V P                  O5!   R# )c                 :    \         P                  ! W ,           4      # r[   r   r  rf  s   &&&&rV   r  0TestParforBasic.test_simple22.<locals>.test_impl  s    66"'?"rY   Nrm  r!  s   & rV   test_simple22TestParforBasic.test_simple22  s    	#

90t//0rY   c                H    R  pV P                   ! V.V P                  O5!   R# )c                     ^V ,          p^V ,          p^\         P                  ! V^,          V^,          ,           ^8  4      ,          ^
,          # r  r  )rg  rh  ri  rj  r   ys   &&&&  rV   r  0TestParforBasic.test_simple23.<locals>.test_impl  s=    BABArvvadQTkAo..33rY   Nrm  r!  s   & rV   test_simple23TestParforBasic.test_simple23  s     	4 	

90t//0rY   c                .    R  pV P                  V4       R# )c                      ^p \         P                  ! W 34      p\         P                  ! V 4      p\         P                  ! VRV3,          4      # )r`  r   )r   r  r  r  )r  r  r   s      rV   r  0TestParforBasic.test_simple24.<locals>.test_impl$  s9    AA		!A66!AqD'?"rY   Nr   r!  s   & rV   test_simple24TestParforBasic.test_simple24#  s    	#
 	

9rY   c                H    R pV P                   ! V.V P                  O5!   R# )zAsame as corresponding test_simple_<n> case but using operator.addc                 .    \         P                  ! W 4      # r[   operatorr  rf  s   &&&&rV   r  :TestParforBasic.test_simple_operator_15.<locals>.test_impl.      <<''rY   Nrm  r!  s   & rV   test_simple_operator_15'TestParforBasic.test_simple_operator_15+  s     	( 	

90t//0rY   c                H    R  pV P                   ! V.V P                  O5!   R# )c                 .    \         P                  ! W"4      # r[   r  rf  s   &&&&rV   r  :TestParforBasic.test_simple_operator_16.<locals>.test_impl5  r  rY   Nrm  r!  s   & rV   test_simple_operator_16'TestParforBasic.test_simple_operator_163       	( 	

90t//0rY   c                H    R  pV P                   ! V.V P                  O5!   R# )c                 .    \         P                  ! W04      # r[   r  rf  s   &&&&rV   r  :TestParforBasic.test_simple_operator_17.<locals>.test_impl<  r  rY   Nrm  r!  s   & rV   test_simple_operator_17'TestParforBasic.test_simple_operator_17:  r  rY   c                f    R  pR p\         P                  ! ^4      pV P                  WV.R7       R# )c                 "    V ^,          p ^V R&   R# )r  r   Nr   r   s   &rV   r  5TestParforBasic.test_inplace_alias.<locals>.test_implC  s    FAAaDrY   c                 D    \         P                  P                  W4       R # r[   r   r   assert_equalr   s   &&rV   comparer4TestParforBasic.test_inplace_alias.<locals>.comparerG      JJ##A)rY   r   Nr   r  r   )rS   r  r  r   s   &   rV   test_inplace_alias"TestParforBasic.test_inplace_aliasA  s-    		* GGAJ

9XJ
?rY   )r	  N)%r   rN   r   r   rc  r  r  r"  r*  r0  r9  r>  rD  rJ  rR  rW  r\  rb  rn  rt  ry  r<   r  r;   r  r  r  r  r  r  r=   r  r  r  r  r   r   r   s   @rV   r  r    s    BM








M
1
1
1
 1 1
 1 1
 M M 1 1
1
1 1 1 1 1 1 1
@ 
@rY   r  c                   F   a  ] tR tRt o RtR tR t]R 4       tR t	Rt
V tR# )	TestParforNumericalMisciN  z*Miscellaneous 'classical' numerical tests c                    R  pV P                  VR^R7       V P                  \        V\        P                  34      ^4       V P                  \        V\        P                  34      ^ 4       R# )c                 .   ^\         P                  P                  V 4      ,          ^,
          p^\         P                  P                  V 4      ,          ^,
          p^\         P                  ! V^,          V^,          ,           ^8  4      ,          V ,          # r  )r   randomranfr  )r  r   r  s   &  rV   r  2TestParforNumericalMisc.test_pi.<locals>.test_implS  sc    BIINN1%%)ABIINN1%%)ArvvadQTkAo..22rY   i decimalN)r   r   r   r   int64r  intpr!  s   & rV   test_piTestParforNumericalMisc.test_piR  sU    	3
 	

9fa
0i%++A1EY>BrY   c                    \         P                  R ,          3^,          pV P                  \        \        V4      ^4       R# )r   N)r   float64r   r   ry  rS   r   s   & rV   test_blackscholes)TestParforNumericalMisc.test_blackscholes\  s0    a #a'&7>BrY   c                ,   \         P                  R ,          \         P                  R,          \         P                  R ,          \         P                  3pV P                  \	        \
        V4      ^4       V P                  \        \
        V4      ^4       R# )r   Nr   r   )r   r  r  r   r   r  r  r  s   & rV   test_logistic_regression0TestParforNumericalMisc.test_logistic_regressiona  sa    a %--"4emmA6Fgt4a8)'48!<rY   c           	        \         P                  P                  ^ 4       Rp^
p^p\         P                  P                  W34      p\         P                  P                  W234      pV P	                  \
        WC^V^R7       \        P                  ! \        P                  ^R4      \        P                  \        P                  \        P                  ! \        P                  ^R4      3pV P                  \        \
        V4      ^ 4       R# )r      r  CN)r   r  seedr  r   r  r   Arrayr  r  r   r  )rS   r  r  centersr  r  arg_typss   &      rV   test_kmeans#TestParforNumericalMisc.test_kmeansh  s    
		qIINNA6"5

&A~LM 	 	O KKq#6

EJJKKq#68'(;XF	KrY   r   N)r   rN   r   r   rc  r  r  r;   r  r  r   r   r   s   @rV   r  r  N  s4     5CC
 = =K KrY   r  c                      a  ] tR tRt o Rt]R 4       tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )TestParforNumPyiy  z'Tests NumPy functionality under parforsc                    R  p\         P                  ! ^ ^^4      P                  ^^
4      p\         P                  ! ^^^
4      pV P                  WV4       R# )c                 .    \         P                  ! W4      # r[   r  r   r  s   &&rV   r  -TestParforNumPy.test_mvdot.<locals>.test_impl      66!<rY   N)r   r  r  r   )rS   r  r  r  s   &   rV   
test_mvdotTestParforNumPy.test_mvdot}  sH    	  KK1b!))!R0KK1b!

9#rY   c                n  a \         P                  \         P                  \         P                  \         P                  3 Fq  oV3R  lpV P                  VR4       V P                  \        V\        P                  34      ^4       V P                  \        V\        P                  34      ^ 4       Ks  	  R# )c                 p   < \         P                  ! V 4      pS! V4      pVP                  4       pW2,           # r[   r   r  r  )r  r  r  BrZ  s   &   rV   r  BTestParforNumPy.test_fuse_argmin_argmax_max_min.<locals>.test_impl  s+    GGAJqEEEGurY      N)r   r  argmaxminmaxr   r   r   r   r  r  r  )rS   r  rZ  s   & @rV   test_fuse_argmin_argmax_max_min/TestParforNumPy.test_fuse_argmin_argmax_max_min  su    99bii8B
 JJy#&\)ekk_EqI[UZZMBAF 9rY   c                b    R  pV P                  \        V\        P                  34      ^4       R# )c                 *    \        V 4      pV^ ,          # r  r   r  r  s   & rV   r  DTestParforNumPy.test_np_random_func_direct_import.<locals>.test_impl  s    aAQ4KrY   Nr   r   r   r  r!  s   & rV   !test_np_random_func_direct_import1TestParforNumPy.test_np_random_func_direct_import  s&    	 	i%++A1ErY   c                    R  pR pR p^^R\        ^^4      \        ^^4      3 F;  pV P                  W4       V P                  V^V4       V P                  V^V^4       K=  	  R# )c                 .    \         P                  ! V 4      # r[   r   r  r  s   &rV   
test_impl1/TestParforNumPy.test_arange.<locals>.test_impl1      99Q<rY   c                 .    \         P                  ! W4      # r[   r  sr  s   &&rV   
test_impl2/TestParforNumPy.test_arange.<locals>.test_impl2  s    99Q?"rY   c                 0    \         P                  ! WV4      # r[   r  r	  r  ts   &&&rV   
test_impl3/TestParforNumPy.test_arange.<locals>.test_impl3  s    99Q1%%rY         >@Ncomplexr   rS   r  r
  r  args   &    rV   test_arangeTestParforNumPy.test_arange  sb    	 	#	& T71Q<1>CJJz'JJz1c*JJz1c1- ?rY   c                    R  pR pR pR F;  pV P                  W4       V P                  V^V4       V P                  V^V^4       K=  	  R# )c                 N    \         P                  ! V \         P                  R 7      # r4  r   r  float32r  s   &rV   r  5TestParforNumPy.test_arange_dtype.<locals>.test_impl1  s    99Qbjj11rY   c                 N    \         P                  ! W\         P                  R 7      # r  r  r  s   &&rV   r
  5TestParforNumPy.test_arange_dtype.<locals>.test_impl2  s    99Q44rY   c                 P    \         P                  ! WV\         P                  R 7      # r  r  r  s   &&&rV   r  5TestParforNumPy.test_arange_dtype.<locals>.test_impl3  s    99Q1BJJ77rY   N)      r  r   r  s   &    rV   test_arange_dtype!TestParforNumPy.test_arange_dtype  sK    	2	5	8 #CJJz'JJz1c*JJz1c1- #rY   c                    R  pR p^^R\        ^^4      \        ^^4      3 F*  pV P                  V^V4       V P                  V^V^4       K,  	  R# )c                 .    \         P                  ! W4      # r[   r  )startstops   &&rV   r  1TestParforNumPy.test_linspace.<locals>.test_impl1  s    ;;u++rY   c                 0    \         P                  ! WV4      # r[   r  )r(  r)  nums   &&&rV   r
  1TestParforNumPy.test_linspace.<locals>.test_impl2  s    ;;uC00rY   r  Nr  )rS   r  r
  r  s   &   rV   test_linspaceTestParforNumPy.test_linspace  sQ    	,	1 T71Q<1>CJJz1c*JJz1c2. ?rY   c           
     .  a  R  p^dp\         P                  P                  V4      p\         P                  P                  ^
V^3R7      pS P	                  W4       S P	                  W4       S P                  \        V\        P                  ! \        P                  ^R4      34      ^4       S P                  \        V\        P                  ! \        P                  ^R4      34      ^4       V 3R lpS P                  W4       S P                  W4       R# )c                 "    V P                  4       # r[   meanr  s   &rV   r  ,TestParforNumPy.test_mean.<locals>.test_impl  s    668OrY   sizer  c                  &   < S P                  ^4      # r  r  r]   s   rV   <lambda>+TestParforNumPy.test_mean.<locals>.<lambda>      455a8rY   Nr   r  r  randintr   r   r   r   r  r  r   r   )rS   r  r  r  r  data_gens   f     rV   	test_meanTestParforNumPy.test_mean  s    	IINN1IIb1v.

9 

9 i%++emmQPS2T1WXZ[\i%++emmQPS2T1WXZ[\ 9I0##I8rY   c           
     p  a  R  p^dp\         P                  P                  V4      p\         P                  P                  ^
V^3R7      pVRV,          ,           pS P	                  W4       S P	                  W4       S P	                  W4       S P                  \        V\        P                  ! \        P                  ^R4      34      ^4       S P                  \        V\        P                  ! \        P                  ^R4      34      ^4       V 3R lpS P                  W4       S P                  W4       R# )c                 "    V P                  4       # r[   )varr4  s   &rV   r  +TestParforNumPy.test_var.<locals>.test_impl      557NrY   r6                ?r  c                  &   < S P                  ^4      # r  r9  r]   s   rV   r:  *TestParforNumPy.test_var.<locals>.<lambda>  r<  rY   Nr=  )rS   r  r  r  r  r  r?  s   f      rV   test_varTestParforNumPy.test_var  s    	IINN1IIb1v.QJ

9 

9 

9 i%++emmQPS2T1WXZ[\i%++emmQPS2T1WXZ[\ 9I0##I8rY   c                &  a  R  p^dp\         P                  P                  V4      p\         P                  P                  ^
V^3R7      pVRV,          ,           pS P	                  W4       S P	                  W4       S P	                  W4       \
        P                  ! \
        P                  ^R4      3pS P                  \        W4      ^4       S P                  \        W4      ^4       V 3R lpS P                  W4       S P                  W4       R# )c                 "    V P                  4       # r[   )stdr4  s   &rV   r  +TestParforNumPy.test_std.<locals>.test_impl  rF  rY   r6  rG  r  c                  &   < S P                  ^4      # r  r9  r]   s   rV   r:  *TestParforNumPy.test_std.<locals>.<lambda>  r<  rY   N)r   r  r  r>  r   r   r  r  r   r   r   r   )rS   r  r  r  r  r  argtyr?  s   f       rV   test_stdTestParforNumPy.test_std  s    	IINN1IIb1v.QJ

9 

9 

9 U]]As35i7;i7; 9I0##I8rY   c                b    R pV P                  \        V\        P                  34      ^4       R# )zt
Test function with only a random call to make sure a random function
like ranf is actually translated to a parfor.
c                 F    \         P                  P                  W 34      pV# r[   )r   r  r  r  s   & rV   r  5TestParforNumPy.test_random_parfor.<locals>.test_impl  s    		v&AHrY   Nr  r!  s   & rV   test_random_parfor"TestParforNumPy.test_random_parfor  s&    
	 	i%++A1ErY   c                (   R  p^pV P                  V\        P                  ! V4      34      pVP                  V4      pV! V4      p\        P
                  P                  WERR7       V P                  \        V\        P                  34      ^4       R# )c                    \         P                  P                  W 3R 7      p\         P                  P                  W 4      p\         P                  P	                  RRW 34      p\         P                  P                  RW 34      p\         P                  P                  ^^W 3R7      p\         P                  P                  ^^^W 34      p\         P                  ! W,           V,           V,           V,           V,           4      # r6          rf  )highr7  )	r   r  standard_normalr   normal	chisquarer>  
triangularr  r  r  r  r  r  EFs   &      rV   r  /TestParforNumPy.test_randoms.<locals>.test_impl  s    		))v)6A		%A		  cA62A		##C!0A		!!!!1&!9A		$$Q1qf5A66!#a%'!)A+&&rY   g?)rtolN)r   r   r   r   r   r   assert_allcloser   r   r   r  rS   r  r  r   r   	py_outputs   &     rV   test_randomsTestParforNumPy.test_randoms  sx    	' &&y5<<?2DE**1-aL	


""=$"Gi%++A1ErY   c                   R  p^pV P                  V\        P                  ! V4      34      pVP                  V4      pV! V4      pV P	                  WE4       V P	                  \        V\        P                  34      ^ 4       R# )c                    \         P                  P                  W 3R 7      p\         P                  P                  W 4      p\         P                  P	                  RRW 34      p\         P                  P                  RW 34      p\         P                  P                  ^^W 3R7      p\         P                  P                  ^^^W 34      p^# r\  )r   r  r_  r   r`  ra  r>  rb  rc  s   &      rV   r  4TestParforNumPy.test_dead_randoms.<locals>.test_impl  s    		))v)6A		%A		  cA62A		##C!0A		!!!!1&!9A		$$Q1qf5ArY   N)r   r   r   r   r   r   r   r  ri  s   &     rV   test_dead_randoms!TestParforNumPy.test_dead_randoms  so    	 &&y5<<?2DE**1-aL	2i%++A1ErY   c           
       a  R  pR p^p\         P                  P                  V4      p\         P                  P                  ^
VR7      P	                  \         P
                  4      p\         P                  P                  W334      p\         P                  ! \         P                  \         P                  .4      pS P                  W4       S P                  W4       S P                  W4       S P                  W4       S P                  W$4       S P                  W%4       S P                  W&4       S P                  W'4       RpW3 F  p	S P                  V	\        P                  R,          34      p
S P                  \        4      ;_uu_ 4       pV
P                  \         P                  ! . \         P                  R7      4       RRR4       S P                  V\!        XP"                  4      4       K  	  V 3R lpS P%                  W4       S P'                  W4       S P%                  W,4       S P'                  W,4       R#   + '       g   i     L; i)c                 "    V P                  4       # r[   r  r4  s   &rV   r  ,TestParforNumPy.test_min.<locals>.test_impl1'  rF  rY   c                 .    \         P                  ! V 4      # r[   )r   r  r4  s   &rV   r
  ,TestParforNumPy.test_min.<locals>.test_impl2*      66!9rY   r6  zDzero-size array to reduction operation minimum which has no identityr   r4  Nc                  &   < S P                  ^4      # r  r9  r]   s   rV   r:  *TestParforNumPy.test_min.<locals>.<lambda>E  r<  rY   r   r  r  r>  astypeint32r  infr   r   r   r  r  r   r   r   r  r  r   r   rS   r  r
  r  r  r  r  r  r   r   pcfuncer?  s   f            rV   test_minTestParforNumPy.test_min&  s   		 IINN1IIbq)00:IINNA6"HHbffbff%&

:!

:!

:!

:!

:!

:!

:!

:!/,D**4%++a.1BCF"":..!""288Bbhh#?@ /MM#s1;;/0	 - 9J1##J9J1##J9 /.s   6IIc           
       a  R  pR p^p\         P                  P                  V4      p\         P                  P                  ^
VR7      P	                  \         P
                  4      p\         P                  P                  W334      p\         P                  ! \         P                  ) \         P                  ) .4      pS P                  W4       S P                  W4       S P                  W4       S P                  W4       S P                  W$4       S P                  W%4       S P                  W&4       S P                  W'4       RpW3 F  p	S P                  V	\        P                  R,          34      p
S P                  \        4      ;_uu_ 4       pV
P                  \         P                  ! . \         P                  R7      4       RRR4       S P                  V\!        XP"                  4      4       K  	  V 3R lpS P%                  W4       S P'                  W4       S P%                  W,4       S P'                  W,4       R#   + '       g   i     L; i)c                 "    V P                  4       # r[   )r  r4  s   &rV   r  ,TestParforNumPy.test_max.<locals>.test_impl1L  rF  rY   c                 .    \         P                  ! V 4      # r[   )r   r  r4  s   &rV   r
  ,TestParforNumPy.test_max.<locals>.test_impl2O  rx  rY   r6  zDzero-size array to reduction operation maximum which has no identityr   r4  Nc                  &   < S P                  ^4      # r  r9  r]   s   rV   r:  *TestParforNumPy.test_max.<locals>.<lambda>j  r<  rY   r{  r  s   f            rV   test_maxTestParforNumPy.test_maxK  s   		 IINN1IIbq)00:IINNA6"HHrvvgw'(

:!

:!

:!

:!

:!

:!

:!

:!/,D**4%++a.1BCF"":..!""288Bbhh#?@ /MM#s1;;/0	 - 9J1##J9J1##J9 /.s   6IIc           
       a  R  pR p^p\         P                  ! . RO4      p\         P                  P                  ^
VR7      P	                  \         P
                  4      p\         P                  P                  W334      p\         P                  ! RR\         P                  RR.4      pS P                  W4       S P                  W4       S P                  W4       S P                  W4       S P                  W$4       S P                  W%4       S P                  W&4       S P                  W'4       RpW3 F  p	S P                  V	\        P                  R,          34      p
S P                  \        4      ;_uu_ 4       pV
P                  \         P                  ! . \         P                  R	7      4       R
R
R
4       S P                  V\!        XP"                  4      4       K  	  V 3R lpS P%                  W4       S P'                  W4       S P%                  W,4       S P'                  W,4       R
#   + '       g   i     L; i)c                 "    V P                  4       # r[   )r  r4  s   &rV   r  /TestParforNumPy.test_argmax.<locals>.test_impl1q      88:rY   c                 .    \         P                  ! V 4      # r[   )r   r  r4  s   &rV   r
  /TestParforNumPy.test_argmax.<locals>.test_impl2t  r  rY   rf  r]  r         @r6  z*attempt to get argmax of an empty sequencer   r4  Nc                  &   < S P                  ^4      # r  r9  r]   s   rV   r:  -TestParforNumPy.test_argmax.<locals>.<lambda>  r<  rY   )rf  r]  r  r  r  r   r  r  r>  r|  r}  r  nanr   r   r   r  r  r   r   r   r  r  r   r   r  s   f            rV   test_argmaxTestParforNumPy.test_argmaxp     		  HH)*IIbq)00:IINNA6"HHb"bffb"-.

:!

:!

:!

:!

:!

:!

:!

:! ;,D**4%++a.1BCF"":..!""288Bbhh#?@ /MM#s1;;/0	 - 9J1##J9J1##J9 /.   >6H11Ic           
       a  R  pR p^p\         P                  ! . RO4      p\         P                  P                  ^
VR7      P	                  \         P
                  4      p\         P                  P                  W334      p\         P                  ! RR\         P                  RR.4      pS P                  W4       S P                  W4       S P                  W4       S P                  W4       S P                  W$4       S P                  W%4       S P                  W&4       S P                  W'4       RpW3 F  p	S P                  V	\        P                  R,          34      p
S P                  \        4      ;_uu_ 4       pV
P                  \         P                  ! . \         P                  R7      4       R	R	R	4       S P                  V\!        XP"                  4      4       K  	  V 3R
 lpS P%                  W4       S P'                  W4       S P%                  W,4       S P'                  W,4       R	#   + '       g   i     L; i)c                 "    V P                  4       # r[   )r  r4  s   &rV   r  /TestParforNumPy.test_argmin.<locals>.test_impl1  r  rY   c                 .    \         P                  ! V 4      # r[   )r   r  r4  s   &rV   r
  /TestParforNumPy.test_argmin.<locals>.test_impl2  r  rY   rf  r]  r  r6  z*attempt to get argmin of an empty sequencer   r4  Nc                  &   < S P                  ^4      # r  r9  r]   s   rV   r:  -TestParforNumPy.test_argmin.<locals>.<lambda>  r<  rY   )rf  r]  r  r]  r  r  r  s   f            rV   test_argminTestParforNumPy.test_argmin  r  r  c                    R  p\         P                  ! ^
4      pV P                  W4       \        P                  ! \        P
                  ^R4      3pV P                  \        W4      ^4       R# )c                 (    V P                  R 4       V #       @fillr   s   &rV   r  4TestParforNumPy.test_ndarray_fill.<locals>.test_impl      FF3KHrY   r  Nr   zerosr   r   r  r  r   r   rS   r  r   rR  s   &   rV   test_ndarray_fill!TestParforNumPy.test_ndarray_fill  sP    	 HHRL

9 U]]As35i7;rY   c                    R  p\         P                  ! R4      pV P                  W4       \        P                  ! \        P
                  ^R4      3pV P                  \        W4      ^4       R# )c                 (    V P                  R 4       V # r  r  r  s   &rV   r  6TestParforNumPy.test_ndarray_fill2d.<locals>.test_impl  r  rY   r  Nr  r  r  r  s   &   rV   test_ndarray_fill2d#TestParforNumPy.test_ndarray_fill2d  sP    	 HHUO

9 U]]As35i7;rY   c                d    R  p\         P                  ! . RO4      p^pV P                  WV4       R# )c                     \         P                  ! W^3\         P                  R7      pV ^ V pVP                  p V ^,          pVP	                  R^4      pW4,          pWRR&   V# r  r4  rM   r   r   r   r   r  r  r7  r  r   r   result_matrixsub_azresult_datas   &&    rV   r  <TestParforNumPy.test_reshape_with_neg_one.<locals>.test_impl  s\    HHaAYbjjAMaFE

AAAb!$A)K#.%   rY   Nrf  r  r  r        @      @r  g       @g      "@      $@g      &@r  r   r  r   rS   r  r   r   s   &   rV   test_reshape_with_neg_one)TestParforNumPy.test_reshape_with_neg_one  /    	! HH 4 5

9#rY   c                d    R  p\         P                  ! . RO4      p^pV P                  WV4       R# )c                     \         P                  ! W^3\         P                  R7      pV ^ V pVP                  p V ^,          pVP	                  R^4      pW4,          pWRR&   V# )r  r4  ir  r  r  s   &&    rV   r  >TestParforNumPy.test_reshape_with_large_neg.<locals>.test_impl  s\    HHaAYbjjAMaFE

AAAeQ'A)K#.%   rY   Nr  r  r  s   &   rV   test_reshape_with_large_neg+TestParforNumPy.test_reshape_with_large_neg  r  rY   c                B   V P                  \        P                  4      ;_uu_ 4       p\        R R7      R 4       p\        P
                  ! . RO4      p^pV! W44       RRR4       RpV P                  V\        XP                  4      4       R#   + '       g   i     L9; i)Tr   c                     \         P                  ! W^3\         P                  R7      pV ^ V pVP                  p V ^,          pVP	                  RR4      pW4,          pWRR&   V# r  r  )r   r   rmr  r  r  s   &&    rV   r  ETestParforNumPy.test_reshape_with_too_many_neg_one.<locals>.test_impl  sZ    XXqQirzz:!AJJEMM"b)#i'5		rY   Nz7The reshape API may only include one negative argument.r  )	r  r   UnsupportedRewriteErrorr   r   r  r   r  r  )rS   raisedr  r   r   r   s   &     rV   "test_reshape_with_too_many_neg_one2TestParforNumPy.test_reshape_with_too_many_neg_one  s    v==>>&4  !  8 9AAaO ?" Ic3v//01% ?>s   5BB	c                \    R  pV P                  V\        P                  ! ^4      RR7       R# )c                    \         P                  ! V 4      \         P                  ! V 4      ,           \         P                  ! V 4      ,           \         P                  ! V 4      ,           \         P
                  ! V 4      ,           # r[   )r   r  prodr  r  rD  r  s   &rV   r  0TestParforNumPy.test_0d_array.<locals>.test_impl  sD    66!9rwwqz)BFF1I5q	ABFF1IMMrY   Fr   N)r   r   r  r!  s   & rV   test_0d_arrayTestParforNumPy.test_0d_array  s"    	N

9bhhqkE
BrY   c                    R  p\         P                  ! ^4      R,          pV P                  W4       V P                  \	        V\
        P                  R,          34      ^4       R# )c                     \         P                  ! V P                  ^,          V P                  ^,          ,           4      # r  )r   r  realimag)r  s   &rV   r  6TestParforNumPy.test_real_imag_attr.<locals>.test_impl  s&    66!&&A+!344rY   NNr  Ny      ?      ?)r   r  r   r   r   r   r7  )rS   r  r  s   &  rV   test_real_imag_attr#TestParforNumPy.test_real_imag_attr	  sL    	5 IIaLF#

9 i%2B2B32G1IJANrY   r   N)r   rN   r   r   rc  r;   r  r  r  r  r$  r.  r@  rJ  rS  rX  rk  rp  r  r  r  r  r  r  r  r  r  r  r  r   r   r   s   @rV   r  r  y  s     1$ $	GF. . 
/9 9$9&FF$F"#:J#:J":H":H<<$$$$2,C
O OrY   r  c                   j   a  ] tR tRt o Rt]P                  ! ]'       * R4      ]R 4       4       t	Rt
V tR# )TestParforsUnsupportedi  z$Tests for unsupported use of parforszOnly impacts 32 bit hardwarec                   V P                  \        P                  4      ;_uu_ 4       p\        RR7      R 4       p\        P
                  ! ^ ^^4      P                  ^^
4      p\        P
                  ! ^^^
4      pV! W44       RRR4       RpV P                  V\        XP                  4      4       R#   + '       g   i     L9; i)z]
This test is in place until issues with the 'parallel'
target on 32 bit hardware are fixed.
Tr   c                 .    \         P                  ! W4      # r[   r  r  s   &&rV   ddotHTestParforsUnsupported.test_unsupported_combination_raises.<locals>.ddot  s    vva|#rY   NzCThe 'parallel' target is not currently supported on 32 bit hardware)
r  r   UnsupportedParforsErrorr   r   r  r  r   r  r  )rS   r  r  r  r  r   s   &     rV   #test_unsupported_combination_raises:TestParforsUnsupported.test_unsupported_combination_raises  s     v==>>&4 $ !$ Aq"%--a4AAq"%AJ ?c3v//01 ?>s   AB44C	r   N)r   rN   r   r   rc  unittestskipIfr:   r;   r  r   r   r   s   @rV   r  r    s1     .__Z!?@2  A2rY   r  c                     a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR t]R 4       tR tR t]R 4       t]R 4       tR tR tR tR tR tR tR t R t!R t"R t#R  t$R! t%R" t&R# t'R$ t(R% t)R& t*R' t+R( t,R) t-R* t.R+ t/R, t0R- t1R. t2R/ t3R0 t4R1 t5R2 t6R3 t7R4 t8R5 t9R6 t:R7 t;R8 t<R9 t=R: t>R; t?R< t@R= tAR> tBR? tCR@ tDRA tERB tFRC tGRD tHRE tIRF tJRG tKRH tLRI tMRJ tNRK tORL tPRM tQ]R]SRN 4       4       tTROtUV tVRP# )QTestParforsi)  z5Tests cpython, reduction and various parfors featuresc                :   a  R  pS P                  VV 3R l4       R# )c                      W,          V,           # r[   r   )r   r   r  s   &&&rV   r  ,TestParfors.test_arraymap.<locals>.test_impl.  s    519rY   c                  &   < S P                  ^4      # r  r9  r]   s   rV   r:  +TestParfors.test_arraymap.<locals>.<lambda>1  s    t/I/I!/LrY   N)r   r!  s   f rV   test_arraymapTestParfors.test_arraymap-  s    	 	I'LMrY   c                f    R  pV P                  V4       V P                  \        VR4      ^4       R# )c                      \         P                  ! ^4      p \         P                  ! R4      p\         P                  ! W,           4      # )r  rO     )r   r  r  r  r~  r}  s     rV   r  0TestParfors.test_0d_broadcast.<locals>.test_impl4  s-    A!A66!%= rY   Nr   r   r   r   r!  s   & rV   test_0d_broadcastTestParfors.test_0d_broadcast3  ,    	! 	

9i4a8rY   c                f    R  pV P                  V4       V P                  \        VR4      ^4       R# )c                      \         P                  ! R4      p \         P                  ! R4      p\         P                  ! W,           4      # )rO  r   )r   r  r  r  r  s     rV   r  -TestParfors.test_2d_parfor.<locals>.test_impl<  s.    !A"A66!%= rY   Nr   r  r!  s   & rV   test_2d_parforTestParfors.test_2d_parfor;  r  rY   c                h   a a R  oVV 3R lpR pS P                  W!4       S P                  W!4       R# )c               3   p   "   \         P                  ! R4      p \         P                  ! R4      pW3x  R# 5i)rO  Nr   r   r  r  r  s     rV   case1)TestParfors.test_nd_parfor.<locals>.case1D  s(     !A"A&Ls   46c                  D   < \        S ! 4       SP                  ^4      4      # r  )r
   r  )r  rS   s   rV   r:  ,TestParfors.test_nd_parfor.<locals>.<lambda>I  s    5$*D*DQ*GHrY   c                 :    \         P                  ! W,           4      # r[   r  r  s   &&rV   r  -TestParfors.test_nd_parfor.<locals>.test_implK  s    66!%= rY   N)r   r   )rS   r?  r  r  s   f  @rV   test_nd_parforTestParfors.test_nd_parforC  s3    	
 I	! 	I0##I8rY   c                F   a ^ RI Ho V3R lp^opV P                  W4       R# )r   )r  c                 &   < S! V 4      pV^ ,          # r  r   )r  r  r  s   & rV   r  9TestParfors.test_np_func_direct_import.<locals>.test_implS  s    QAQ4KrY   N)r  r  r   )rS   r  r  r  s   &  @rV   test_np_func_direct_import&TestParfors.test_np_func_direct_importQ  s    	 

9 rY   c                (   R  pV P                  V^
^
4       V P                  \        4      ;_uu_ 4       p\        RR7      ! V4      pV! ^
^	4       RRR4       RpV P	                  V\        XP                  4      4       R#   + '       g   i     L9; i)c                     \         P                  ! V 4      p\         P                  ! V4      p\         P                  ! W#,           4      # r[   r  )rJ  r  r  r  s   &&  rV   r  2TestParfors.test_size_assertion.<locals>.test_implZ  s,    
A
A66!%= rY   Tr   NzSizes of A, B do not match)r   r  r  r   r   r  r  )rS   r  r  r   r   s   &    rV   test_size_assertionTestParfors.test_size_assertionY  sr    	!
 	

9b"%~..&$'	2E"aL / +c3v//01	 /.s   BB	c                    R  p^dp\         P                  P                  V4      p\         P                  ! V4      pV P	                  WWB4       R# )c                     \         P                  ! ^4       FO  p\        W2,          ^,          V^,           V,          ^,          4       F  p^ W&   W,          ^ 8  g   K  ^W&   K  	  KQ  	  V# r  r   r   r
  )r   is_positiver  r  r  s   &&&  rV   r  'TestParfors.test_cfg.<locals>.test_implh  sV    \\!_Q1a
4A%&KNtax)* 5 % rY   N)r   r  randr  r   )rS   r  r  r   r%  s   &    rV   test_cfgTestParfors.test_cfgf  s;    	 IINN1hhqk

90rY   c                   R  p^p\         P                  P                  V4      pV P                  W4       \         P                  P	                  ^
VR7      P                  \         P                  4      pV P                  W4       R pV P                  4       ;_uu_ 4        V P                  V4       RRR4       ^p\         P                  P	                  ^
VR7      P                  \         P                  4      pR pV P                  W4       R pV P                  WP                  R	4      4       R pV P                  WP                  R	4      4       V P                  \        V\        P                  R
,          34      ^4       R pV P                  W4       V P                  \        V\        P                  R,          34      ^4       R#   + '       g   i     EL%; i)c                      ^
p\        R W4      # )rO  c                     \        W4      # r[   rt  r   s   &&rV   r:  <TestParfors.test_reduce.<locals>.test_impl.<locals>.<lambda>y  s    c!irY   r   )r  init_vals   & rV   r  *TestParfors.test_reduce.<locals>.test_implw  s    H/==rY   r6  c                  N    R  p \        V \        P                  ! . RO4      ^4      # )c                     V ^,          # r  r   r  s   &rV   r:  r-    s    !q&rY   r  r  r  r     )r   r   r  )gs    rV   r  r/    s     A!RXXo6::rY   Nc                 @    \         P                  ! W ^8  ,          4      # r  r  r4  s   &rV   r  r/    s    66!qD'?"rY   c                 V    V R,          p\         P                  ! W^8  ^3,          4      # )r   r   r   r  r  r  s   & rV   r  r/    s$    #A66!qDF)$$rY   c                 V    V R,          p\         P                  ! W^8  R3,          4      # )r   :r  r  Nr7  r  r8  s   & rV   r  r/    s$    #A66!qDH+&&rY   r   c                 >    \         P                  ! V 4      pW,
          # r[   )r   amin)r  min_vals   & rV   r  r/    s    ggajG;rY   )   rO  r  )r   r  r  r   r>  r|  r}  assertTypingErrorr  r   r   r   r  rS   r  r  r  s   &   rV   test_reduceTestParfors.test_reducev  sd   	> IINN1

9 IIbq)00:

9 	; ##%%JJy! & IIbq)00:	#

9 	% 	

9ii01	' 	

9ii01i%--2D1FGK	 	

9 i%--2B1DEqI? &%%s    GG	c                    R  pRpV P                  \        4      ;_uu_ 4       pV P                  VR4      pRRR4       V P                  V\	        XP
                  4      4       R#   + '       g   i     L7; i)c                  Z    ^ p \        ^4       F  p\        P                  ! V 4      p K  	  V # r  )r   cmathrh  accr  s     rV   r  9TestParfors.test_use_of_reduction_var1.<locals>.test_impl  s'    CAYjjo JrY   CUse of reduction variable acc in an unsupported reduction function.Nr   r  r   r   r   r  r  rS   r  r   r  r  s   &    rV   test_use_of_reduction_var1&TestParfors.test_use_of_reduction_var1  sY    	 Uz**a**9b9F +c3q{{+, +*   A%%A5	c                   R  pRpV P                  \        P                  4      ;_uu_ 4       pV P                  VR4      pRRR4       V P	                  V\        XP                  4      4       R#   + '       g   i     L7; i)c                  @    ^dp \        ^4       F  pV ^,          p K  	  V # d   r   rE  s     rV   r  9TestParfors.test_unsupported_floordiv1.<locals>.test_impl  s#    CAY	 JrY   zParallel floordiv reductions are not supported. If all divisors are integers then a floordiv reduction can in some cases be parallelized as a multiply reduction followed by a floordiv of the resulting product.Nr   )r  r   NumbaValueErrorr   r   r  r  rJ  s   &    rV   test_unsupported_floordiv1&TestParfors.test_unsupported_floordiv1  s`    	(
 v5566!**9b9F 7c3q{{+, 76s   A//A?	c                    R  pRpV P                  \        4      ;_uu_ 4       pV P                  VR4      pRRR4       V P                  V\	        XP
                  4      4       R#   + '       g   i     L7; i)c                  L    ^dp \        ^4       F  pW^,           ,          p K  	  V # rP  rR  rE  s     rV   r  4TestParfors.test_unsupported_xor1.<locals>.test_impl  s%    CAY1u JrY   rH  Nr   rI  rJ  s   &    rV   test_unsupported_xor1!TestParfors.test_unsupported_xor1  sY    	 Uz**a**9b9F +c3q{{+, +*rM  c                    R  p^pV P                  W4       V P                  \        V\        P                  34      ^ 4       R# )c                 N    \         P                  ! V 4      pVP                  4       # r[   r  r  s   & rV   r  8TestParfors.test_parfor_array_access1.<locals>.test_impl  s    
A557NrY   N)r   r   r  r   r  rS   r  r  s   &  rV   test_parfor_array_access1%TestParfors.test_parfor_array_access1  s7    	 

9 Y>BrY   c                    R  p^pV P                  W4       V P                  \        V\        P                  34      ^ 4       R# )c                 *   \         P                  ! V 4      p^ p^ p \        P                  ! \	        V4      4       F  pW!V,          ,          pK  	  \        P                  ! \	        V4      4       F  pW 8X  g   K  WV,          ,          p K  	  W ,           # r  )r   r  r   r   r   r  r  rJ  r  s   &   rV   r  8TestParfors.test_parfor_array_access2.<locals>.test_impl  sm    
AAA\\#a&)qT	 * \\#a&)61IA * 5LrY   Nr   r   r  r   r  r_  s   &  rV   test_parfor_array_access2%TestParfors.test_parfor_array_access2  s9    	 

9 4YNPQRrY   c                   R  p^pV P                  \        P                  4      ;_uu_ 4       pV P                  W4       RRR4       V P	                  R\        XP                  4      4       R#   + '       g   i     L7; i)c                     \         P                  ! V \         P                  4      p^ p\        P                  ! \        V4      4       F  pW!V,          ,          pV^8X  g   K  TpK  	  R# r  )r   r  r  r   r   r   rd  s   &   rV   r  8TestParfors.test_parfor_array_access3.<locals>.test_impl  sI    288$AA\\#a&)qT	a4A *rY   Nz Overwrite of parallel loop index)r  r   r  r   r   r  r  )rS   r  r  r  s   &   rV   test_parfor_array_access3%TestParfors.test_parfor_array_access3  s[    	 v==>>&JJy$ ?8#f>N>N:OP ?>s   A..A>	c           	        R  p^p^p\         P                  P                  W#34      p\         P                  P                  V4      pV P                  WV4       \	        V\
        P                  ! \
        P                  ^R4      \
        P                  ! \
        P                  ^R4      34      w  rgT P                  \        VP                  4      ^8H  ;'       d    ^ VP                  9   4       VP                  ^ ,          pRp	Rp
VP                   F=  p\        V\        P                  P                  P                   4      '       g   K9  Rp	Tp
K?  	  V P                  V	4       RpV
P"                  P%                  4        F  pVP                   F  p\        V\&        P(                  4      '       g   K%  \        VP*                  \&        P,                  4      '       g   KQ  VP*                  P.                  R8X  g   Kn  RpV P                  V
P0                  VP*                  P2                  9   4       K  	  K  	  V P                  V4       R# )c                 .    \         P                  ! W4      # r[   r  )r  r   s   &&rV   r  8TestParfors.test_parfor_array_access4.<locals>.test_impl  r  rY   r  FNTr  )r   r  r  r   r  r   r  r  rU  r   r  r  r   r   r  r  r  r  r  r   r  r  r  rZ  r  r^  )rS   r  r  dr  r   r  r  r  parfor_foundr  r  build_tuple_foundbls   &             rV   test_parfor_array_access4%TestParfors.test_parfor_array_access4  s   	  IINNA6"IINN1

9#,EMM1c:EMM1c:<= 	GNN+q0HHQ'..5HIq!JJD$ 4 4 ; ;<<# 
 	%!""))+BtRYY//&tzz277;; JJMM]:(,%OOF$4$4

8H8H$HI   , 	)*rY   c                Z    R  p\         P                  ! ^
4      pV P                  W4       R# )c                     \         P                  ! \        V 4      4       F   pV P                  P	                  ^ 4      W&   K"  	  V ^,          # r  )r   r   r   r5  r   )r   r  s   & rV   r  5TestParfors.test_parfor_dtype_type.<locals>.test_impl&  s5    \\#a&)ww||A *Q4KrY   Nr  )rS   r  r   s   &  rV   test_parfor_dtype_type"TestParfors.test_parfor_dtype_type$  s"    	
 GGBK

9 rY   c                    R  p^pV P                  W4       V P                  \        V\        P                  34      ^ 4       R# )c                     \         P                  ! V ^34      p^ p\        P                  ! V 4       F"  pW!VR3,          P	                  4       ,          pK$  	  V# )r  r   )r   r  r   r   r  )r  r~  r  r  s   &   rV   r  8TestParfors.test_parfor_array_access5.<locals>.test_impl0  sE    AAA\\!_qsVZZ\! %HrY   Nrf  r_  s   &  rV   test_parfor_array_access5%TestParfors.test_parfor_array_access5.  s9    	 

9 4YNPQRrY   c                Z    R  p\         P                  ! ^4      pV P                  W4       R# )c                 ^    \        ^
4       F  p^V ^ ,          ,          V ^ &   K  	  V ^ ,          # rO  rR  )outr  s   & rV   r  8TestParfors.test_parfor_hoist_setitem.<locals>.test_impl>  s*    BZSVA  q6MrY   Nr  )rS   r  r  s   &  rV   test_parfor_hoist_setitem%TestParfors.test_parfor_hoist_setitem;  s"    	
 ggaj

9"rY   c                    R  p^p^pV P                  WV4       V P                  \        V\        P                  \        P                  34      ^4       V P                  \        V\        P                  \        P                  34      ^4       R# )c                     \         P                  ! V4      p\         P                  ! W34      p\         P                  ! V 4      p\        ^4       F!  pV) \         P                  ! W24      ,          pK#  	  X# r  )r   r  r
  r|  )r  r  r  r~  r}  r  r  s   &&     rV   r  8TestParfors.test_parfor_generate_fuse.<locals>.test_implI  sT    
AA
A1XR"&&,&  HrY   N)r   r   r  r   r  r   )rS   r  r  rq  s   &   rV   test_parfor_generate_fuse%TestParfors.test_parfor_generate_fuseF  sk    	 

9#))ejj%**5MNPQRi%**ejj1IJANrY   c                    R  p\         P                  ! ^\         P                  4      p\         P                  ! ^\         P                  4      p^ V^&   V P                  WV4       R# )c                 .    \         P                  ! W4      # r[   )r   bitwise_andr8  s   &&rV   r  .TestParfors.test_ufunc_expr.<locals>.test_implZ  s    >>!''rY   N)r   r  uint8r   )rS   r  r  r  s   &   rV   test_ufunc_exprTestParfors.test_ufunc_exprX  sH    	( GGArxx GGArxx !

9#rY   c                b    R  pV P                  \        V\        P                  34      ^4       R# )c                 X    \        V 34      p\        V 4       F  pVR ,           W&   K  	  V# )r  )unsafe_emptyr
  r  r  r  s   &  rV   r  ;TestParfors.test_find_callname_intrinsic.<locals>.test_implc  s,    aT"A1X3w HrY   N)r   r  r   r  r!  s   & rV   test_find_callname_intrinsic(TestParfors.test_find_callname_intrinsicb  s'    	 	))ejj]CQGrY   c                0    R  pV P                  V^4       R# )c                 v    ^ p\        V 4       F  pV^,          pK  	  \        V 4       F  pV^,          pK  	  V# r  rR  r  rF  r  s   &  rV   r  7TestParfors.test_reduction_var_reuse.<locals>.test_implo  s>    CAYq  AYq  JrY   Nr   r!  s   & rV   test_reduction_var_reuse$TestParfors.test_reduction_var_reusem  s    	 	

9b!rY   c                    R  pV P                  V\        P                  ! ^
4      \        P                  ! ^
4      P                  R4      4       R# )c                     ^p\        V P                  ^ ,          4       F  pW,          '       g   K  V^,          pK  	  V# r  r   r  )r  condr	  r  s   &&  rV   r  8TestParfors.test_non_identity_initial.<locals>.test_impl|  s5    AAGGAJ'77FA ( HrY   boolNr   r   r  r|  r!  s   & rV   test_non_identity_initial%TestParfors.test_non_identity_initialz  s4    	 	

9bggbk2772;+=+=f+EFrY   c                    R  pV P                  V\        P                  ! ^
4      \        P                  ! ^
4      P                  R4      4       R# )c                     ^p^
p\        V P                  ^ ,          4       F.  pW,          '       d   V^,          pV^,          pK%  V^,          pK0  	  W#,           # r  r  )r  r  r	  r  r  s   &&   rV   r  9TestParfors.test_if_not_else_reduction.<locals>.test_impl  sN    AAAGGAJ'77FAFAFA ( 5LrY   r  Nr  r!  s   & rV   test_if_not_else_reduction&TestParfors.test_if_not_else_reduction  s4    		 	

9bggbk2772;+=+=f+EFrY   c                0    R  pV P                  V^d4       R# )c                 `   RpV^ ,          V^,          ,          p\         P                  ! V\         P                  4      p\         P                  ! V4      P	                  V4      p\
        P                  ! V 4       F  pW4,          pK  	  \
        P                  ! V 4       F  pW4,          pK  	  V#    )r     r   r  int_r  r  r   r   r  shpr7  result1tmpr  s   &     rV   r  ?TestParfors.test_two_d_array_reduction_reuse.<locals>.test_impl  s    Cq6CF?DhhsBGG,G))D/))#.C\\!_ % \\!_ % NrY   Nr   r!  s   & rV    test_two_d_array_reduction_reuse,TestParfors.test_two_d_array_reduction_reuse  s    	 	

9c"rY   c                0    R  pV P                  V^d4       R# )c                     \         P                  ! ^\         P                  4      p\        P                  ! V 4       F0  pV\         P
                  ! V.\         P                  4      ,          pK2  	  V# r  )r   r  r  r   r   r  )r  resultr  s   &  rV   r  9TestParfors.test_one_d_array_reduction.<locals>.test_impl  sJ    XXa)F\\!_"((A300 % MrY   Nr   r!  s   & rV   test_one_d_array_reduction&TestParfors.test_one_d_array_reduction  s    	 	

9c"rY   c                0    R  pV P                  V^d4       R# )c                    RpV^ ,          V^,          ,          p\         P                  ! V\         P                  4      p\         P                  ! V4      P	                  V4      p\
        P                  ! V 4       F  pW4,          pK  	  V# r  r  r  s   &     rV   r  9TestParfors.test_two_d_array_reduction.<locals>.test_impl  sd    Cq6CF?DhhsBGG,G))D/))#.C\\!_ % NrY   Nr   r!  s   & rV   test_two_d_array_reduction&TestParfors.test_two_d_array_reduction  s    		 	

9c"rY   c                0    R  pV P                  V^d4       R# )c                     Rp\         P                  ! V\         P                  4      p\         P                  ! . RO4      P	                  V4      p\
        P                  ! V 4       F  pW#,          pK  	  V# )r  r  )rf  r  r  r  r  r  )r   r  r  r  r  r   r   r  r  r  r  r  s   &    rV   r  JTestParfors.test_two_d_array_reduction_with_float_sizes.<locals>.test_impl  sU    ChhsBJJ/G((9:BB3GC\\!_ % NrY   Nr   r!  s   & rV   +test_two_d_array_reduction_with_float_sizes7TestParfors.test_two_d_array_reduction_with_float_sizes  s    	 	

9c"rY   c                0    R  pV P                  V^d4       R# )c                     Rp^\         P                  ! V\         P                  4      ,          p^\         P                  ! V4      ,          p\        P
                  ! V 4       F  pW#,          pK  	  V# r  )r   r  r  	ones_liker   r   r  s   &    rV   r  >TestParfors.test_two_d_array_reduction_prod.<locals>.test_impl  sS    C"''#rww//Gbll7++C\\!_ % NrY   Nr   r!  s   & rV   test_two_d_array_reduction_prod+TestParfors.test_two_d_array_reduction_prod  s    	 	

9c"rY   c                0    R  pV P                  V^d4       R# )c                     Rp\         P                  ! V\         P                  4      p\        P                  ! V 4       F/  pV\         P
                  ! V\         P                  4      ,          pK1  	  V# )r  )r  r     )r   r  r  r   r   r  )r  r  r  r  s   &   rV   r  ;TestParfors.test_three_d_array_reduction.<locals>.test_impl  sM    ChhsBGG,G\\!_277300 % NrY   Nr   r!  s   & rV   test_three_d_array_reduction(TestParfors.test_three_d_array_reduction  s    	 	

9c"rY   c                ^    R  p^p\         P                  ! V4      pV P                  W4       R# )c                 0    V P                  4       ^,           # r  )argsortr4  s   &rV   r  >TestParfors.test_preparfor_canonicalize_kws.<locals>.test_impl  s    99;?"rY   Nr   r  r   r?  s   &   rV   test_preparfor_canonicalize_kws+TestParfors.test_preparfor_canonicalize_kws  s'    	# IIaL

9 rY   c                    R  p\         P                  ! ^\         P                  ! R4      4      pV P                  V\        P
                  ! V4      34      pV P                  VP                  V4      V! V4      4       R# )c                     V P                   # r[   r4  r4  s   &rV   r  8TestParfors.test_preparfor_datetime64.<locals>.test_impl  s    77NrY   zdatetime64[ns]N)r   r  r5  r   r   r   r   r   )rS   r  r  r   s   &   rV   test_preparfor_datetime64%TestParfors.test_preparfor_datetime64  s_    	 HHQ!123&&y5<<?2DE++A.	!=rY   c                j    R  pV P                  V\        P                  P                  ^4      4       R# )c                     V P                   ^ ,          p^ p\        V4       F3  p0 RmpVP                  V4       ^ pV F  pWV,          pK  	  W%,          pK5  	  V# )r   >   r  r  r  )r  r   r  )r~  r  rF  r  Rr  r   s   &      rV   r  ITestParfors.test_no_hoisting_with_member_function_call.<locals>.test_impl  sV    
ACAYaAHC 
  JrY   N)r   r   r  r  r!  s   & rV   *test_no_hoisting_with_member_function_call6TestParfors.test_no_hoisting_with_member_function_call  s$    
	 	

9biinnS12rY   c                .    R pV P                  V4       R# )zissue3671: X != 0 becomes an arrayexpr with operator.ne.
That is turned into a parfor by devectorizing.  Make sure
the return type of the devectorized operator.ne
on integer types works properly.
c                  X    \         P                  ! ^
\         P                  R7      p V ^ 8g  # )rO  r4  )r   r  r  r~  s    rV   r  8TestParfors.test_array_compare_scalar.<locals>.test_impl  s    277+A6MrY   Nr   r!  s   & rV   test_array_compare_scalar%TestParfors.test_array_compare_scalar  s    	 	

9rY   c                `    R  p\         P                  ! ^4      pV P                  WRRR7       R# )c                 j    \        V 4      pV ^ V pV'       d   V ^ V^,           pVP                  4       # r  )r   r  )r   halfr7  parrs   &&  rV   r  ?TestParfors.test_array_analysis_optional_def.<locals>.test_impl  s4    q6DQt9D47|88:rY   TFr  Nr  rS   r  r   s   &  rV    test_array_analysis_optional_def,TestParfors.test_array_analysis_optional_def  s(    	 GGBK

9
>rY   c                l   R  p\         P                  ! ^d\        R7      p\         P                  ! ^d\        R7      pV P                  WV4       V P	                  \        V\        P                  ! \        P                  ^R4      \        P                  ! \        P                  ^R4      34      ^4       R# )c                 0   \         P                  ! \        V 4      \         P                  R 7      p\        V4      p\        P
                  ! V4       F  pW,          W$&   K  	  \        P
                  ! V4       F  pW$,          W,          ,           W$&   K  	  V# r  )r   r  r   r  r   r   )r   r   datar7  r  s   &&   rV   r  7TestParfors.test_prange_side_effects.<locals>.test_impl  sf    88CF"**5Dt9D\\$'$ (\\$''AD. (KrY   r4  r  N)	r   r  floatr   r   r   r   r  r  )rS   r  r   r  s   &   rV   test_prange_side_effects$TestParfors.test_prange_side_effects  s    	 IIgU+IIgU+

9#i%*[[3%G%*[[3%G%IJKL	NrY   c                Z    R  p\         P                  ! ^
4      pV P                  W4       R# )c                     Rp^p\         P                  ! \        V 4      4       F3  pW;;,          V^ ,          V^,          ,           V,           ,          uu&   K5  	  V # )r  r  )r   r   r   r   atupr   r  s   &   rV   r  *TestParfors.test_tuple1.<locals>.test_impl0  sF    DA\\#a&)Q$q')A-- *HrY   Nr  r  s   &  rV   test_tuple1TestParfors.test_tuple1/  "    	 IIbM

9 rY   c                Z    R  p\         P                  ! ^
4      pV P                  W4       R# )c                     V P                   p^p\        P                  ! \        V 4      4       F%  pW;;,          V^ ,          V,           ,          uu&   K'  	  V # )r  )r  r   r   r   r  s   &   rV   r  *TestParfors.test_tuple2.<locals>.test_impl;  s@    77DA\\#a&)Q!# *HrY   Nr  r  s   &  rV   test_tuple2TestParfors.test_tuple2:  r  rY   c                Z    R  p\         P                  ! ^
4      pV P                  W4       R# )c                     \         P                  ! ^
4      ^3p^p\        P                  ! \	        V 4      4       F:  pW;;,          V^ ,          ^,          V^,          ,           V,           ,          uu&   K<  	  V # r  )r   r  r   r   r   r  s   &   rV   r  *TestParfors.test_tuple3.<locals>.test_implF  sW    IIbM1%DA\\#a&)Q
T!W,q00 *HrY   Nr  r  s   &  rV   test_tuple3TestParfors.test_tuple3E  r  rY   c                Z    R  p\         P                  ! ^
4      pV P                  W4       R# )c                     \        ^^R7      p^p\        P                  ! \        V 4      4       F9  pW;;,          VP                  VP
                  ,           V,           ,          uu&   K;  	  V # r  part0part1)r   r   r   r   r  r  )r   antupr   r  s   &   rV   r  /TestParfors.test_namedtuple1.<locals>.test_implQ  sM    "!4EA\\#a&)ekk1A55 *HrY   Nr  r  s   &  rV   test_namedtuple1TestParfors.test_namedtuple1P  r  rY   c                z   a \        R R4      oV3R lp\        P                  ! ^
4      pV P                  W4       R# )TestNamedTuple2c                    < S! ^^R7      p^p\         P                  ! \        V 4      4       F9  pW;;,          VP                  VP                  ,           V,           ,          uu&   K;  	  V # r  )r   r   r   r  r  )r   r  r   r  r  s   &   rV   r  /TestParfors.test_namedtuple2.<locals>.test_impl]  sN    #!15EA\\#a&)ekk1A55 *HrY   Nr  )r   r   r  r   )rS   r  r   r  s   &  @rV   test_namedtuple2TestParfors.test_namedtuple2[  s1    $%68JK	 IIbM

9 rY   c                    \        R R.4      pR pR pV! \        P                  ! ^
4      R7      pV P                  W$V.R7       R# )TestNamedTuple3r  c                 $    ^V P                   R&   R# )r3  r   Nr  r  s   &rV   r  /TestParfors.test_namedtuple3.<locals>.test_impll  s    ACCFrY   c                 n    \         P                  P                  V P                  VP                  4       R # r[   )r   r   r   r  r   s   &&rV   r  .TestParfors.test_namedtuple3.<locals>.comparero  s    JJ**1334rY   r&  r  N)r   r   r  r   )rS   r$  r  r  r   s   &    rV   test_namedtuple3TestParfors.test_namedtuple3g  sB     %>		5 bhhrl+

9XJ
?rY   c                p   R  p\         P                  ! ^
4      ^
,           p\         P                  ! ^
4      ^d,           pV P                  WV4       V P                  \	        V\
        P                  ! \
        P                  ^R4      \
        P                  ! \
        P                  ^R4      34      ^4       R# )c                     W,          pV# r[   r   r   s   &&rV   r  1TestParfors.test_inplace_binop.<locals>.test_implv  s    FAHrY   r  N)r   r  r   r   r   r   r  r  rS   r  r~  r}  s   &   rV   test_inplace_binopTestParfors.test_inplace_binopu  s    	 IIbMBIIbMC

9#i%*[[3%G%*[[3%G%IJKL	NrY   c                ^    R  p\         P                  ! ^^.4      pV P                  W4       R# )c                     \        V 4      pW3p\        P                  ! RV,           R,           \        P                  R7      pVR,          p\	        V 4       F
  w  rVWTWU3&   K  	  V# )r  r4  r  r   r   r   r   r  uint64r  r   r  array_shapeindicesk_listr  r4  s   &      rV   r  0TestParfors.test_tuple_concat.<locals>.test_impl  sW    AA$Khh{ 2T 9"))LGT]F!! qt %MrY   Nr  r  s   &  rV   test_tuple_concatTestParfors.test_tuple_concat  s'    	 HHaV

9 rY   c                ^    R  p\         P                  ! ^^.4      pV P                  W4       R# )c                     \        V 4      pW3p\        P                  ! RV,           R,           RR \        P                  R7      pVR,          p\	        V 4       F
  w  rVWTWU3&   K  	  V# )r  Nr4  r  rM   r4  r5  r7  s   &      rV   r  CTestParfors.test_tuple_concat_with_reverse_slice.<locals>.test_impl  sa    AA$Khh{ 2T 93B?%'YY0GT]F!! qt %MrY   Nr  r  s   &  rV   $test_tuple_concat_with_reverse_slice0TestParfors.test_tuple_concat_with_reverse_slice  s'    		 HHaV

9 rY   c                Z    R  p\         P                  ! R4      pV P                  W4       R# )c                 F    V 3W 3,           pV^ ,          P                  4       # r  r  )r   Ss   & rV   r  6TestParfors.test_array_tuple_concat.<locals>.test_impl  s    vAQ488:rY   Nr  r  r  r  s   &  rV   test_array_tuple_concat#TestParfors.test_array_tuple_concat  s"    	 GGEN

9 rY   c                Z    R  p\         P                  ! R4      pV P                  W4       R# )c                     V R ,          # )r  r   r  s   &rV   r  3TestParfors.test_high_dimension1.<locals>.test_impl  s    s7NrY   N)r  r  r  r  r     r  r  s   &  rV   test_high_dimension1 TestParfors.test_high_dimension1  s"    	GG'(

9 rY   c                ^    R  pRpV P                  V\        P                  ! V4      V4       R# )c                 H    \         P                  ! V4       F  p^W&   K	  	  V # r  r   pndindexr   szr  s   && rV   r  -TestParfors.test_tuple_arg.<locals>.test_impl  !    ^^B' (HrY   NrO  r3  )r   r   r  rS   r  rV  s   &  rV   test_tuple_argTestParfors.test_tuple_arg  s&    	 

9bhhrlB/rY   c                ^    R  pRpV P                  V\        P                  ! V4      R4       R# )c                 H    \         P                  ! V4       F  p^W&   K	  	  V # r  rS  rU  s   && rV   r  =TestParfors.test_tuple_arg_not_whole_array.<locals>.test_impl  rX  rY   NrY  rO  r  r   r   r  rZ  s   &  rV   test_tuple_arg_not_whole_array*TestParfors.test_tuple_arg_not_whole_array  s&    	 

9bhhrlG4rY   c                \    R  pRpV P                  V\        P                  ! V4      4       R# )c                 L    Rp\         P                  ! V4       F  p^W&   K	  	  V # )rO  rY  rS  rU  s   &  rV   r  6TestParfors.test_tuple_for_pndindex.<locals>.test_impl  s&    B^^B' (HrY   NrY  ra  rZ  s   &  rV   test_tuple_for_pndindex#TestParfors.test_tuple_for_pndindex  s$    	
 

9bhhrl+rY   c                ^    R  pRpV P                  V\        P                  ! V4      ^
4       R# )c                 P    V^3p\         P                  ! V4       F  p^W&   K	  	  V # r3  rS  )r   firstrV  r  s   &&  rV   r  5TestParfors.test_tuple_arg_literal.<locals>.test_impl  s*    B^^B' (HrY   NrY  ra  rZ  s   &  rV   test_tuple_arg_literal"TestParfors.test_tuple_arg_literal  s&    	
 

9bhhrlB/rY   c                   a aaaa R  oR oR oS! S! 4       S4      oVVVV V3R lp\         \        RR7      3 F  pV! V4       K  	  R# )c                 H    \         P                  ! V4       F  p^W&   K	  	  V # r  rS  rU  s   && rV   r  ?TestParfors.test_tuple_of_literal_nonliteral.<locals>.test_impl  rX  rY   c                     V! V R4      # )rO  r`  r   )r   r3  s   &&rV   rT  :TestParfors.test_tuple_of_literal_nonliteral.<locals>.call  s    a>!rY   c                  .    \         P                  ! R4      # )rO  rP  r   r  r   rY   rV   r:  >TestParfors.test_tuple_of_literal_nonliteral.<locals>.<lambda>  s    BHHX.rY   c                 n   < V ! S4      p\        S4      pV! S! 4       V4      pSP                  SV4       R # r[   )r   assertPreciseEqual)	decf1f2gotrT  expected	get_inputrS   r  s	   &   rV   r   ;TestParfors.test_tuple_of_literal_nonliteral.<locals>.check  s3    YBdBY["%C##Hc2rY   Tr   Nr   )rS   r   rq  rT  r~  r  r  s   f  @@@@rV    test_tuple_of_literal_nonliteral,TestParfors.test_tuple_of_literal_nonliteral  sI    	
	" /		Y/	3 	3 d+,A!H -rY   c                ^    R  pRpV P                  V\        P                  ! V4      V4       R# )c                 H    \         P                  ! V4       F  p^W&   K	  	  V # r  rS  rU  s   && rV   r  0TestParfors.test_tuple_arg_1d.<locals>.test_impl  rX  rY   Nr  ra  rZ  s   &  rV   test_tuple_arg_1dTestParfors.test_tuple_arg_1d  s&    	 

9bhhrlB/rY   c                \    R  pRpV P                  V\        P                  ! V4      4       R# )c                 L    Rp\         P                  ! V4       F  p^W&   K	  	  V # )rO  r  rS  rU  s   &  rV   r  8TestParfors.test_tuple_arg_1d_literal.<locals>.test_impl  s&    B^^B' (HrY   Nr  ra  rZ  s   &  rV   test_tuple_arg_1d_literal%TestParfors.test_tuple_arg_1d_literal  s$    	
 

9bhhrl+rY   c                Z    R  pV P                  V\        P                  ! R4      ^4       R# )c                 H    \         P                  ! V4       F  p^W&   K	  	  V # r  rS  rU  s   && rV   r  4TestParfors.test_int_arg_pndindex.<locals>.test_impl  rX  rY   NrP  ra  r!  s   & rV   test_int_arg_pndindex!TestParfors.test_int_arg_pndindex  s"    	 	

9bhhx0!4rY   c                  a \         R  4       oV3R lp^p\        P                  ! W"34      p\        P                  R,          \
        P                  3pV P                  \        W4      ^4       V P                  WV4       R# )c                     \        W!,           ^,           ^,          ^,           V^,
          ^4       F  pW^,           V3,          ^,           WV3&   K!  	  R# r  Nr
  )ur  evenr7  r  s   &&&& rV   issue7854_proc=TestParfors.test_prange_unknown_call1.<locals>.issue7854_proc  sC    DHqLA-14!8Q?E1H+/Q$ @rY   c                    < \         P                  ! ^V^,
          4       F  pS! W^ V4       K  	  \         P                  ! ^V^,
          4       F  pS! W^V4       K  	  V # r  r   r   )r  r7  r  r  s   && rV   r  8TestParfors.test_prange_unknown_call1.<locals>.test_impl
  sR    \\!TAX.qQ- /\\!TAX.qQ- /HrY   Nr   r  )
rA   r   r  r   r  r   r  r   r   r   )rS   r  r7  r  cptypesr  s   &    @rV   test_prange_unknown_call1%TestParfors.test_prange_unknown_call1  sk    		* 
	*	 HHd\"==(%++6i91=

9&rY   c                    R  p^p\         P                  ! W"34      p\        P                  R,          \        P
                  3pV P                  \        W4      ^4       V P                  WV4       R# )c                    \         P                  ! ^V^,
          4       FO  p\        V^,           ^,          ^,           V^,
          ^4       F  pW^,           V3,          ^,           WV3&   K!  	  KQ  	  \         P                  ! ^V^,
          4       FH  p\        V^,          ^,           V^,
          ^4       F  pW^,           V3,          ^,           WV3&   K!  	  KJ  	  V # r  r$  )r  r7  r  r  s   &&  rV   r  6TestParfors.test_prange_index_calc1.<locals>.test_impl  s    \\!TAX.A{Qq!<AAqkAoAdG = / \\!TAX.q1uqy$(A6AAqkAoAdG 7 / HrY   Nr  	r   r  r   r  r   r  r   r   r   )rS   r  r7  r  r  s   &    rV   test_prange_index_calc1#TestParfors.test_prange_index_calc1  sX    	 HHd\"==(%++6i91=

9&rY   c                @   R  p^
p\         P                  ! W"34      p\         P                  ! W"34      p\        P                  R,          \        P                  R,          \        P
                  3pV P                  \        W4      ^4       V P                  WWB4       R# )c                 "   \         P                  ! V4       F*  p\        V4       F  pWV3,          ^,           WV3&   K  	  K,  	  \         P                  ! V4       F  p\        V4       F	  p^WV3&   K  	  K  	  V R,          VR,          ,           # )r  rH  r$  )r   r   r7  r  r  s   &&&  rV   r  9TestParfors.test_prange_reverse_order1.<locals>.test_impl,  s{    \\$'tA1gkAdG % ( \\$'tAAdG % ( T7QtW$$rY   Nr  r  rS   r  r7  r   r   r  s   &     rV   test_prange_reverse_order1&TestParfors.test_prange_reverse_order1)  ss    	% HHd\"HHd\"==(%--*?Mi91=

9)rY   c                    R  p^
p\         P                  ! V4      p\        P                  R,          \        P
                  3pV P                  \        W4      ^4       V P                  WV4       R# )c                     ^ p\         P                  ! V4       F  pW0V&   K	  	  \         P                  ! V4       F  pW ^,          ,          pK  	  V# r  r  )r   r7  r   r  s   &&  rV   r  @TestParfors.test_prange_parfor_index_then_not.<locals>.test_impl?  sD    A\\$'! (\\$'qT	 (HrY   r   Nr  )rS   r  r7  r   r  s   &    rV   !test_prange_parfor_index_then_not-TestParfors.test_prange_parfor_index_then_not<  sU    	 HHTN==#U[[1i91=

9&rY   c                T   R  p^
p\         P                  ! V4      p\        V4      p\        P                  R,          \
        P                  P                  \
        P                  V4      \
        P                  3pV P                  \        W4      ^4       V P                  WWB4       R# )c                     ^ p\         P                  ! V4       F  pWAV,          ,           W&   K  	  \         P                  ! V4       F   pW0V,          V^,          ,           ,          pK"  	  V# r  r  )r   tupr7  rF  r  s   &&&  rV   r  JTestParfors.test_prange_parfor_index_const_tuple_fusion.<locals>.test_implP  sS    C\\$'q6z (\\$'tc!f}$ (JrY   r   N)r   r  r   r   r  r   
containersUniTupler  r   r   r   r  s   &     rV   +test_prange_parfor_index_const_tuple_fusion7TestParfors.test_prange_parfor_index_const_tuple_fusionM  s}    	 HHTN!H==###,,U]]DA:: 	i91=

9)rY   c                <   R  p^
p\         P                  ! V4      p\         P                  ! V4      p\        P                  R,          \        P                  R,          \        P
                  3pV P                  \        W4      ^4       V P                  WWB4       R# )c                     \         P                  ! V4       F  pV ^,          W&   K  	  \         P                  ! V4       F  pW0V&   K	  	  V^ ;;,          V ^ ,          ,          uu&   V# rk  r  )r   r   r7  r  s   &&& rV   r  ITestParfors.test_prange_non_parfor_index_then_opposite.<locals>.test_impld  sR    \\$'t (\\$'! ( aDAaDLDHrY   r   Nr  r  s   &     rV   *test_prange_non_parfor_index_then_opposite6TestParfors.test_prange_non_parfor_index_then_oppositea  sm    	 HHTNHHTN==#U]]1%5u{{Ci91=

9)rY   c                    RR lp\         P                  ! ^
4      pV P                  WR \         P                  P                  R .R7       V P                  VP                  4       R4       R # )Nc                 >    \        ^4       F  pVf   K	  RW&   K  	  R# )r  Nr]  rR  )arrpredr  s   && rV   r  3TestParfors.test_prange_optional.<locals>.test_implu  s    AY# CF rY   c                 
    W8H  # r[   r   r   r  s   &&rV   r:  2TestParfors.test_prange_optional.<locals>.<lambda>}  s    AFrY   r  r  r[   )r   r  r   r   r   r   r  rS   r  r  s   &  rV   test_prange_optional TestParfors.test_prange_optionalt  sX    	!
 ggbk

94')zz'E'E':'< 	 	= 	D)rY   c                    R  pV P                  \        4      ;_uu_ 4       pV P                  V4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)c                      Rp V ^ ,          # )333333?r  g?r   r  s    rV   r  8TestParfors.test_untraced_value_tuple.<locals>.test_impl  s    AQ4KrY   Nr  r  r  s   &  rV   test_untraced_value_tuple%TestParfors.test_untraced_value_tuple  sP    	 ~..&JJy! /4c&:J:J6KL /.r  c                    R  pV P                  \        4      ;_uu_ 4       pV P                  V4       RRR4       V P                  R\	        XP
                  4      4       R#   + '       g   i     L7; i)c                  &    Rp V ^ ,          ^ ,          # )r  )r  r   r  s    rV   r  BTestParfors.test_recursive_untraced_value_tuple.<locals>.test_impl  s    AQ47NrY   Nr  r  r  s   &  rV   #test_recursive_untraced_value_tuple/TestParfors.test_recursive_untraced_value_tuple  sP    	 ~..&JJy! /4c&:J:J6KL /.r  c                    R  p\         P                  ! \         P                  ^R4      3pV P                  \	        W4      ^4       \
        P                  ! ^
\
        P                  R7      pV P                  W4       R# )c                    Rp\        V 4      p\        P                  ! V\        P                  4      p\	        V4       F  pW,          V^ ,          ,          W4&   K  	  \        V4      p\        P                  ! V\        P                  4      p\	        V4       F  pW7,          V^,          ,
          Wg&   K  	  Rp\        V4      p	\	        V	4       F  p
WV
,          ,          pK  	  W^ ,          ,           # )r  r]  r  r   r   r  r  r   )r  r   n1arr2r  n2arr3r  totaln3r   s   &          rV   r  9TestParfors.test_untraced_value_parfor.<locals>.test_impl  s    ASB88B

+DBZ&1Q4-  TB88B

+DBZ'AaD.  ETBBZa   Q4<rY   r  r4  N)r   r  r  r   r   r   r  r   )rS   r  r  r  s   &   rV   test_untraced_value_parfor&TestParfors.test_untraced_value_parfor  sW    	   {{5;;3/2i5q9ii"((+

9"rY   c                X    R  pV P                  V\        P                  ! R4      4       R# )c                     ^ p\        V P                  ^ ,          4       F  pV'       d   V ^WR3&   V^,          pK  	  V # r4  )r
  r  )r   rY  r  s   &  rV   r  ;TestParfors.test_setitem_2d_one_replaced.<locals>.test_impl  s?    E1771:&(
 ' HrY   N)r  r  ra  r!  s   & rV   test_setitem_2d_one_replaced(TestParfors.test_setitem_2d_one_replaced  s     	 	

9bhhv./rY   c                    R  p\         P                  ! ^d4      pV P                  WRR4       V P                  WRR4       V P                  WRR4       R# )c                     \         P                  ! V P                  4      pV'       d    VP                  \         P                  4      # V'       d
   W3,          pMW3^,
          ,          pW@P                  ,          # r  )r   r  r7  r|  r  )r  flag1flag2invr-  s   &&&  rV   r  7TestParfors.test_1array_control_flow.<locals>.test_impl  sK    ))CHH%Czz"**--h'l>!rY   TFNr  r  s   &  rV   test_1array_control_flow$TestParfors.test_1array_control_flow  sF    	" iin

94/

94.

95%0rY   c                    R  p\         P                  ! ^d4      pV P                  W^
R4       V P                  W^
R4       R# )c                     \         P                  ! V P                  4      p\         P                  ! WP                  V,           4      pV'       d   W3,          pWT,          # W3^,
          ,          pWT,          # r  r   r  r7  )r  r  flaginv1inv2r-  s   &&&   rV   r  9TestParfors.test_2array_1_control_flow.<locals>.test_impl  sS    99SXX&D99Q1-Dj : !8n:rY   TFNr  r  s   &  rV   test_2array_1_control_flow&TestParfors.test_2array_1_control_flow  s6    	 iin

92t,

92u-rY   c                    R  p\         P                  ! ^d4      pV P                  W^
R4       V P                  W^
R4       R# )c                    \         P                  ! V P                  4      p\         P                  ! WP                  V,           4      pV'       d   W3,          pWC,          pWV,          # W3^,
          ,          pWC^,
          ,          pWV,          # r  r  )r  r  r  r  r  ret1ret2s   &&&    rV   r  9TestParfors.test_2array_2_control_flow.<locals>.test_impl  se    99SXX&D99Q1-Dzz ; 1H~1H~;rY   TFNr  r  s   &  rV   test_2array_2_control_flow&TestParfors.test_2array_2_control_flow  s6    		 iin

92t,

92u-rY   c                    R  pV P                  V^4       V P                  \        V\        P                  34      ^4       R# )c                    \         P                  ! V \         P                  R 7      p\         P                  ! V \         P                  R 7      p\        V 4       F)  p\	        V4       F  pW#;;,          ^,          uu&   K  	  K+  	  \        V 4       F*  pV^ 8X  d   K  W#,          W#^,
          ,          ,
          W&   K,  	  VR,          # )r4  r  NN)r   r  r  r   r
  )r  rcr  r  s   &    rV   r  -TestParfors.test_issue8515.<locals>.test_impl  s    "''*A"''*AAYqADAID "  AY6taAh  R5LrY   N)r   r   r   r   r  r!  s   & rV   test_issue8515TestParfors.test_issue8515  s4    	 	

9b!i%++A1ErY   c                2    R  pV P                  V^ ^4       R# )c                 D   ^p^p\         P                  ! W"34      p\        V4       Fu  p\        V4       Fc  p\         P                  ! V4      pV^ ,          p\         P                  ! V4      p	\	        W4       F  p
^W&   K	  	  V	^ ,          pW,           WEV3&   Ke  	  Kw  	  V# )   )r   r  r
  r  r   )i1i2r  rF  r   r  r   r  r  p2r  r  s   &&          rV   r  -TestParfors.test_issue9029.<locals>.test_impl	  s    AA!A 1XqAWWQZFq	A!B#B^ ! ,1AUAcF "  HrY   Nr   r!  s   & rV   test_issue9029TestParfors.test_issue9029  s    	, 	

9a#rY   c                    R  pV P                  VRR4       V P                  \        V\        P                  \        P                  34      ^4       R# )c                     \         P                  ! ^d4      p\        P                  ! V4      p\         P                  ! ^d4      p\	        \        W4      4      pW#,           V,           # rP  )r   r  r  ceilintr  )r   r   r~  r}  r  s   &&   rV   r  :TestParfors.test_fusion_no_side_effects.<locals>.test_impl	  sB    A		!AACIA519rY   g@g333333@N)r   r   r   r   r  r!  s   & rV   test_fusion_no_side_effects'TestParfors.test_fusion_no_side_effects	  s>    	 	

9c3'i%--1OPRSTrY   c                x    \        R R7      R 4       pV P                  V! ^
4      VP                  ^
4      4       R# )Tr   c                 H    ^ p\        ^4       \        V 4       F  pTpK  	  V# r  r   r   )r   r  r  s   &  rV   def_in_loopCTestParfors.test_issue9256_lower_sroa_conflict.<locals>.def_in_loop%	  s'    AAAY HrY   Nr   r   py_func)rS   r  s   & rV   "test_issue9256_lower_sroa_conflict.TestParfors.test_issue9256_lower_sroa_conflict$	  s:    	t		 
	 	R+*=*=b*ABrY   c                    R  pV! ^4      pV P                  V\        RR7      ! V4      ! ^4      4       V P                  V\        RR7      ! V4      ! ^4      4       R# )c                 t    T p\        ^4       \        V 4       F  pV'       g   K  V ^,           pK  	  VX^ 8  3# r  r  )r   r  _irq  s   &   rV   r  LTestParfors.test_issue9256_lower_sroa_conflict_variant1.<locals>.def_in_loop0	  s:    AAQi1AA   a!e8OrY   Fr   TNr   r   rS   r  r~  s   &  rV   +test_issue9256_lower_sroa_conflict_variant17TestParfors.test_issue9256_lower_sroa_conflict_variant1/	  sP    	 q>4#7#DQ#GH4#6{#CA#FGrY   c                    R  pV! ^4      pV P                  V\        RR7      ! V4      ! ^4      4       V P                  V\        RR7      ! V4      ! ^4      4       R# )c                     T p\        ^4       \        V 4       F(  pV'       g   K  \        V 4       F  pV ^,           pK  	  K*  	  VX^ 8  3# r  )r   r   r
  )r   r  r#  _jrq  s   &    rV   r  LTestParfors.test_issue9256_lower_sroa_conflict_variant2.<locals>.def_in_loop=	  sH    AAQi1#AhE '   a!e8OrY   Fr   TNr%  r&  s   &  rV   +test_issue9256_lower_sroa_conflict_variant27TestParfors.test_issue9256_lower_sroa_conflict_variant2<	  sP    	 q>4#7#DQ#GH4#6{#CA#FGrY   c                4   \         P                  R R.p/ \        P                  CRRRR/Cp \        P
                  ! W\        P                  RR7       R	#   \        P                   d-   pRTP                   2pT P                  TR7        R	p?R	# R	p?ii ; i)
z-mz"numba.tests.parfor_iss9490_usecasePYTHONHASHSEED1NUMBA_NUM_THREADSzutf-8)envstderrencodingzsubprocess failed with output:
)r   N)
sys
executableosenvironsubpcheck_outputSTDOUTCalledProcessErroroutputfail)rS   cmdenvsr  r   s   &    rV   "test_issue9490_non_det_ssa_problem.TestParfors.test_issue9490_non_det_ssa_problemJ	  s     NN0


jj
 c  
	c%)[['.0 && 	4QXXJ?CII#I	s   'A B+!BBr   N)Wr   rN   r   r   rc  r  r  r  r  r  r   r(  r@  rK  rU  rZ  r`  rg  rl  r;   ru  rz  r  r=   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r!  r*  r0  r<  rA  rI  rO  r[  rb  rg  rn  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r'  r-  r<   r@   rB  r   r   r   s   @rV   r  r  )  s    @N999!21 .J`--"
-	CS(Q $+ $+L!S # # O O"$	H"GG#"	####
#!>3

?N$	!	!	!	!
!@
N!! !!05,000,5'*'$*&'"*(*&
*MM#001".."F($6U	CHH " # rY   r  c                   2   a  ] tR tRt o R tR tR tRtV tR# )TestParforsLeaksie	  c                `    V P                   ! V.VO5!  w  rEV P                  ! WV.VO5/ VB  R # r[   r   r   s   &&*,  rV   r   TestParforsLeaks.checkg	  3    ((7$7$$VFLTLVLrY   c                    R  p\         P                  ! ^
4      P                  \         P                  4      pV P	                  W4       R# )c                 "    V P                  4       # r[   rE  )r  s   &rV   r  2TestParforsLeaks.test_reduction.<locals>.test_implm	  s    779rY   Nr   r  r|  r  r   r  s   &  rV   test_reductionTestParforsLeaks.test_reductionk	  s1    	 iim""2::.

9"rY   c                    R  p\         P                  ! ^
4      P                  \         P                  4      pV P	                  W4       R# )c                     R pRp\        V P                  4       F/  pWV,          ,          pVRW,          ^,           ,          ,          pK1  	  W,          # )r]  rf  )r   r7  )r  r   r   r  s   &   rV   r  @TestParforsLeaks.test_multiple_reduction_vars.<locals>.test_implu	  sH    AACHH%VR36A:&& & 5LrY   NrL  r  s   &  rV   test_multiple_reduction_vars-TestParforsLeaks.test_multiple_reduction_varss	  s1    	 iim""2::.

9"rY   r   N)	r   rN   r   r   r   rM  rR  r   r   r   s   @rV   rE  rE  e	  s     M#
# 
#rY   rE  c                      a  ] tR tRt o R tR tR tR tR tR t	R t
]R	 4       t]R
 4       t]R 4       tR tR tR tR tR t]R 4       tR tR tR tR tR tR tR tR tR tR tR tR t Rt!V t"R# ) TestParforsSlicei	  c                X    R  pV P                  V\        P                  ! ^
4      4       R# )c                 \    V P                   w  pV ^ V^,
           V ^V^,
           ,           pV# r  r  r   r  r   s   &  rV   r  6TestParforsSlice.test_parfor_slice1.<locals>.test_impl	  s0    77DQ!AaC1Qqs8#AHrY   Nr   r   r  r!  s   & rV   test_parfor_slice1#TestParforsSlice.test_parfor_slice1	  s    	
 	

9bggbk*rY   c                p   R  pV P                  V\        P                  ! ^
4      ^	4       V P                  \        4      ;_uu_ 4       p\        RR7      ! V4      ! \        P                  ! ^
4      ^
4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)c                 N    V P                   w  pV ^ V^,
           V ^V ,           pV# r  rX  r   rJ  r  r   s   &&  rV   r  6TestParforsSlice.test_parfor_slice2.<locals>.test_impl	  s,    77DQ!AaC1Qq6!AHrY   Tr   Ndo not match	r   r   r  r  r  r   r   r  r  r  s   &  rV   test_parfor_slice2#TestParforsSlice.test_parfor_slice2	  sw    	 	

9bggbk1-~..&$	*2772;r: /nc&*:*:&;< /.s   .B%%B5	c                X    R  pV P                  V\        P                  ! R4      4       R# )c                     V P                   w  rV ^ V^,
          1^ V^,
          13,          V ^V1^V13,          ,           pV# r  rX  r`  s   &   rV   r  6TestParforsSlice.test_parfor_slice3.<locals>.test_impl	  sD    GGEQ!AaC%!A#+1Q3qs7+AHrY   Nr  r  r[  r!  s   & rV   test_parfor_slice3#TestParforsSlice.test_parfor_slice3	      	
 	

9bggen-rY   c                X    R  pV P                  V\        P                  ! R4      4       R# )c                 n    V P                   w  rV R ^ V^,
          13,          V R ^V13,          ,           pV# r  rX  r`  s   &   rV   r  6TestParforsSlice.test_parfor_slice4.<locals>.test_impl	  s8    GGEQ!AacE'
Qq1uX%AHrY   Nri  r[  r!  s   & rV   test_parfor_slice4#TestParforsSlice.test_parfor_slice4	  rl  rY   c                X    R  pV P                  V\        P                  ! R4      4       R# )c                 n    V P                   w  rV ^ V^,
          1R3,          V ^V1R3,          ,           pV# r4  rX  r`  s   &   rV   r  6TestParforsSlice.test_parfor_slice5.<locals>.test_impl	  s8    GGEQ!AaC%'
Qqs1uX%AHrY   Nri  r[  r!  s   & rV   test_parfor_slice5#TestParforsSlice.test_parfor_slice5	  rl  rY   c                X    R  pV P                  V\        P                  ! R4      4       R# )c                 T    V P                  4       pV R,          VR,          ,           pV# )r  r  r   )r   r  	transposer   r   r  s   &  rV   r  6TestParforsSlice.test_parfor_slice6.<locals>.test_impl	  #    A#3AHrY   Nri  r[  r!  s   & rV   test_parfor_slice6#TestParforsSlice.test_parfor_slice6	  rl  rY   c                l   R  pV P                  V\        P                  ! R4      4       V P                  \        4      ;_uu_ 4       p\        RR7      ! V4      ! \        P                  ! R4      4       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)c                 T    V P                  4       pV R,          VR,          ,           pV# )r  ry  rz  r|  s   &  rV   r  6TestParforsSlice.test_parfor_slice7.<locals>.test_impl	  r~  rY   Tr   Nrb  rH  r  rc  r  s   &  rV   test_parfor_slice7#TestParforsSlice.test_parfor_slice7	  ss    	 	

9bggen-~..&$	*2775>: /nc&*:*:&;< /.s   -B##B3	c                v    R  pV P                  V\        P                  ! ^	4      P                  R4      4       R# )c                 r    V P                   w  rV P                  4       pV ^V1^V13,          V^V1^V13&   V# r  r  r{  r`  s   &   rV   r  6TestParforsSlice.test_parfor_slice8.<locals>.test_impl	  sB    GGEQA1Q3qs7Aac!A#gJHrY   NrH  r   r   r  r  r!  s   & rV   test_parfor_slice8#TestParforsSlice.test_parfor_slice8	  *    	 	

9biil2259:rY   c                v    R  pV P                  V\        P                  ! ^4      P                  R4      4       R# )c                 n    V P                   w  rV P                  4       pV R ^V13,          V^V1^V13&   V# r  r  r`  s   &   rV   r  6TestParforsSlice.test_parfor_slice9.<locals>.test_impl	  s>    GGEQA1QqS5Aac!A#gJHrY   Nr  r  r!  s   & rV   test_parfor_slice9#TestParforsSlice.test_parfor_slice9	  s*    	 	

9biim33E:;rY   c                v    R  pV P                  V\        P                  ! ^	4      P                  R4      4       R# )c                 j    V P                   w  rV P                  4       pV ^^V13,          V^^V13&   V# r  r  r`  s   &   rV   r  7TestParforsSlice.test_parfor_slice10.<locals>.test_impl	  s:    GGEQA1Q3xAa!eHHrY   NrH  r  r!  s   & rV   test_parfor_slice10$TestParforsSlice.test_parfor_slice10	  r  rY   c                v    R  pV P                  V\        P                  ! ^4      P                  R4      4       R# )c                 p    V P                   w  rpV P                  4       pV R ^^V13,          VR ^^V13&   V# r  r  r   )r   rJ  r  r  r   s   &    rV   r  7TestParforsSlice.test_parfor_slice11.<locals>.test_impl	  s@    ggGQA1Qqs7Aa!A#gJHrY   N)r  r  r  r  r!  s   & rV   test_parfor_slice11$TestParforsSlice.test_parfor_slice11	  s*    	 	

9biim33G<=rY   c                v    R  pV P                  V\        P                  ! ^4      P                  R4      4       R# )c                 j    V P                   w  rV P                  4       pV ^ RR13,          V^^R13&   V# )r   NrM   r  r`  s   &   rV   r  7TestParforsSlice.test_parfor_slice12.<locals>.test_impl	  s:    GGEQA!CRC%Aa"fIHrY   Nr  r  r!  s   & rV   test_parfor_slice12$TestParforsSlice.test_parfor_slice12	  *    	 	

9biim33E:;rY   c                v    R  pV P                  V\        P                  ! ^4      P                  R4      4       R# )c                 ~    V P                   w  rV P                  4       pRpV ^ V) V^,
          13,          V^^V13&   V# )r  rM   r  )r   rJ  r  r   r  s   &    rV   r  7TestParforsSlice.test_parfor_slice13.<locals>.test_impl	  sE    GGEQAAA2ac6{Aa!eHHrY   Nr  r  r!  s   & rV   test_parfor_slice13$TestParforsSlice.test_parfor_slice13	  s*    	 	

9biim33E:;rY   c                v    R  pV P                  V\        P                  ! ^4      P                  R4      4       R# )c                 j    V P                   w  rV P                  4       pV ^ R^13,          V^RR13&   V# )r   NrM   r  r`  s   &   rV   r  7TestParforsSlice.test_parfor_slice14.<locals>.test_impl 
  s:    GGEQA2a4yAaeHHrY   Nr  r  r!  s   & rV   test_parfor_slice14$TestParforsSlice.test_parfor_slice14	  r  rY   c                v    R  pV P                  V\        P                  ! ^4      P                  R4      4       R# )c                 z    V P                   w  rV P                  4       pV ^ R^13,          V^V^,
          ) R13&   V# )r   Nr  r  r`  s   &   rV   r  7TestParforsSlice.test_parfor_slice15.<locals>.test_impl	
  s>    GGEQAQr!tV9Aa!A#iLHrY   Nr  r  r!  s   & rV   test_parfor_slice15$TestParforsSlice.test_parfor_slice15
  r  rY   c                4   R pV P                  V\        P                  ! ^
4      \        P                  ! ^
4      ^4       \        P
                  R,          \        P
                  R,          \        P                  3pV P                  \        W4      ^4       R# )zThis test is disabled because if n is larger than the array size
then n and n-1 will both be the end of the array and thus the
slices will in fact be of different sizes and unable to fuse.
c                 n    V P                   VP                   8X  g   Q h^
V ^V% ^
V^ V^,
          % W,          # r  rX  )r   r   r  s   &&&rV   r  7TestParforsSlice.test_parfor_slice16.<locals>.test_impl
  s9    77agg%&%AaFAa1J5LrY   r   N)	r   r   r  r  r   r  r  r   r   rS   r  r   s   &  rV   test_parfor_slice16$TestParforsSlice.test_parfor_slice16
  sb    	 	

9bggbk288B<;a %--"2EKK@i6:rY   c                Z    R  pV P                  V^
\        P                  ! ^
4      4       R# )c                 R    \         P                  ! V 4      p\        V4      pWV) R % V# r[   r   r  r   )rJ  r  r  r  s   &&  rV   r  7TestParforsSlice.test_parfor_slice17.<locals>.test_impl"
  s(    AAAqbcFHrY   Nr[  r!  s   & rV   test_parfor_slice17$TestParforsSlice.test_parfor_slice17!
  s!    	 	

9b"''"+.rY   c                .    R  pV P                  V4       R# )c                  x    \         P                  ! ^
4      p \         P                  ! ^ ^4      V R&   V ^,          pV# )rO  r     N)r   r  r  )r   r  s     rV   r  7TestParforsSlice.test_parfor_slice18.<locals>.test_impl,
  s0    AYYq!_AcF!AHrY   Nr   r!  s   & rV   test_parfor_slice18$TestParforsSlice.test_parfor_slice18*
  s    	 	

9rY   c                X    R  pV P                  V\        P                  ! ^
4      4       R# )c                 0    V R ;;,          ^,          uu&   V # )Nr   Nr   r  s   &rV   r  7TestParforsSlice.test_parfor_slice19.<locals>.test_impl6
  s    bEQJEHrY   Nr[  r!  s   & rV   test_parfor_slice19$TestParforsSlice.test_parfor_slice194
      	 	

9bggbk*rY   c                2    R  pV P                  VRR7       R# )c                  Z    \         P                  ! ^
4      p V R,          p\        V4      pV# )rO  r  )r   r  r   )r   r  r	  s      rV   r  7TestParforsSlice.test_parfor_slice20.<locals>.test_impl>
  s&    A"AAAHrY   Fr  Nr   r!  s   & rV   test_parfor_slice20$TestParforsSlice.test_parfor_slice20<
  s    	 	

9u
5rY   c                    R  p\         P                  P                  ^4      p\         P                  P                  ^4      pV P                  WV4       R# )c                     V P                  V P                  ^4      p VP                  VP                  ^4      pWRR1R3,          8  # )r  Nr   rM   )r  r7  )x1x2s   &&rV   r  7TestParforsSlice.test_parfor_slice21.<locals>.test_implG
  s?    BGGQ'BBGGQ'BCRCF##rY   N)r   r  r'  r   rS   r  r  r  s   &   rV   test_parfor_slice21$TestParforsSlice.test_parfor_slice21F
  s;    	$
 YY^^AYY^^A

9"%rY   c                    R  p\         P                  ! R4      p\         P                  ! ^4      pV P                  WV4       R# )c                 x    \         P                  ! R4      p\        ^4       F  pW RV3,          ,          pK  	  V# )rO  r   r  )r   r  r   )r  r  r   r  s   &&  rV   r  7TestParforsSlice.test_parfor_slice22.<locals>.test_implQ
  s1    AAY2Y HrY   N)rO  r  )r   r  r  r   r  s   &   rV   test_parfor_slice22$TestParforsSlice.test_parfor_slice22P
  s2    	 XXfXXa[

9"%rY   c                X    R  pV P                  V\        P                  ! ^
4      4       R# )c                     ^V R&   V # )r  r  r   r  s   &rV   r  7TestParforsSlice.test_parfor_slice23.<locals>.test_impl]
  s    AbEHrY   Nr[  r!  s   & rV   test_parfor_slice23$TestParforsSlice.test_parfor_slice23[
  r  rY   c                    R  p\        R^4       F+  pV P                  V^
\        P                  ! ^
4      V4       K-  	  R# )c                 V    \         P                  ! V 4      pW2R  pVR \        V4       pV# r[   r  rJ  r  r  r  r  s   &&&  rV   r  7TestParforsSlice.test_parfor_slice24.<locals>.test_impld
  s,    A"A'3q6
AHrY   Nr
  r   r   r  rS   r  r  s   &  rV   test_parfor_slice24$TestParforsSlice.test_parfor_slice24c
  3    	 sBAJJy"bggbk15  rY   c                    R  p\        R^4       F+  pV P                  V^
\        P                  ! ^
4      V4       K-  	  R# )c                 X    \         P                  ! V 4      pVR V pVR \        V4       pV# r[   r  r  s   &&&  rV   r  7TestParforsSlice.test_parfor_slice25.<locals>.test_impln
  s.    A"1A'3q6
AHrY   Nr  r  r  s   &  rV   test_parfor_slice25$TestParforsSlice.test_parfor_slice25m
  r  rY   c                X    R  pV P                  V\        P                  ! ^4      4       R# )c                 `    V P                   w  pV P                  4       pV R^ W!^,
          ) R% V# )r  Nr  r  rY  s   &  rV   r  7TestParforsSlice.test_parfor_slice26.<locals>.test_implx
  s2    77DQA2aA!fgJHrY   Nr   r   r  r!  s   & rV   test_parfor_slice26$TestParforsSlice.test_parfor_slice26w
  s    	 	

9biil+rY   c                X    R  pV P                  V\        P                  ! ^4      4       R# )c                     ^ p\        V P                  ^ ,          4       F(  pW,          ^ 8w  d
   V^,          pV'       g   K#  V RV pK*  	  ^ # r  r  )r   n_valid_valsr  unuseds   &   rV   r  7TestParforsSlice.test_parfor_slice27.<locals>.test_impl
  sG    LAGGAJ'419 A%L<}-F ( rY   Nr  r!  s   & rV   test_parfor_slice27$TestParforsSlice.test_parfor_slice27
  s    
	 	

9biil+rY   c           	     N  a \        ^^R4      \        ^RR4      \        R^R4      \        RRR4      \        RRR4      3 Fa  oV3R lp^
pV P                  W4       \        P                  ! V^,          4      P	                  V^34      pV3R lpV P                  W4       Kc  	  R# )r  Nc                    < \         P                  ! V ^,          4      P                  V ^34      p^ p\        P                  ! V 4       F"  pW!VS3,          P                  4       ,          pK$  	  V# r  )r   r  r  r   r   r  )r  r~  r  r  tss   &   rV   r  HTestParforsSlice.test_parfor_array_access_lower_slice.<locals>.test_impl
  sV    IIa!e$,,aV4aA1b5'A )rY   c                    < ^ p\         P                  ! V P                  ^ ,          4       F"  pWVS3,          P                  4       ,          pK$  	  V# r  )r   r   r  r  )r~  r  r  r  s   &  rV   r  r  
  s>    aggaj1A1b5'A 2rY   rM   r  )slicer   r   r  r  )rS   r  r  r~  r  s   &   @rV   $test_parfor_array_access_lower_slice5TestParforsSlice.test_parfor_array_access_lower_slice
  s    At$eAtT&:E$2<NtT*E$b,ACB AJJy$		!a% ((!Q0A JJy$+CrY   r   N)#r   rN   r   r   r\  rd  rj  rp  ru  r  r  r=   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r	  r   r   r   s   @rV   rU  rU  	  s     +=....= ; ; < < ; ;><<<< ; ;/+6&	&+66,,"% %rY   rU  c                   &   a  ] tR tRt o R tRtV tR# )TestParforsOptionsi
  c                8   R  pV P                  V\        P                  ! ^
4      4       \        P                  R,          3pV P                  \        W4      ^4       V P                  \        WRR7      ^4       V P                  \        WRRR7      ^4       V P                  \        WRRRR7      ^4       V P                  \        WRRRRR7      ^4       V P                  \        WRRRRRR7      ^4       V P                  \        WRRRRRRR7      ^ 4       R	# )
c                 L   V P                   ^ ,          p\        P                  ! V4      p\        P                  ! \	        V4       Uu. uF  q3NK  	  up4      pWV,          ,           VRV% \        V4       F  pW#,          W,          ,          WC&   K  	  \        R V^ 4      # u upi )r   Nc                     W,           # r[   r   r  s   &&rV   r:  KTestParforsOptions.test_parfor_options.<locals>.test_impl.<locals>.<lambda>
  s    QSrY   )r  r   r  r  r
  r   r   )r   r  r   r  r  s   &    rV   r  9TestParforsOptions.test_parfor_options.<locals>.test_impl
  s    
A
AeAh0h1h01AAIAbqEAYtad{ .!Q//	 1s   
B!r   F)fusion)r  comprehension)r  r  setitem)r  r  r  r   )r  r  r  r   	reduction)r  r  r  r   r  r  N)r   r   r  r   r  r   r   r  s   &  rV   test_parfor_options&TestParforsOptions.test_parfor_options
  s   	0 	

9bggbk*a "i6:ieDaHie',./0	2 	ie',e=>?	A 	ie',eEKLM	O 	ie',eE#(*+,	. 	ie',eE#(789	;rY   r   N)r   rN   r   r   r  r   r   r   s   @rV   r  r  
  s      ;  ;rY   r  c                   D   a  ] tR tRt o R tR tR tR tR tR t	Rt
V tR	# )
TestParforsBitMaski
  c                Z    R  pV P                  V\        P                  ! ^
4      ^4       R# )c                     W8  p^ W&   V # r  r   rY  s   && rV   r  :TestParforsBitMask.test_parfor_bitmask1.<locals>.test_impl
  s    AADHrY   Nr  r!  s   & rV   test_parfor_bitmask1'TestParforsBitMask.test_parfor_bitmask1
  s!    	
 	

9biimQ/rY   c                f    R  p\         P                  ! ^
4      pV^8  pV P                  WV4       R# )c                     ^ W&   V # r  r   r   s   &&rV   r  :TestParforsBitMask.test_parfor_bitmask2.<locals>.test_impl
  s    ADHrY   Nr  r  s   &   rV   test_parfor_bitmask2'TestParforsBitMask.test_parfor_bitmask2
  -    	 IIbME

9#rY   c                f    R  p\         P                  ! ^
4      pV^8  pV P                  WV4       R# )c                     W,          W&   V # r[   r   r   s   &&rV   r  :TestParforsBitMask.test_parfor_bitmask3.<locals>.test_impl
  s    4ADHrY   Nr  r  s   &   rV   test_parfor_bitmask3'TestParforsBitMask.test_parfor_bitmask3
  r$  rY   c                f    R  p\         P                  ! ^
4      pV^8  pV P                  WV4       R# )c                 *    ^V ,          V,          W&   V # r  r   r   s   &&rV   r  :TestParforsBitMask.test_parfor_bitmask4.<locals>.test_impl
  s    E1:ADHrY   Nr  r  s   &   rV   test_parfor_bitmask4'TestParforsBitMask.test_parfor_bitmask4
  r$  rY   c                f    R  p\         P                  ! ^
4      pV^8  pV P                  WV4       R# )c                 4    W,          W,          ,          W&   V # r[   r   r   s   &&rV   r  :TestParforsBitMask.test_parfor_bitmask5.<locals>.test_impl
  s    4!$;ADHrY   Nr  r  s   &   rV   test_parfor_bitmask5'TestParforsBitMask.test_parfor_bitmask5
  r$  rY   c                `   R  p\         P                  ! ^
4      pV^8  p\         P                  ! \        V4      4      pV P	                  \
        4      ;_uu_ 4       pV P                  WW44       RRR4       V P                  R\        XP                  4      4       R#   + '       g   i     L7; i)c                     W V&   V # r[   r   r|  s   &&&rV   r  :TestParforsBitMask.test_parfor_bitmask6.<locals>.test_impl   s    aDHrY   Nr  )
r   r  r  r  r  r  r   r   r  r  )rS   r  r   r   r  r  s   &     rV   test_parfor_bitmask6'TestParforsBitMask.test_parfor_bitmask6
  s|    	 IIbMEHHSV ~..&JJyQ* /4c&:J:J6KL /.s   BB-	r   N)r   rN   r   r   r  r"  r(  r-  r2  r7  r   r   r   s   @rV   r  r  
  s*     0$$$$M MrY   r  c                      a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tR tR tR t]R 4       tR tR tR tR tR tR t]R 4       tR tR tR tR tR tR t Rt!V t"R# )TestParforsMisci  z7
Tests miscellaneous parts of ParallelAccelerator use.
c           	     V   R  p\        RRR7      ! V4      p\        P                  ! RR7      ;_uu_ 4       p\        P                  ! R4       \        P                  ! RRR7       \        P                  ! RR\
        P                  P                  R	R
7       V! 4        RRR4       V P                  \        X4      ^ 4       VP                  P                  4        Uu. uF  pVP                  P                  NK  	  ppV P                  VR.4       R#   + '       g   i     L}; iu upi )c                      \         P                  ! ^d4      p \        V P                  4       F  pW;;,          V,          uu&   K  	  V # rP  )r   r  r   r7  )r  r  s     rV   r   9TestParforsMisc.test_no_warn_if_cache_set.<locals>.pyfunc  s2    ''#,CCHH%! &JrY   T)r   cacherecordalwaysignore	typeguard)actionmodulez.*TBB_INTERFACE_VERSION.*znumba\.np\.ufunc\.parallel.*)rD  messagecategoryrE  NF)r   warningscatch_warningssimplefilterfilterwarningsr   r   NumbaWarningr   r   r   r  r   has_dynamic_globals)rS   r   r   raised_warningsr   rM  s   &     rV   test_no_warn_if_cache_set)TestParforsMisc.test_no_warn_if_cache_set  s    	 d$/7$$D11_!!(+##8+68 ##8,H-2\\-F-F+JL G 2 	_-q1 ,1??+A+A+CE+C4  $||??+C 	 E,ug6! 21Es   A(DD&D#	c                   R  pV P                  VR4      p\        4       ;_uu_ 4       pVP                  4        RRR4       XP                  4       P	                  4        F  pV P                  RV4       K  	  R#   + '       g   i     LI; i)c                      \         P                  ! ^
4      p \         P                  ! ^ ^4      V R&   \        RV ^,          4       \        RV ^,          4       V # )rO  r  za[3]:)r   r  r  printr  s    rV   r   ITestParforsMisc.test_statement_reordering_respects_aliasing.<locals>.impl0  sC    AYYq!_AcF'1Q4 '1Q4 HrY   Nz	a[3]: 2.0r   )r   r4   r   getvaluerE  r   )rS   r   r   stdoutlines   &    rV   +test_statement_reordering_respects_aliasing;TestParforsMisc.test_statement_reordering_respects_aliasing/  sj    	 $$T2.& OO%002D[$/ 3 s   A::B
	c                   R  p\         P                  ! \         P                  R.4      p\        RR7      ! V4      p\        P
                  P                  P                  p R\        P
                  P                  n        \         P                  P                  V! V4      V! V4      4       V\        P
                  P                  n        R#   T\        P
                  P                  n        i ; i)c                 .    \         P                  ! V 4      # r[   )r   isinfr4  s   &rV   r  ;TestParforsMisc.test_parfor_ufunc_typing.<locals>.test_impl>  s    88A;rY   r]  Tr   N)
r   r  r~  r   r   r  r  sequential_parfor_loweringr   assert_array_equal)rS   r  r  r   old_seq_flags   &    rV   test_parfor_ufunc_typing(TestParforsMisc.test_parfor_ufunc_typing=  s    	 HHbffc]#d#I.}}++FF	K>BEMM  ;JJ)))A,aA ?KEMM  ;lEMM  ;s   !AC !C.c                D    R  pV P                  \        VR4      ^ 4       R# )c                      ^ p . ROp\         P                  P                  P                  4        Tp\         P                  ! ^4       F  pWV,          ,          p K  	  W^,          ,           # )r   r2  )r   r  r  init_pranger   )resr  dummyr  s       rV   r  6TestParforsMisc.test_init_block_dce.<locals>.test_implN  sP    CCMM  ,,.E\\!_1v %q>!rY   Nr   )r   r  r!  s   & rV   test_init_block_dce#TestParforsMisc.test_init_block_dceL  s!    	" 	,Y;Q?rY   c                .    R  pV P                  V4       R# )c                  n    ^ p \        ^4       F  pV ^,          p K  	  \        P                  ! V 34      pV# r  r
  r   r  )rF  rI   r  s      rV   r  BTestParforsMisc.test_alias_analysis_for_parfor1.<locals>.test_implZ  s5    C1Xq  88SF#DKrY   Nr   r!  s   & rV   test_alias_analysis_for_parfor1/TestParforsMisc.test_alias_analysis_for_parfor1Y  s    	 	

9rY   c                F  aa R o\        RRR7       ! V3R lR\        4      4       o ! V3R lR\        4      p\        RVR7      R	 4       pV P	                  \
        P                  P                  P                  4       V P                  \        P                  4      ;_uu_ 4       pV! 4        R
R
R
4       V P                  S\        XP                  4      4       V P	                  \
        P                  P                  P                  4       R
#   + '       g   i     Lj; i)
BROKEN_MSGTF)mutates_CFGanalysis_onlyc                   8   <a  ] tR tRt o RtR tV3R ltRtV tR# )VTestParforsMisc.test_no_state_change_in_gufunc_lowering_on_error.<locals>.BreakParforsik  break_parforsc                2    \         P                  ! V 4       R # r[   )r1   r  r]   s   &rV   r  _TestParforsMisc.test_no_state_change_in_gufunc_lowering_on_error.<locals>.BreakParfors.__init__o  s    %%d+rY   c                .  < VP                   P                  P                  4        Fk  pVP                   FW  p\	        V\
        P                  P                  P                  4      '       g   K9   ! V3R  lR\        4      pV! 4       Vn
        KY  	   R# 	  R# )c                   .   <a  ] tR tRt o V3R ltRtV tR# )oTestParforsMisc.test_no_state_change_in_gufunc_lowering_on_error.<locals>.BreakParfors.run_pass.<locals>.Brokeni|  c                0   < \         P                  ! S4      hr[   )r   LoweringError)rS   otherrr  s   &&rV   
differencezTestParforsMisc.test_no_state_change_in_gufunc_lowering_on_error.<locals>.BreakParfors.run_pass.<locals>.Broken.difference~  s    *0*>*>z*J$JrY   r   N)r   rN   r   r   r  r   r   r   rr  s   @rV   Brokenr|  |  s     !K !KrY   r  TN)r  r  r  r  r   r   r  r  r  r   races)rS   r  blkr  r  rr  s   &&   rV   run_pass_TestParforsMisc.test_no_state_change_in_gufunc_lowering_on_error.<locals>.BreakParfors.run_passr  si     ==//668C #%dEMM,@,@,G,GHHK K
 *0DJ !)   9rY   r   N)	r   rN   r   r   _namer  r  r   r   r  s   @rV   BreakParforsrv  k  s     #E,   rY   r  c                   .   <a  ] tR tRt o V3R ltRtV tR# )^TestParforsMisc.test_no_state_change_in_gufunc_lowering_on_error.<locals>.BreakParforsCompileri  c                   < \         P                  ! V P                  4      pVP                  S\        4       VP                  4        V.# r[   )r/   define_nopython_pipeliner  add_pass_afterr2   finalize)rS   pmr  s   & rV   define_pipelinesoTestParforsMisc.test_no_state_change_in_gufunc_lowering_on_error.<locals>.BreakParforsCompiler.define_pipelines  s7    '@@L!!,?trY   r   N)r   rN   r   r   r  r   r   )r   r  s   @rV   BreakParforsCompilerr    s      rY   r  )r   pipeline_classc                  @    ^p \        ^4       F  pV ^,          p K  	  V # r  rR  )r   rI   s     rV   fooMTestParforsMisc.test_no_state_change_in_gufunc_lowering_on_error.<locals>.foo  s#    AAYQ HrY   N)r0   r1   r.   r   assertFalser   r  r  r^  r  r   r~  r   r  r  )rS   r  r  r  rr  r  s   &   @@rV   0test_no_state_change_in_gufunc_lowering_on_error@TestParforsMisc.test_no_state_change_in_gufunc_lowering_on_errord  s    
 "
	4u	=	 < 	  
>	 2	< 	 
t,@	A	 
B	 	--HHIv3344E 5 	j#f&6&6"78 	--HHI 54s   &DD 	c                  aa	  ! R  R\         P                  4      pV! R4      o	\        V4      ! \        P                  4        ! R R\
        4      p\        P                  ! V4      V	3R l4       p\        V4      R 4       p\        VRRR	/R
7      R 4       p\        R 4       o\        V3R l4       p\        P                  P                  P                  pV P                  V4        V! V! 4       4       V P                  \        P                  P                  P                  4       V\        P                  P                  n        R#   T\        P                  P                  n        i ; i)c                       ] tR tRtRtR# )2TestParforsMisc.test_issue_5098.<locals>.DummyTypei  r   Nr   rN   r   r   r   r   rY   rV   	DummyTyper        rY   r  my_dummyc                       ] tR tRtRtR# ).TestParforsMisc.test_issue_5098.<locals>.Dummyi  r   Nr  r   rY   rV   Dummyr    r  rY   r  c                    < S# r[   r   )valr  
dummy_types   &&rV   typeof_Dummy5TestParforsMisc.test_issue_5098.<locals>.typeof_Dummy  s	    rY   c                 H    \        VP                  P                  4       4      # r[   )r"   contextget_dummy_value)typobjr  s   &&&rV   unbox_index4TestParforsMisc.test_issue_5098.<locals>.unbox_index  s    qyy88:;;rY   method1r   T)jit_optionsc                     R  pV# )c                 (   R  p\        V4      p\        P                  ! V\        P                  R7      p\	        V4       F  pV! W,          V4      WV&   K  	  \	        V^,
          4       F$  pWV;;,          V! W,          V4      ,          uu&   K&  	  V# )c                     V P                  4       p\        P                  V\        P                  ! V 4      &   V! V4      # r[   )r   r   r  r\  )r   fr  s   && rV   bazPTestParforsMisc.test_issue_5098.<locals>._get_method1.<locals>._foo.<locals>.baz  s+    A%'VVAbhhqkNQ4KrY   r4  r  )r  r  r   r  length
output_arrr  s   &&&    rV   _fooCTestParforsMisc.test_issue_5098.<locals>._get_method1.<locals>._foo  sr     
 SXXfBJJ?
A$'$5JM (
+AMS%66M ,!!rY   r   )r  r  r   r  s   &&& rV   _get_method15TestParforsMisc.test_issue_5098.<locals>._get_method1  s    " KrY   c                 "    V P                  4       # r[   r2  )r  s   &rV   bar,TestParforsMisc.test_issue_5098.<locals>.bar  s    668OrY   c                 \   < V P                  \        P                  ! . RO. RO.4      S4      # )rf  rf  r  r  )r  r  r  )r  r   r  )rq  r  s   &rV   test1.TestParforsMisc.test_issue_5098.<locals>.test1  s"    99RXX&HI3OOrY   N)r   Opaquer   r#   OpaqueModelobjectr    registerr!   r   r   r   r  r  r^  r  )
rS   r  r  r  r  r  r  
save_stater  r  s
   &       @@rV   test_issue_5098TestParforsMisc.test_issue_5098  s=   	 	 z*
y!&"4"45	F 	 
		e	$	 
%	 
y		< 
	< 
IJt;L	M	 
N	  
	 
	 
	P 
	P ]]))DD
$	I%'NU]]11LLM ?IEMM  ;jEMM  ;s   )A E
 
!E+c           	        \        R R7      R 4       p\        RR4      ;_uu_ 4        V P                  \        P                  4      ;_uu_ 4       pV! ^ 4       RRR4       RRR4       \        XP                  4      pV P                  RV4       V P                  RV4       R#   + '       g   i     LS; i  + '       g   i     L^; i)Tr   c                 P    Rp^ p\        ^
4       F  pW!V ,          ,          pK  	  V# )r  )r  r  r  r  rR  )idxbig_tupr  r   s   &   rV   oversize_tupleMTestParforsMisc.test_oversized_tuple_as_arg_to_kernel.<locals>.oversize_tuple  s+    GABZS\!  HrY   NUMBA_PARFOR_MAX_TUPLE_SIZE3NzUse of a tuplezin a parallel region)r   r6   r  r   r  r  r  r   )rS   r  r  errstrs   &   rV   %test_oversized_tuple_as_arg_to_kernel5TestParforsMisc.test_oversized_tuple_as_arg_to_kernel  s    	t		 
	 !!>DD""6#A#ABBfq! C E V%%&&/,f5 CB EDs#   (B6	B#	B6#B3.B66C	c                    R  pRp\         P                  P                  RRVR7      p\         P                  P                  RRVR7      pV P                  WV4       R# )c                 T   ^ p\         P                  ! V P                  W P                  R7      pV P                  p\	        V^ ,          4       FW  p\	        V^,          4       F>  pWV3,          WV3,          ,
          WV3,          WV3,          ,           ,          W5V3&   K@  	  KY  	  V# r   r4  )r   fullr  r5  r   )img_nirimg_red	fillvalueout_imgdimsr  r   s   &&     rV   	ndvi_njit1TestParforsMisc.test_issue5167.<locals>.ndvi_njit  s    IgggmmYmmLG==DDG_QA&-dmgdm&C&-dmgdm&C&EGqDM ) % NrY   rf  g     @)lowr^  r7  N)r  r  )r   r  uniformr   )rS   r  
tile_shapearray1array2s   &    rV   test_issue5167TestParforsMisc.test_issue5167  sR    	 
""sz"J""sz"J

9f-rY   c                "   R  p\         R 4       p\        P                  P                  RR7      p\        RR7      ! V4      ! VP                  4       VR4      pV! VP                  4       VR4      p\        P                  P                  WE4       R# )c                 x   \         P                  ! V P                  ^ ,          V P                  ^ ,          3\         P                  R7      p\	        V P                  ^ ,          4       FO  p\        V^,           V P                  ^ ,          4       F$  pV! W,          W,          .VO5!  pWcWE3&   WcWT3&   K&  	  KQ  	  V# r  )r   r  r  r  r   r
  )r   r  	dist_argsr  r  r  rq  s   &&&    rV   
reproducer2TestParforsMisc.test_issue5065.<locals>.reproducer  s    XXqwwqz1771:6bjjIFAGGAJ'q1uaggaj1AQT144)4A#$14L#$14L 2 (
 MrY   c                     R p\        V P                  ^ ,          4       F&  pW V,          W,          ,
          ^,          ,          pK(  	  \        P                  ! V4      # )r]  )r
  r  r   rh  )r   r  r  r  s   &&  rV   	euclidean1TestParforsMisc.test_issue5065.<locals>.euclidean  sC    F1771:&Q4!$;1,, '776?"rY   r6  Tr   N)r3  r  r   )r   r   r  r   r   rh  )rS   r  r  r   r}  r~  s   &     rV   test_issue5065TestParforsMisc.test_issue5065  sx    	 
	# 
	# II&)D!*-affh	"Eaffh	"5


""31rY   c                    R  p\         P                  ! ^d4      \         P                  ! ^24      3pV P                  W4       R# )c                     ^ .\        V 4      ,          p\        \        V 4      4       F  p\        W,          4      W&   K  	  V# r  )r   r   )myarrayr  r  s   &  rV   test_numba_parallel;TestParforsMisc.test_issue5001.<locals>.test_numba_parallel  s7    S3w<'FCL)
O	 *MrY   N)r   r  r   )rS   r  r  s   &  rV   test_issue5001TestParforsMisc.test_issue5001  s0    	 88C=".

&0rY   c                l   a \         R  4       o\        RR7      V3R l4       pV! ^.3^,          4       R# )c                     R # r[   r   )gridss   &rV   r  +TestParforsMisc.test_issue3169.<locals>.foo      rY   Tr   c                 <   < \        ^4       F  pS! V 4       K  	  R# r  rR  )r  r   r  s   & rV   r  +TestParforsMisc.test_issue3169.<locals>.bar"  s    AYE
 rY   Nr  )rS   r  r  s   & @rV   test_issue3169TestParforsMisc.test_issue3169  s?    		 
	 
t		 
	
 	aSFQJrY   c                   a \        R R4      pV3R lp\        RR7      R 4       oV! RRR7      pV P                  W#4       R# )	mytyper   r   c                 P   < \        ^4       F  pS! W4       K  	  V P                  # r  )r   r   )mydatar   inners   & rV   outer-TestParforsMisc.test_issue4846.<locals>.outer/  s"    AYa  88OrY   T)nogilc                 :    WP                   3pWP                  3pR # r[   r   )r   r  r  r4  s   &&  rV   r  -TestParforsMisc.test_issue4846.<locals>.inner4  s    HHAHHArY   r   N)r   r   r   )rS   r  r	  r  r  s   &   @rV   test_issue4846TestParforsMisc.test_issue4846*  sI     Hj1	
 
D		 
	 #%

5!rY   c                .    R  pV P                  V4       R# )c                  b    Rp ^ p\        \        V 4      4       F  pWV,          ,          pK  	  V# )r  r2  r   r   )r   r   r  s      rV   test1b.TestParforsMisc.test_issue3748.<locals>.test1b?  s.    AACF^qT	 $HrY   Nr   )rS   r  s   & rV   test_issue3748TestParforsMisc.test_issue3748=  s    	 	

6rY   c                l    R  pRp\         P                  ! V\        R7      pV P                  WV4       R# )c                     \        V ^ ,          4       F5  p\        V ^,          4       F  pVR,          V,           W,          V&   K  	  K7  	  V# )r   g      @rR  )r7  r  r   r  s   &&  rV   parallel_test5TestParforsMisc.test_issue5277.<locals>.parallel_testJ  s@    DG_QA !C!CF1I ) % JrY   r4  NrP  )r   r  r  r   )rS   r  r7  r  s   &   rV   test_issue5277TestParforsMisc.test_issue5277H  s,    	 hht3'

=,rY   c                    \        R R7      R 4       p\        P                  ! R4      p^9p\        P                  ! R4      pV P                  V! W#V4      VP	                  W#V4      4       R# )Tr   c                 |    \        ^4       F  p\        ^4       F	  p^W#V3&   K  	  K  	  V'       d
   V^,          pV# r  r   r
  )r  methodr  r  r  s   &&&  rV   r  5TestParforsMisc.test_issue5570_ssa_races.<locals>.fooV  s<    AYqA !C1I "  qJrY   N)r3  r3  r  )r   r   r  ry  r  )rS   r  r  r   r  s   &    rV   test_issue5570_ssa_races(TestParforsMisc.test_issue5570_ssa_racesU  sa    	t		 
	 hhuohhvS!KKS)	
rY   c                    \        R R7      R 4       p\        P                  P                  ^ 4       \        P                  P                  R4      pV P	                  V! V4      VP                  V4      4       R# )Tr   c                 n    T p\        ^ ^
4       F  pWRR3,          pK  	  \        P                  ! X4      # r4  )r
  r   r  )r   packager  z_stacks   &   rV   find_maxima_3D_jitDTestParforsMisc.test_issue6095_numpy_max.<locals>.find_maxima_3D_jiti  s3    Gq"!A+. &66'?"rY   N)rO  rO  rO  )r   r   r  r  ry  r  )rS   r(  r   s   &  rV   test_issue6095_numpy_max(TestParforsMisc.test_issue6095_numpy_maxh  sc    	t		# 
	# 			qyy-t$&&t,	
rY   c                    R  p^p^p\         P                  ! W#3\         P                  R7      p\         P                  ! W#3\         P                  R7      pV P                  WV4       R# )c                     V P                   pV^ ,          p\        V4       F'  pWR3,          WR3&   W^ 3;;,          ^,          uu&   K)  	  V# r4  )r  r   )gggg_nextgsrq  i_ggs   &&   rV   r  3TestParforsMisc.test_issue5942_1.<locals>.test_implz  sM    B1Aq	$&QwKa a A%  " NrY   r4  N)r   r  r}  r   )rS   r  rq  r   r.  r/  s   &     rV   test_issue5942_1 TestParforsMisc.test_issue5942_1w  sM    	 ((A62884((A62884

9'*rY   c                8    R  p^p^pV P                  WV4       R# )c                 <   \         P                  ! W3\         P                  R 7      p\         P                  ! W3\         P                  R 7      p\        V 4       F>  p\	        V4       F  pWBWE3&   K
  	  W$R3,          W4R3&   W4^ 3;;,          ^,          uu&   K@  	  V# )r4  r   )r   r  r}  r   r
  )rq  r   r.  r/  r1  r  s   &&    rV   r  3TestParforsMisc.test_issue5942_2.<locals>.test_impl  s~    hhvrxx8Bhhvrxx8Gq	qA"&twK "$&QwKa a A% 	 " NrY   Nr   )rS   r  rq  r   s   &   rV   test_issue5942_2 TestParforsMisc.test_issue5942_2  s!    
	 

9#rY   c                    \        R R7      R 4       p\        P                  ! . RO. RO.4      pV P                  V! V4      VP	                  V4      4       R# )Tr   c                    \        V P                  ^ ,          4       F  p\        P                  p\        P                  ! . RO\        P
                  R7      pR Fc  p\        P                  P                  WR3,          V,           4      pWR8  g   K9  Tp\        P                  ! WDV.\        P
                  R7      pKe  	  WR3;;,          V,          uu&   K  	  V # )r   r4  r   )r   r   r   )r  r   rM   )r   r  r   r~  r  r  r}  norm)r  r   r  trr  dist_ts   &     rV   r  )TestParforsMisc.test_issue6102.<locals>.f  s    QWWQZ(vvXXirzz:#AYY^^A!eHqL9F}%XXqQirzzB	 $
 a%B ) HrY   N)r]  r]  r]  )r]  r]  rf  )r   r   r  ry  r  )rS   r  r  s   &  rV   test_issue6102TestParforsMisc.test_issue6102  sL     
t	
	 

	 HHlL12!aiil3rY   c                .    R  pV P                  V4       R# )c                      ^p \         P                  ! V 34      p\         P                  ! V ^,
          34      p\        \	        V4      4       F$  p\         P
                  ! WV^,            4      W#&   K&  	  V# rk  )r   r  r  r   r   r  )r  na_maskr  r  s       rV   r  1TestParforsMisc.test_issue6774.<locals>.test_impl  s[    AggqdmGXXq1uh'FCK(FF7QU#34	 )MrY   Nr   r!  s   & rV   test_issue6774TestParforsMisc.test_issue6774  s    	 	

9rY   c                .    R  pV P                  V4       R# )c                  F    \         P                  ! \        \        34      p V # r[   )r   r  _GLOBAL_INT_FOR_TESTING1_GLOBAL_INT_FOR_TESTING2)bufs    rV   r  9TestParforsMisc.test_issue4963_globals.<locals>.test_impl  s    ((46NOPCJrY   Nr   r!  s   & rV   test_issue4963_globals&TestParforsMisc.test_issue4963_globals  s    	 	

9rY   c                B   aa ^o^oVV3R lpV P                  V4       R# )r  c                  8   < \         P                  ! SS34      p V # r[   rv  )rL  _FREEVAR_INT_FOR_TESTING1_FREEVAR_INT_FOR_TESTING2s    rV   r  :TestParforsMisc.test_issue4963_freevars.<locals>.test_impl  s    ((57PQRCJrY   Nr   )rS   r  rR  rS  s   & @@rV   test_issue4963_freevars'TestParforsMisc.test_issue4963_freevars  s"    $&!$%!	 	

9rY   c                   a ^ RI HpHpHp \        P
                  R 4       o\        P
                  ! RRR7      V3R l4       pVP                  V! V! W3V! V4      .4      4      V! V4      34       R# )r   )ListTypeTupler  c                     R # r[   r   r  s   &rV   _sink>TestParforsMisc.test_issue_9182_recursion_error.<locals>._sink  r  rY   FT)r>  r   c                 .  < \        \        V4      4       F{  pV  Fr  pV^ ,          pV^,          pV^ 8X  d   V^ ,          pM3\        V4      ^8X  d   V^ ,          V^,          rvM\        V4      ^8X  d    V^8X  g   Kb  S! X4       S! X4       Kt  	  K}  	  R# r  r  )	clausesnodespiterclauseclause_typeclause_variablesclause_var_1clause_var_2r[  s	   &&      rV   _ground_node_ruleJTestParforsMisc.test_issue_9182_recursion_error.<locals>._ground_node_rule  s    
  E
+%F"()K'-ay$"a''7':-.!3,Q/,Q/ '3
 -.!3"a'l+l+! & ,rY   N)numba.typesrX  rY  r  r   r   compile)rS   rX  rY  r  rf  r[  s   &    @rV   test_issue_9182_recursion_error/TestParforsMisc.test_issue_9182_recursion_error  sp    55		 
	 
%$	/	, 
0	,. 	!!HTN;<=	
rY   c                t    \        R R7      R 4       pV P                  V! 4       VP                  4       4       R# )Tr   c                      ^ p \        ^4       F0  p\        ^4       F  p\        ^4       F  pV ^,          p K  	  K   	  K2  	  V # r  r  )rF  r  r  r  s       rV   r  8TestParforsMisc.test_lookup_cycle_detection.<locals>.foo  sC     CAYqA"1Xq & "  JrY   Nr  )rS   r  s   & rV   test_lookup_cycle_detection+TestParforsMisc.test_lookup_cycle_detection  s5     
t		 
	 	.rY   c                    R  p^p\         P                  ! RR7      ! V4      p\         P                  ! RR7      ! V4      pV P                  V! V4      V! V4      4       R# )c                     ^ p\         P                  ! V 4       FR  p\         P                  ! V4      pVR/p\        ^4       F  pWC;;,          ^,          uu&   K  	  WV,          ,          pKT  	  V# )r   r]  )r   r   r  r
  )	num_nodesr  
inode_uintinodeprI   s   &     rV   
issue_9678=TestParforsMisc.test_issue_9678_build_map.<locals>.issue_9678  s\    C#ll95
J/CLqAHMH "x 6 JrY   Fr   TN)r   jitr   )rS   rw  rs  issue_9678_serialissue_9678_parallels   &    rV   test_issue_9678_build_map)TestParforsMisc.test_issue_9678_build_map  sT    	 	!IIu5jA#ii6zB*95,Y7	9rY   r   N)#r   rN   r   r   rc  rO  rX  ra  ri  ro  r  r  r  r  r  r  r  r=   r  r  r  r"  r*  r3  r8  r>   r@  rF  rN  rU  rj  ro  r|  r   r   r   s   @rV   r:  r:    s     780K@	:Jx3Ij6$."22	1 " "$	-
&
+&$& 4 4&
%
N/ 9 9rY   r:  c                   r   a  ] tR tRt o R tR tR tRR ltR tR t	R	 t
R
 tR tR tR tR tR tRtV tR# )TestParforsDiagnosticsi  c                `    V P                   ! V.VO5!  w  rEV P                  ! WV.VO5/ VB  R # r[   r   r   s   &&*,  rV   r   TestParforsDiagnostics.check  rH  rY   c                l    V P                  V4      pV P                  V4      pV P                  W44       R # r[   )_fusion_equivalentr   )rS   r}  r~  r   r   s   &&&  rV   assert_fusion_equivalence0TestParforsDiagnostics.assert_fusion_equivalence  s0    ##C(##H-rY   c                    \        \        4      p\        VP                  4       4      p\	        VP                  4       4       F*  pW,           Uu. uF  qUV,
          NK  	  upW$V,
          &   K,  	  V# u upi r[   )r   r   r  keyssorted)rS   thingnewmin_keyr   r   s   &&    rV   r  )TestParforsDiagnostics._fusion_equivalent   s^     $ejjl#

%A5:X>XGX>CG &
  ?s   A2Nc                v   Ve    V P                  W!P                  4       4       Ve   V P                  W1P                  4       Ve   V P                  VVP                  4       VeQ   VP
                  P                  4       pV F0  pV F  p	V	^ ,          V8X  g   K   K  	  RV: RV: 2p
\        V
4      h	  Ve,   VP                  4       pV P                  V\        V4      4       \        4       ;_uu_ 4        \        ^^4       F  pVP                  V4       K  	  R R R 4       R #   + '       g   i     R # ; i)NzReplacement for z was not found. Had )r   count_parforsr  fusion_infonested_fusion_infor  r  r  hoisted_allocationsr   r4   r
  dump)rS   r  parfors_countr  r  r  r  replr   replacedr   hoisted_allocss   &&&&&&&     rV   assert_diagnostics)TestParforsDiagnostics.assert_diagnostics.  s    $],E,E,GH"**;8O8OP)**+=+6+I+IK#++224D! $H{a' !% IJ4PC(-- " *(<<>N0#n2EF 1a[  # ! s   8%D''D8	c                    R  pV P                  V4       V P                  VR4      pVP                  R,          pV P                  V^^^^./R7       R# )c                  n    ^
p \         P                  ! V 4      p\         P                  ! V 4      pW,           # r  r  r  r   r   s      rV   r  9TestParforsDiagnostics.test_array_expr.<locals>.test_implL  s(    A
AA5LrY   parfor_diagnostics)r  r  Nr   r   r   r  r  rS   r  r   r  s   &   rV   test_array_expr&TestParforsDiagnostics.test_array_exprK  sX    	 	

9&&y"5oo&:;1/01a&k 	  	;rY   c                    R  pV P                  V4       V P                  VR4      pVP                  R,          pV P                  V^R7       R# )c                  p    ^
p \         P                  ! V 4      p\        V 4       F  pV^
,          W&   K  	  V# r  r   r  r   )r  r   r  s      rV   r  5TestParforsDiagnostics.test_prange.<locals>.test_implY  s2    AAAY2v HrY   r  r  Nr   r  r  s   &   rV   test_prange"TestParforsDiagnostics.test_prangeX  sI    	 	

9&&y"5oo&:;1=rY   c                >   R pV P                  V4       V P                  VR4      pVP                  R,          pT P                  \        ;QJ d2    R VP
                   4       F  '       g   K   R4       R# 	  R4       R# ! R VP
                   4       4      4       R# )zEmake sure original user variable name is used in fusion info
        c                  H   ^
p \         P                  ! V 4      p\         P                  ! V4      p\         P                  ! W",          4      p^ p\	        V ^,
          4       F?  p\	        V ^,
          4       F&  pWCV,          W6^,           ,          ,           ,          pK(  	  KA  	  V# r  )r   r  sincosr   )r  r   r   r   rF  r  r  s          rV   r  ;TestParforsDiagnostics.test_user_varname.<locals>.test_implh  sv    A
Aq	AquACAE]AAQ4!E(?*C ' # JrY   r  c              3   @   "   T F  pR VP                   9   x  K  	  R# 5i)zslice(0, n, 1)N)rF  )r  r  s   & rV   r  ;TestParforsDiagnostics.test_user_varname.<locals>.<genexpr>y  s     R7Q! AII-7Qs   TFNr   )r   r   r  rU  anyfusion_reportsr  s   &   rV   test_user_varname(TestParforsDiagnostics.test_user_varnamee  s    		 	

9&&y"5oo&:; 	CR{7Q7QRCC	T	TR{7Q7QRR	TrY   c                    R  pV P                  V4       V P                  VR4      pVP                  R,          pV P                  V^^^./R7       R# )c                      ^
p \         P                  ! W 34      p\        V 4       F)  p\        V 4       F  pV^
,          V,           WV3&   K  	  K+  	  V# r  r  )r  r   r  r  s       rV   r  <TestParforsDiagnostics.test_nested_prange.<locals>.test_impl|  sM    A! AAYA"fqjAdG #  HrY   r  )r  r  Nr   r  r  s   &   rV   test_nested_prange)TestParforsDiagnostics.test_nested_prange{  sV    	 	

9&&y"5oo&:;145s8 	  	=rY   c                    R  pV P                  V4       V P                  VR4      pVP                  R,          pV P                  V^^^./R.R7       R# )c                  b    ^
p \         P                  ! V 4      p\         P                  ! V4      pV# r  )r   r  r  r  s      rV   r  CTestParforsDiagnostics.test_function_replacement.<locals>.test_impl  s&    A
A		!AHrY   r  )r  r  r  Nr   )r  r  r  r  s   &   rV   test_function_replacement0TestParforsDiagnostics.test_function_replacement  s]    	 	

9&&y"5oo&:;1-.H0C/E 	  	GrY   c                    R  pV P                  V4       V P                  VR4      pVP                  R,          pV P                  V^R7       R# )c                      ^
p \         P                  ! V ^,           4      p^ p\        V 4       F  pW!V,          ,          pK  	  V# r  r   r  r   r  r   rF  r  s       rV   r  8TestParforsDiagnostics.test_reduction.<locals>.test_impl  s;    AAACAYt JrY   r  r  Nr   r  r  s   &   rV   rM  %TestParforsDiagnostics.test_reduction  I    	 	

9&&y"5oo&:;1=rY   c                    R  pV P                  V4       V P                  VR4      pVP                  R,          pV P                  V^R7       R# )c                      ^
p \         P                  ! V ^,           4      p^ p\        V 4       F  pW!V,          ,
          pK  	  V# r  r  r  s       rV   r  >TestParforsDiagnostics.test_reduction_binop.<locals>.test_impl  s;    AAACAYaDj JrY   r  r  Nr   r  r  s   &   rV   test_reduction_binop+TestParforsDiagnostics.test_reduction_binop  r  rY   c                    R  pV P                  V4       V P                  VR4      pVP                  R,          pV P                  V^R7       R# )c                  @    ^
p \         P                  ! V 4      p^VR&   V# )rO  r   r  )r  r   s     rV   r  6TestParforsDiagnostics.test_setitem.<locals>.test_impl  s"    A
AAaDHrY   r  r  Nr   r  r  s   &   rV   test_setitem#TestParforsDiagnostics.test_setitem  sI    	 	

9&&y"5oo&:;1=rY   c                    R  pV P                  V4       V P                  VR4      pVP                  R,          pV P                  V^R7       R# )c                      ^
p ^p^ p\        V 4       F?  p\        P                  ! V34      p\        V4       F  pW4V&   K	  	  W$R,          ,          pKA  	  V# )rO  rM   )r   r   r  r
  )r  rJ  rF  r  tempr  s         rV   r  BTestParforsDiagnostics.test_allocation_hoisting.<locals>.test_impl  sU    AACAYxx~qAG "Bx	 
 JrY   r  )r  Nr   r  r  s   &   rV   test_allocation_hoisting/TestParforsDiagnostics.test_allocation_hoisting  sI    		 	

9&&y"5oo&:;CrY   r   )NNNNN)r   rN   r   r   r   r  r  r  r  r  r  r  r  rM  r  r  r  r   r   r   s   @rV   r  r    sP     M
$:;>T,=G>>
>D DrY   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )TestPrangeBasei  c                *   VP                   p\        VP                  4      pVfY   RVP                  9   g   Q h\        VP                   Uu. uF  pVR8w  d   TMRNK  	  up4      p\	        VP
                  4      pEM^VP                  P                  R4      p. p\        P                  ! V4       FT  p	V	P                  R8X  g   K  \        V	P                  4      V8X  g   K2  VP                  V	P                  ^,           4       KV  	  VP                  R4       \        V4      p\        V4      ^,
          p
\        P                   R9   d   ^V
^,          ,           p
M/\        P                   R9   d   M\#        \        P                   4      h\%        VP
                  4      p\        V4      \        V4      8:  g   Q hV F  pW,          pWV&   K  	  \	        V4      pVP'                  VVR7      p\(        P*                  ! V\-        4       4      pV# u upi )zw
This function does the actual code augmentation to enable the explicit
testing of `prange` calls in place of `range`.
r
  r   LOAD_GLOBAL)co_codeco_names))r  r"  )r  r  )r  r  )r     ))r  rO  )__code__r   r  r   bytesr  r  disBytecodeopnamerB   r  r   offsetr   rC   	PYVERSIONNotImplementedError	bytearrayreplacepytypesFunctionTypeglobals)rS   r   patch_instancepyfunc_codeprange_namesr   new_code	range_idxrange_locationsinstr
prange_idxr  r  prange_codepfuncs   &&&            rV   generate_prange_func#TestPrangeBase.generate_prange_func  s   
 ooK001! k22222 +6+?+?"A+?a ()G|!"A+?"A BL[001H $,,227;I Ok2<<=0+EII6)C'..u||a/?@ 3
 ) .L\*Q.J"FF*/2
J.)%//:: !4!45H~&#o*>>>>#%( * $ XH "))(3? * A $$[')<O"As   Hc                   VP                  RR4      pVP                  RR4      pVP                  RR4      pV P                  W4      p\        V Uu. uF  p\        P                  ! V4      NK  	  up4      p	V P                  W4      p
\        P                  ! RR7      ;_uu_ 4       p\        P                  ! R4       V P                  Wy4      pRRR4       V'       d   V P                  Wy4       V'       d    V P                  Wy4      p\        R	V/3/ VB pV P                  ! WX.VO5/ VB  X# u upi   + '       g   i     Ln; i)
a	  
The `prange` tester
This is a hack. It basically switches out range calls for prange.
It does this by copying the live code object of a function
containing 'range' then copying the .co_names and mutating it so
that 'range' is replaced with 'prange'. It then creates a new code
object containing the mutation and instantiates a function to contain
it. At this point three results are created:
1. The result of calling the original python function.
2. The result of calling a njit compiled version of the original
    python function.
3. The result of calling a njit(parallel=True) version of the mutated
   function containing `prange`.
The three results are then compared and the `prange` based function's
llvm_ir is inspected to ensure the scheduler code is present.

Arguments:
 pyfunc - the python function to test
 args - data arguments to pass to the pyfunc under test

Keyword Arguments:
 patch_instance - iterable containing which instances of `range` to
                  replace. If not present all instance of `range` are
                  replaced.
 scheduler_type - 'signed', 'unsigned' or None, default is None.
                   Supply in cases where the presence of a specific
                   scheduler is to be asserted.
 check_fastmath - if True then a check will be performed to ensure the
                  IR contains instructions labelled with 'fast'
 check_fastmath_result - if True then a check will be performed to
                         ensure the result of running with fastmath
                         on matches that of the pyfunc
 Remaining kwargs are passed to np.testing.assert_almost_equal


Example:
    def foo():
        acc = 0
        for x in range(5):
            for y in range(10):
                acc +=1
        return acc

    # calling as
    prange_tester(foo)
    # will test code equivalent to
    # def foo():
    #     acc = 0
    #     for x in prange(5): # <- changed
    #         for y in prange(10): # <- changed
    #             acc +=1
    #     return acc

    # calling as
    prange_tester(foo, patch_instance=[1])
    # will test code equivalent to
    # def foo():
    #     acc = 0
    #     for x in range(5): # <- outer loop (0) unchanged
    #         for y in prange(10): # <- inner loop (1) changed
    #             acc +=1
    #     return acc

r  Nr   Fcheck_fastmath_resultTr?  rA  r   )r   r  r   r   r   r   rH  rI  rJ  r   ra  r   r2  r   )rS   r   r   r   r  r   r  r  r   r   r   rN  r   
fastcpfuncs   &&*,          rV   prange_testerTestPrangeBase.prange_tester
  s   B  $4d;$4e< &

+BE J))&A d3dU\\!_d34!!&. $$D11_!!(+**56F 2
   , !77CJ+Z8CFCF$$VFLTLVL' 4 21s   D0'(D55E	r   N)r   rN   r   r   r  r  r   r   r   s   @rV   r  r    s     4l\ \rY   r  c                     a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tR t]P(                  ! R4      R 4       tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R  t#R! t$R" t%R# t&R$ t'R% t(R&t)V t*R'# )(TestPrangeBasicii  zTests Prange c                4    R  pV P                  VRRR7       R# )c                  p    ^p \         P                  ! V 4      p\        V 4       F  pRV,          W&   K  	  V# r  r  r   r  r
  r  s      rV   r  0TestPrangeBasic.test_prange01.<locals>.test_impln  s2    AA1XQw HrY   r   Tr   r   Nr  r!  s   & rV   test_prange01TestPrangeBasic.test_prange01m  #    	 	9Z*. 	 	0rY   c                4    R  pV P                  VRRR7       R# )c                      ^p \         P                  ! V ^,
          4      p\        ^V 4       F  pRV,          W^,
          &   K  	  V# r  r  r  s      rV   r  0TestPrangeBasic.test_prange02.<locals>.test_implx  s<    AQA1a[7a% !HrY   r   Tr	  Nr	  r!  s   & rV   test_prange02TestPrangeBasic.test_prange02w  r	  rY   c                4    R  pV P                  VRRR7       R# )c                  @    ^
p \        ^
4       F  pV ^,          p K  	  V # r  r  r	  r  s     rV   r  0TestPrangeBasic.test_prange03.<locals>.test_impl  #    A2YQ HrY   r   Tr	  Nr	  r!  s   & rV   test_prange03TestPrangeBasic.test_prange03  #    	
 	9Z*. 	 	0rY   c                4    R  pV P                  VRRR7       R# )c                  @    ^p \        ^
4       F  pV ^,          p K  	  V # r  r  r	  s     rV   r  3TestPrangeBasic.test_prange03mul.<locals>.test_impl  s#    A2YQ HrY   r   Tr	  Nr	  r!  s   & rV   test_prange03mul TestPrangeBasic.test_prange03mul  r	  rY   c                4    R  pV P                  VRRR7       R# )c                  @    ^dp \        ^
4       F  pV ^,          p K  	  V # rP  r  r	  s     rV   r  3TestPrangeBasic.test_prange03sub.<locals>.test_impl  s#    A2YQ HrY   r   Tr	  Nr	  r!  s   & rV   test_prange03sub TestPrangeBasic.test_prange03sub  r	  rY   c                4    R  pV P                  VRRR7       R# )c                  @    ^
p \        ^
4       F  pV ^,          p K  	  V # r  r  r	  s     rV   r  3TestPrangeBasic.test_prange03div.<locals>.test_impl  r	  rY   r   Tr	  Nr	  r!  s   & rV   test_prange03div TestPrangeBasic.test_prange03div  r	  rY   c                4    R  pV P                  VRRR7       R# )c                  ~    ^p ^p\         P                  ! ^4      p\        ^4       F  pW08X  d   WV&   K  ^ W#&   K  	  V# r  r   r  r
  r   r   r  r  s       rV   r  0TestPrangeBasic.test_prange04.<locals>.test_impl  sA    AAA1X6aDAD	 
 HrY   r   Tr	  Nr	  r!  s   & rV   test_prange04TestPrangeBasic.test_prange04  s#    		 	9Z*. 	 	0rY   c                4    R  pV P                  VRRR7       R# )c                      ^p \         P                  ! V \         P                  R7      p^ p\        ^V ^,
          ^4       F  pW!V,          ,          pK  	  V# r  r4  r   r  r  r
  r  r  r	  r  s       rV   r  0TestPrangeBasic.test_prange05.<locals>.test_impl  sG    A2::.AA1a!eQ'qT	 (HrY   r   Tr	  Nr	  r!  s   & rV   test_prange05TestPrangeBasic.test_prange05  #    	 	9Z*. 	 	0rY   c                4    R  pV P                  VRRR7       R# )c                      ^p \         P                  ! V \         P                  R7      p^ p\        ^^^4       F  pW!V,          ,          pK  	  V# r+	  r,	  r-	  s       rV   r  0TestPrangeBasic.test_prange06.<locals>.test_impl  sB    A2::.AA1a^qT	 $HrY   r   Tr	  Nr	  r!  s   & rV   test_prange06TestPrangeBasic.test_prange06  r1	  rY   c                4    R  pV P                  VRRR7       R# )c                      ^p \         P                  ! V \         P                  R7      p^ p\        V ^4       F  pW!V,          ,          pK  	  V# r+	  r,	  r-	  s       rV   r  0TestPrangeBasic.test_prange07.<locals>.test_impl  s@    A2::.AA1a[qT	 !HrY   r   Tr	  Nr	  r!  s   & rV   test_prange07TestPrangeBasic.test_prange07  r1	  rY   c                4    R  pV P                  VRRR7       R# )c                      ^p \         P                  ! V 4      p^ p\        \        V4      4       F-  p\        \        V4      4       F  pW!V,          ,          pK  	  K/  	  V# r  r   r  r
  r   r  r  rF  r  r  s        rV   r  0TestPrangeBasic.test_prange08.<locals>.test_impl  sO    AAC3q6]s1vAQ4KC ' # JrY   r   Tr	  Nr	  r!  s   & rV   test_prange08TestPrangeBasic.test_prange08  #    	 	9Z*. 	 	0rY   c                4    R  pV P                  VRRR7       R# )c                      ^p \         P                  ! V 4      p^ p\        ^4       F$  p\        ^4       F  pW!V,          ,          pK  	  K&  	  V# r  r   r  r
  r?	  s        rV   r  2TestPrangeBasic.test_prange08_1.<locals>.test_impl  sG    AAC1XqAQ4KC "  JrY   r   Tr	  Nr	  r!  s   & rV   test_prange08_1TestPrangeBasic.test_prange08_1  rC	  rY   c                8    R  pV P                  V^.RRR7       R# )c                  h    ^p ^ p\        V 4       F  p\        V 4       F  pV^,          pK  	  K   	  V# r  r  )r  rF  r  r  s       rV   r  0TestPrangeBasic.test_prange09.<locals>.test_impl  s8    AC1XqA1HC "  JrY   r   Tr  r   r   Nr	  r!  s   & rV   test_prange09TestPrangeBasic.test_prange09  s(    	 	9aS*4*. 	 	0rY   c                8    R  pV P                  V^ .RRR7       R# )c                  |    ^p ^ p\        V 4       F(  p^ p\        V 4       F  pV^,          pK  	  W,          pK*  	  V# r  r  )r  acc2r  acc1r  s        rV   r  0TestPrangeBasic.test_prange10.<locals>.test_impl  sD    AD1XqAAID "	 
 KrY   r   TrM	  Nr	  r!  s   & rV   test_prange10TestPrangeBasic.test_prange10  s(    	 	9aS*4*. 	 	0rY   z1list append is not thread-safe yet (#2391, #2408)c                4    R  pV P                  VRRR7       R# )c                  n    ^p \        V 4       Uu. uF  p\        P                  ! V4      NK  	  up# u upi r  )r
  r   r  )r  r  s     rV   r  0TestPrangeBasic.test_prange11.<locals>.test_impl
  s+    A',Qx0x!BFF1Ix000s   2r   Tr	  Nr	  r!  s   & rV   test_prange11TestPrangeBasic.test_prange11  s#    	1 	9Z*. 	 	0rY   c                4    R  pV P                  VRRR7       R# )c                      ^ p ^p\         P                  ! V4      p\        \        V4      ) 4       F  pWV,          ,          p K  	  V # r  r>	  )rF  r  r~  r  s       rV   r  0TestPrangeBasic.test_prange12.<locals>.test_impl  s=    CA
ACF7^t $JrY   r   Tr	  Nr	  r!  s   & rV   test_prange12TestPrangeBasic.test_prange12  s#    	 	9Z*. 	 	0rY   c                ^    R  pV P                  V\        P                  ! ^4      RRR7       R# )c                 @    ^ p\        V 4       F  pV^,          pK  	  V# r  r  r  s   &  rV   r  0TestPrangeBasic.test_prange13.<locals>.test_impl  s#    C1Xq JrY   r   Tr	  N)r  r   r}  r!  s   & rV   test_prange13TestPrangeBasic.test_prange13  s-    	
 	9bhhqk**. 	 	0rY   c                p    R  pV P                  V\        P                  P                  ^4      RRR7       R# )c                 l    ^p\        \        V 4      4       F  pWV,          ^,          ,          pK  	  V# r  r
  r   )r  r	  r  s   &  rV   r  0TestPrangeBasic.test_prange14.<locals>.test_impl%  s-    A3q6]qT!V #HrY   r   Tr	  N)r  r   r  r  r!  s   & rV   test_prange14TestPrangeBasic.test_prange14$  s3    	 	9biinnQ&7*4*. 	 	0rY   c                6    R  pV P                  VRRRR7       R# )c                 x    ^ p\        V 4       F(  p\        P                  ! R4      pWR,          ,          pK*  	  V# r   rB  rH  )r
  r   r  )r  rF  r  r   s   &   rV   r  0TestPrangeBasic.test_prange15.<locals>.test_impl4  s4    C1XGGFOw  JrY   r  r   Tr	  Nr	  r!  s   & rV   test_prange15TestPrangeBasic.test_prange151  s%    	 	9d:*. 	 	0rY   c                6    R  pV P                  VRRRR7       R# )c                 D    ^ p\        V ) V 4       F  pV^,          pK  	  V# r  r  r  rF  r  s   &  rV   r  0TestPrangeBasic.test_prange16.<locals>.test_impl?  s'    CA2q\q "JrY   r  r   Tr	  Nr	  r!  s   & rV   test_prange16TestPrangeBasic.test_prange16>  s%    	
 	9d8*. 	 	0rY   c                6    R  pV P                  V^	RRR7       R# )c                 |    ^ p\         P                  ! V 4      p\        V ) V 4       F  pWV,          ,          pK  	  V# r  rF	  r  rF  r~  r  s   &   rV   r  0TestPrangeBasic.test_prange17.<locals>.test_implH  s6    C
AA2q\t "JrY   r   Tr	  Nr	  r!  s   & rV   test_prange17TestPrangeBasic.test_prange17G  %    	 	9a*. 	 	0rY   c                6    R  pV P                  V^	RRR7       R# )c                     ^ p\         P                  ! V 4      p\        V ) ^4       F4  pWV,          ,          p\        RV 4       F  pWV,          ,          pK  	  K6  	  V# )r   rF	  )r  rF  r~  r  r  s   &    rV   r  0TestPrangeBasic.test_prange18.<locals>.test_implR  sS    C
AA2q\tr1AQ4KC & " JrY   r   Tr	  Nr	  r!  s   & rV   test_prange18TestPrangeBasic.test_prange18Q  %    	 	9a*. 	 	0rY   c                6    R  pV P                  V^	RRR7       R# )c                     ^ pV ^,           p\         P                  ! W34      p\        V ) V 4       F'  p\        V) V4       F  pWWE3,          ,          pK  	  K)  	  V# r  rF	  )r  rF  Mr~  r  r  s   &     rV   r  0TestPrangeBasic.test_prange19.<locals>.test_impl^  sW    CAAAA2q\r1AQT7NC & " JrY   r   Tr	  Nr	  r!  s   & rV   test_prange19TestPrangeBasic.test_prange19]  r	  rY   c                6    R  pV P                  V^	RRR7       R# )c                 z    ^ p\         P                  ! V 4      p\        RV 4       F  pWV,          ,          pK  	  V# )r   rM   rF	  rz	  s   &   rV   r  0TestPrangeBasic.test_prange20.<locals>.test_implj  s4    C
A2q\t "JrY   r   Tr	  Nr	  r!  s   & rV   test_prange20TestPrangeBasic.test_prange20i  r~	  rY   c                6    R  pV P                  V^	RRR7       R# )c                 B    ^ p\        RR4       F  pV^,          pK  	  V# )r   r  rM   r  rt	  s   &  rV   r  0TestPrangeBasic.test_prange21.<locals>.test_implt  s%    C2r]q #JrY   r   Tr	  Nr	  r!  s   & rV   test_prange21TestPrangeBasic.test_prange21s  s%    	
 	9a*. 	 	0rY   c                6    R  pV P                  VRRRR7       R# )c                      ^ p ^p\         P                  ! ^4      p\        R^4       F   pW08X  d   WV&   K  V^8  d   RW#&   K  ^W#&   K"  	  V# )r   r  rM   r$	  r%	  s       rV   r  0TestPrangeBasic.test_prange22.<locals>.test_impl}  sQ    AAA2q\6aDUADAD " HrY   r   Tr   r   r  Nr	  r!  s   & rV   test_prange22TestPrangeBasic.test_prange22|  s&    	 	9X*.d 	 	LrY   c                p    R  p\         P                  ! ^ 4      R,          pV P                  WRRRR7       R# )c                 D    \        \        V 4      4       F  pWV&   K	  	  V # r[   rh	  r  r  s   & rV   r  0TestPrangeBasic.test_prange23.<locals>.test_impl  s     3q6]! #HrY   NNr  r   Tr	  Nr   r  r  rS   r  r  s   &  rV   test_prange23TestPrangeBasic.test_prange23  s8    	 HHRL9
*.d 	 	LrY   c                p    R  p\         P                  ! ^ 4      R,          pV P                  WRRRR7       R# )c                 H    \        \        V 4      ) ^ 4       F  pWV&   K	  	  V # r  rh	  r	  s   & rV   r  0TestPrangeBasic.test_prange24.<locals>.test_impl  s%    CF7A&! 'HrY   r	  r   Tr	  Nr	  r	  s   &  rV   test_prange24TestPrangeBasic.test_prange24  s8    	 HHRL9*.d 	 	LrY   c           	     0   R  p\         P                  ! R4      pV P                  W^.RRRR7       V P                  V\        P
                  ! V4      34      pVP                  R,          pVP                  4       pV P                  \        V4      ^ 4       R# )c                     \        V 4      p\        V4       Uu. uF  p\        P                  ! V 4      NK  	  pp\        V4       F  pW,           W4&   K  	  V# u upi r[   )r   r
  r   
zeros_like)r  r  rI   rL  r  s   &    rV   r  0TestPrangeBasic.test_prange25.<locals>.test_impl  sM    AA-21X6X2==#XC61X J 7s   Ar   T)r  r   r   r  r  Nr  )
r   r  r  r   r   r   r  r  r   r   )rS   r  r  r   r  r  s   &     rV   test_prange25TestPrangeBasic.test_prange25  s    	 GGEN9!*4T15 	 	7 &&y5<<?2DEoo&:;$88:^,a0rY   c                p    R  p\         P                  ! ^ 4      R,          pV P                  WRRRR7       R# )c                 V    V R ,          p\        \        V4      4       F  pW!V&   K	  	  V # ):NNr  rh	  )r  r  r  s   &  rV   r  0TestPrangeBasic.test_prange26.<locals>.test_impl  s)    #A3q6]! #HrY   r	  r   Tr	  Nr	  r	  s   &  rV   test_prange26TestPrangeBasic.test_prange26  s8    	
 HHRL9
*.d 	 	LrY   c           
         R  pV P                  V\        P                  ! ^4      \        P                  ! . RO4      ^ ^.RRR7       R# )c                     \        V^ ,          ^,
          4       F;  p\        ^4       F)  p\        P                  ! W^,
          V^,            4      pK+  	  K=  	  ^ # r  )r
  r   abs)r   r   r  r  r   r  s   &&&   rV   r  0TestPrangeBasic.test_prange27.<locals>.test_impl  sE    1Q46]qAq1QqSz*A " # rY   r   TrM	  N)
r  r  r  r  r  r  r  r  r  r  )r  r   r  asarrayr!  s   & rV   test_prange27TestPrangeBasic.test_prange27  sD    	 	999R=::&;<+,#*4*. 	 	0rY   c           	         R  p\         P                  ! RR.RR.RR.RR.RR.RR..4      p\         P                  ! ^ ^.^^.^^.^^.^^..4      pV P                  WVRRRR7       R# )c                 
   \         P                  ! \        V4      4      p\        ^ \        V4      4       FJ  pW^ 3,          pW^3,          pW,          pW,          pWg,
          pV^ ,          V^,          ,           p	WV&   KL  	  V# r  )r   r  r   r
  )
r   r  r  r  i0r  Pt1Pt2r  vl2s
   &&        rV   r  0TestPrangeBasic.test_prange28.<locals>.test_impl  ss    ((3q6"CQA'AvYAvYeeIdQqTkC ( JrY   rf  r]  r   Tr	  N      )r   r  r  r/  s   &   rV   test_prange28TestPrangeBasic.test_prange28  s    
	 HHsCjRjRjCjRjRj" # HHq!f!f!f!f!f	  	9:*.d 	 	LrY   c                T    R  pV P                  VR4       V P                  VR4       R# )c                     ^ pV '       d   \        ^4       F  pV^,          pK  	  V# \        ^4       F  pV^,          pK  	  V# r  r  )r  r  r  s   &  rV   r  0TestPrangeBasic.test_prange29.<locals>.test_impl  sF    FqAaKF "
 M qAaKF "MrY   TFNr	  r!  s   & rV   test_prange29TestPrangeBasic.test_prange29  s)    	 	9d+9e,rY   c                    R  p\         P                  ! \         P                  ! ^ ^R4      4      p\         P                  ! . RO4      pV P                  WV^4       R# )c                 T   VP                   ^ ,          p\        V 4      p\        P                  ! W43\        P                  R7      p\        V 4      V,           ^,
          V,          p\        V4       F3  pWv,          pV^,           V,          p	WV	 VR,          ,          VRW13&   K5  	  V# )r   r4  r   )r  r   r   r  r  r
  )
r   par
numthreadsn_parn_xr  chunklenr  r(  r)  s
   &&&       rV   r  0TestPrangeBasic.test_prange30.<locals>.test_impl  s    IIaLEa&CXXul"**=FA+a/J>H:&A)()A(>q%*}% '
 MrY   rf  Nr  )r   r  r  r  )rS   r  r   r	  s   &   rV   test_prange30TestPrangeBasic.test_prange30  sD    	 HHRYYq!S)*hh'9a0rY   r   N)+r   rN   r   r   rc  r	  r		  r	  r	  r	  r 	  r'	  r/	  r5	  r:	  rA	  rH	  rN	  rU	  r  skiprZ	  r_	  rd	  rj	  rp	  rv	  r|	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r	  r   r   r   s   @rV   r  r  i  s     0000000	0	0	0
0
000 ]]FG0 H0	000
000
0
000L LL1"L0"L<-1 1rY   r  c                     W3# r[   r   r   s   &&rV   test_call_hoisting_outcallr	    s	    6MrY   c                     a  ] tR tRt o RtR tR tR tR t]	R 4       t
R tR	 t]P                  ! R
4      R 4       tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!]"R 4       t#Rt$V t%R # )!TestPrangeSpecifici  z3Tests specific features/problems found under prangec                0    R  pV P                  V^	4       R# )c                 d    ^ p\        V 4       F  pV^,          pV^
8  g   K  V^,          pK   	  V# r  r  r  r  r  s   &  rV   r  RTestPrangeSpecific.test_prange_two_instances_same_reduction_var.<locals>.test_impl  5    A1XQr6FA  HrY   Nr	  r!  s   & rV   ,test_prange_two_instances_same_reduction_var?TestPrangeSpecific.test_prange_two_instances_same_reduction_var  s    	 	9a(rY   c                   R  pV P                  \        P                  4      ;_uu_ 4       pV P                  V^	4       RRR4       RpV P	                  V\        XP                  4      4       R#   + '       g   i     L9; i)c                 d    ^ p\        V 4       F  pV^,          pV^
8  g   K  V^,          pK   	  V# r  r  r	  s   &  rV   r  KTestPrangeSpecific.test_prange_conflicting_reduction_ops.<locals>.test_impl#  r	  rY   NzBReduction variable c has multiple conflicting reduction operators.)r  r   UnsupportedErrorr  r   r  r  rS   r  r  r   s   &   rV   %test_prange_conflicting_reduction_ops8TestPrangeSpecific.test_prange_conflicting_reduction_ops"  s`    	 v66776y!, 8c3v//01	 87   A//A?	c                .    R  pV P                  V4       R# )c                      ^ ;r\        ^4       FE  pV^8X  d   V ^,          p K  \        P                  ! R4      pVR,          '       g   K<  V^,          pKG  	  W3# rn	  rm  )r  r  r   r   s       rV   r  LTestPrangeSpecific.test_prange_two_conditional_reductions.<locals>.test_impl3  sP    IA1X6FA(AwwQ  4KrY   Nr	  r!  s   & rV   &test_prange_two_conditional_reductions9TestPrangeSpecific.test_prange_two_conditional_reductions1  s    		 	9%rY   c                .    R  pV P                  V4       R# )c                  v    ^ p \        ^4       F'  p\        ^4       F  pV^ 8X  g   K  V ^,          p K  	  K)  	  V # r  r  )r  r   r  s      rV   r  CTestPrangeSpecific.test_prange_nested_reduction1.<locals>.test_impl@  s:    A1XqAAvQ "  HrY   Nr	  r!  s   & rV   test_prange_nested_reduction10TestPrangeSpecific.test_prange_nested_reduction1?  s    	 	9%rY   c                   R  pV P                  \        4      ;_uu_ 4       pV! 4        RRR4       V P                  VR4      pV P                  VR4      pV P	                  VR4      pV P                  \        4      ;_uu_ 4       pVP                  4        RRR4       VP                  4       pV P                  V^ ,          \        P                  4       R#   + '       g   i     L; i  + '       g   i     L\; i)c                  p    ^ p \         P                  ! V 4      p\        V 4       F  p^V,          W&   K  	  V# )    r  r  s      rV   r  <TestPrangeSpecific.test_check_error_model.<locals>.test_implK  s2    AA1X1u HrY   Nr   )	r  ZeroDivisionErrorr  r   r   r   r   r   r~  )rS   r  r  r  pcrespfcresr  s   &      rV   test_check_error_model)TestPrangeSpecific.test_check_error_modelI  s    	 011VK 2 )))T:%%eR0//r: 011V 2 ##%BFF+ 21 21s   CC)C&	)C9	c                   R  p\         P                  ! ^ 4      P                  ^^4      pV P                  WRRRR7       V P	                  VR4      p\        \        P                  ! V4      .4      pV P                  W44      pV P                  V4      pVP                  4        FO  w  rxVP                  4        F6  p	RV	9   g   K  Wy9   g   K  V P                  V	P                  R4      ^4        KM  	  KQ  	  R# )c                 V    \        \        V 4      4       F  pW,          p^VR&   K  	  V # ry  rh	  )r  r  r  s   &  rV   r  ?TestPrangeSpecific.test_check_alias_analysis.<locals>.test_impld  s+    3q6]D! # HrY   r   Tr	  Ndefinenoalias)r   r  r  r  r  r   r   r   r   r8  r^  rE  r   rY  )
rS   r  r  r  r   r   r_  r   r  rW  s
   &         rV   test_check_alias_analysis,TestPrangeSpecific.test_check_alias_analysisb  s    	
 HHRL  A&9
*.d 	 	L)))T:U\\!_%&--e9!!$'IIKDAt#	 $$TZZ	%:A> '  rY   c                   R  pV P                  \        P                  4      ;_uu_ 4       pV P                  VR4       RRR4       RpV P	                  V\        XP                  4      4       R#   + '       g   i     L9; i)c                 D    ^ p\        ^ V ^4       F  pV^,          pK  	  V# r  r  rt	  s   &  rV   r  JTestPrangeSpecific.test_prange_raises_invalid_step_size.<locals>.test_impl{  s'    C1a^q $JrY   r  Nz4Only constant step size of 1 is supported for prange)r  r   r  r  r   r  r  r	  s   &   rV   $test_prange_raises_invalid_step_size7TestPrangeSpecific.test_prange_raises_invalid_step_sizez  s^    	 v==>>&y$/ ?Dc3v//01 ?>r	  zEskip due to issue #10203: https://github.com/numba/numba/issues/10203c           	        R  pV P                  VRRR7       V P                  VR4      pV P                  VR4      pV P                  V4      pRpRp\        P
                  ! WeV3,          4      p\        P
                  ! RV: RV: R	V: 24      pR
p	VP                  ! 4        F  w  rWP                  P                  4       9   g   K%  VP                  4       p\        V4       FN  w  rVP                  V4      '       g   K  V P                  VP                  W^,           ,          4      4       Rp	 K  	  K  	  V P                  V	R4       R# )c                  P    ^p ^ p\        V 4       F  pWR,          ,          pK  	  V# )r#  r  r  r  s      rV   r  FTestPrangeSpecific.test_prange_fastmath_check_works.<locals>.test_impl  s*    AA1XW HrY   r   Tr	  Nz%[A-Z_0-9]?(.[0-9]+)+[.]?[i]?z)\s+%s = fmul fast double %s, 5.000000e-01z\s+z = fadd fast double z, Fz'fast instruction pattern was not found.r   )r  r  r   r8  rF  ri  r^  r   r   rE  r  r[  rU  )rS   r  r  r   r   _id
recipr_strreciprocal_inst	fadd_instfoundr  kernelrH  r  r   s   &              rV    test_prange_fastmath_check_works3TestPrangeSpecific.test_prange_fastmath_check_works  s    
	 	9Z*. 	 	0)))T:--eR8  &-A
**Z*%<=JJ"%sC 1 2	
 HHJLD||0022!,,.%h/DA&,,Q//	Q(HI $	 0	 ' 	HIrY   c                0    R  pV P                  V^4       R# )c                     \         P                  ! W 34      pV^ ,          p\        V 4       F  pV^,           W#&   K  	  VP                  4       # r  r   r  r
  r  )r  r   r   r  s   &   rV   r  8TestPrangeSpecific.test_parfor_alias1.<locals>.test_impl  s?    ! A!A1X1u 557NrY   Nr	  r!  s   & rV   test_parfor_alias1%TestPrangeSpecific.test_parfor_alias1  s    	 	9a(rY   c                0    R  pV P                  V^4       R# )c                     \         P                  ! W 34      p\        V 4       F'  pW,          p\        V 4       F  pW$,           W4&   K  	  K)  	  VP                  4       # r[   r
  )r  r   r  r   r  s   &    rV   r  8TestPrangeSpecific.test_parfor_alias2.<locals>.test_impl  sK    ! A1X$aQx!u    557NrY   Nr	  r!  s   & rV   test_parfor_alias2%TestPrangeSpecific.test_parfor_alias2  s    	 	9a(rY   c                0    R  pV P                  V^4       R# )c                     \         P                  ! W V 34      p\        V 4       FH  pW,          p\        V 4       F.  pW4,          p\        V 4       F  pW$,           V,           WV&   K  	  K0  	  KJ  	  VP                  4       # r[   r
  )r  r   r  r   r  r  r   s   &      rV   r  8TestPrangeSpecific.test_parfor_alias3.<locals>.test_impl  sf    !#A1X$aQx!DqA!$ "    557NrY   Nr	  r!  s   & rV   test_parfor_alias3%TestPrangeSpecific.test_parfor_alias3  s    	 	9a(rY   c                    R  pV P                  V^
^4      pV^ ,          pRpV P                  V\        VP                  4      4       R# )c                 .    \        V4       F  pT pK  	  X# r[   r  )r   r  r  r   s   &&  rV   r  8TestPrangeSpecific.test_parfor_race_1.<locals>.test_impl  s    1X HrY   zVariable k used in parallel loop may be written to simultaneously by multiple workers and may result in non-deterministic or unintended results.N)r  r   r  rF  )rS   r  rN  warning_objexpected_msgs   &    rV   test_parfor_race_1%TestPrangeSpecific.test_parfor_race_1  sJ    	 ,,YB?%a(F 	lC(;(;$<=rY   c                .    R pV P                  V4       R# )aY  issue 3686: if a prange has something inside it that causes
a nested parfor to be generated and both the inner and outer
parfor use the same call variable defined outside the parfors
then ensure that when that call variable is pushed into the
parfor that the call variable isn't duplicated with the same
name resulting in a redundant type lock.
c                  6   ^ p \         P                  p\        ^4       F4  pV! R4      pW! \         P                  ! ^4      4      ^ ,          ,          p K6  	  \        ^4       F4  pV! R4      pW! \         P                  ! ^4      4      ^ ,          ,          p K6  	  V # r   rf  )r   negativer
  r  )r  r  r  this_matterss       rV   r  GTestPrangeSpecific.test_nested_parfor_push_call_vars.<locals>.test_impl  s}    AA1X uQrxx|_Q''  1X uQrxx|_Q''  HrY   Nr	  r!  s   & rV   !test_nested_parfor_push_call_vars4TestPrangeSpecific.test_nested_parfor_push_call_vars  s    
	 	9%rY   c                    R p^p\         P                  ! W"V34      p\         P                  ! V\         P                  R7      pV P                  WV^ .R7       R# )zissue4903: a global is copied next to a parfor so that
it can be inlined into the parfor and thus not have to be
passed to the parfor (i.e., an unsupported function type).
This global needs to be renamed in the block into which
it is copied.
c                    \         P                  ! \        V4      4      p\         P                  ! \        V4      4      p\        ^4       Fy  pW,          p\        V4       F(  pV\         P                  ! WV3,          4      ,          pK*  	  \        V4       F(  pV\         P                  ! WV3,          4      ,          pK*  	  K{  	  W#3# r  )r   r  r   r
  ri  )zztclhlcr  ntr  s   &&     rV   r  ATestPrangeSpecific.test_copy_global_for_parfor.<locals>.test_impl  s    #b'"B#b'"B1XUrA"&&qD**B #rA"&&qD**B #	  6MrY   r4  r  N)r   r  r  r  )rS   r  rJ  r4
  r5
  s   &    rV   test_copy_global_for_parfor.TestPrangeSpecific.test_copy_global_for_parfor  sK    		 WWaAYWWQbgg&9"aSArY   c                0    R  pV P                  VR4       R# )c                 z    ^ p\         P                  p\        ^4       F  pV! R4      pW! V 4      ,          pK  	  V# r,
  )r   r-
  r
  )r  r  r  r  r.
  s   &    rV   r  GTestPrangeSpecific.test_multiple_call_getattr_object.<locals>.test_impl  s;    AA1X vQqT	  HrY   rf  Nr	  r!  s   & rV   !test_multiple_call_getattr_object4TestPrangeSpecific.test_multiple_call_getattr_object  s    	 	9c*rY   c                   R  p\         P                  ! ^
R\        3R\        3.R7      p\         P                  ! ^
R\        3R\        3.R7      p\         P                  ! ^
R\        3R\        3.R7      pVP	                  \         P
                  4      pVP	                  \         P
                  4      pVP	                  \         P
                  4      p\        V! V4      4      p\        \        V4      ! V4      4      p	\        VRR7      p
\        V
! V4      4      pV P                  W4       V P                  W4       R# )c                 Z    \        \        V 4      4       F  pR V P                  V&   K  	  V # r  )r
  r   r   )r  r  s   & rV   r  HTestPrangeSpecific.test_argument_alias_recarray_field.<locals>.test_impl  s&    3q6]A #HrY   r   r  r4  Tr   N)	r   r  r  r  viewrecarrayr   r   r   )rS   r  X1X2X3rg  rh  v3
python_resnjit_respa_funcpa_ress   &           rV   "test_argument_alias_recarray_field5TestPrangeSpecific.test_argument_alias_recarray_field  s    	 XXb#uSz <=XXb#uSz <=XXb#uSz <=WWR[[!WWR[[!WWR[[! )B-(
Y+,y40gbk".,rY   c                   a \         R 4       oV3R lpV! ^
4      p\        V4      ! ^
4      p\        VRR7      pV! ^
4      pV P                  W#4       V P                  W%4       R# )zissue3699: test that mutable variable to call in loop
is not hoisted.  The call in test_impl forces a manual
check here rather than using prange_tester.
c                Z    V R,          pV R,          ^,           pV P                  V4       V# )zvIf the variable X is hoisted in the test_impl prange
then subsequent list_check calls would return increasing
values.
rM   )r   )r~  r-  r   s   &  rV   
list_check>TestPrangeSpecific.test_mutable_list_param.<locals>.list_check(  s*     B%C"	AHHQKJrY   c                 B   < \        V 4       F  p^d.pS! V4      pK  	  X# rP  rR  )r  r  r~  r   rS
  s   &   rV   r  =TestPrangeSpecific.test_mutable_list_param.<locals>.test_impl2  s(    AYEqM  HrY   Tr   Nr   r   )rS   r  rK
  rL
  rM
  rN
  rS
  s   &     @rV   test_mutable_list_param*TestPrangeSpecific.test_mutable_list_param#  sf    
 
	 
		
 r]
	?2&y40.,rY   c                    R  p\         P                  ! . RO\        R7      \         P                  ! ^^.\        R7      .pV P                  W4       R# )c           	          \         P                  ! \        \        V 4      4       Uu. uF  p\        W,          4      NK  	  up4      # u upi r[   )r   r  r
  r   )r   r  s   & rV   r  DTestPrangeSpecific.test_list_comprehension_prange.<locals>.test_impl@  s1    88c!f>1SY>??>s   Ar4  N)r  r  r  )r   r  r  r  r  s   &  rV   test_list_comprehension_prange1TestPrangeSpecific.test_list_comprehension_prange>  s:    	@XXgS)"((Aa5*DE9(rY   c                ~    R  p\         P                  ! R\         P                  R7      pV P                  W^ ^ 4       R# )c                     \         P                  ! V P                  4      p\        V P                  ^ ,          4       F1  pW,          ^ ,          R,          pV^ 8X  d   ^ pV^ 8X  d   ^ pXWf.W4&   K3  	  V# )r   g     o@)r   r  r  r
  )imager   r   r  r  r  hs   &&&    rV   r  >TestPrangeSpecific.test_ssa_false_reduction.<locals>.test_implK  se    HHU[[)E5;;q>*HQK%'6A6Aq9 + LrY   r4  NrH  )r   r  r}  r  )rS   r  ra
  s   &  rV   test_ssa_false_reduction+TestPrangeSpecific.test_ssa_false_reductionE  s/    		 rxx09Q2rY   c                .    R  pV P                  V4       R# )c                      ^p \         P                  ! V \         P                  R7      p\        ^4       F  p^ .p^V^ &   V^ ,          W&   K  	  V# )r3  r4  )r   r  r  r
  )r  r   r   r~  s       rV   r  @TestPrangeSpecific.test_list_setitem_hoisting.<locals>.test_impl\  sK    A"((+A1XC!t  HrY   Nr	  r!  s   & rV   test_list_setitem_hoisting-TestPrangeSpecific.test_list_setitem_hoistingY  s    	 	9%rY   c                   R  p\         P                  ^,           pT P                  T\        V4       Uu. uF7  p\        P
                  ! \        P                  \        P                  R7      NK9  	  up^.R7       R# u upi )c                    \        \        V 4      4       Uu. uFM  p\        P                  ! \        P
                  \        P                  R 7      \        P                  ! ^4      3NKO  	  pp\        \        V 4      4       F1  pW,          p\        P                  ! ^4      pW5^ &   W,          V3W#&   K3  	  V^ ,          ^,          ^ ,          # u upi key_type
value_type)	r
  r   r   r  r   r  r  r   r  inputsrI   outputsr  r  r  s   &     rV   r  9TestPrangeSpecific.test_tuple_hoisting.<locals>.test_impli  s    jopstzp{j|}j|ef

EKKEMMRTVT\T\]^T_`j|G}3v;'IhhqkA$i-
	 (
 1:a=## ~s   ACrn
  r:
  N	r   r2  r  r
  r   r  r   r  r  rS   r  r  r  s   &   rV   test_tuple_hoisting&TestPrangeSpecific.test_tuple_hoistingg  o    	$ $$q(9kpqrks&tksfgtzz5;;SXS`S`'aks&t  GH  FI  	J&t   =A=
c                   R  p\         P                  ^,           pT P                  T\        V4       Uu. uF7  p\        P
                  ! \        P                  \        P                  R7      NK9  	  up^.R7       R# u upi )c                    \        \        V 4      4       Uu. uFM  p\        P                  ! \        P
                  \        P                  R 7      \        P                  ! ^4      3NKO  	  pp\        \        V 4      4       F9  pW,          p\        P                  ! ^4      pW5^ &   \        W,          V4      W#&   K;  	  V^ ,          ^,          ^ ,          # u upi rm
  )
r
  r   r   r  r   r  r  r   r  r	  rq
  s   &     rV   r  8TestPrangeSpecific.test_call_hoisting.<locals>.test_implw  s    jopstzp{j|}j|ef

EKKEMMRTVT\T\]^T_`j|G}3v;'IhhqkA7	3G
	 (
 1:a=## ~s   ACrn
  r:
  Nru
  rv
  s   &   rV   test_call_hoisting%TestPrangeSpecific.test_call_hoistingu  ry
  rz
  c                    \         P                  ! R \         P                  3.4      pR pR pV P                  V\         P                  ! ^VR7      V.R7       R# )rD  c                 @    \        ^4       F  p^W,          R&   K  	  R# )r  rD  Nr  )statesr  s   & rV   r  ?TestPrangeSpecific.test_record_array_setitem.<locals>.test_impl  s    1X#$	%  rY   c                 P    V ^ ,          R,          V^ ,          R,          8X  g   Q hR# )r   rD  Nr   r   s   &&rV   r  >TestPrangeSpecific.test_record_array_setitem.<locals>.comparer  s     Q4;!A$u+-.-rY   )r  r5  r  N)r   r5  r}  r  r  )rS   state_dtyper  r  s   &   rV   test_record_array_setitem,TestPrangeSpecific.test_record_array_setitem  sP    hh 123	%	/ 	988!;?/7j 	 	:rY   c                    \         P                  ! R \         P                  3.4      pR p\         P                  ! ^
VR7      pR pV P	                  VVV.R7       R# )r   c                 |    V P                   p\        V P                   4       F  p^V,           V R,          V&   K  	  V # )r  r   )r7  r
  )r
  r  r  s   &  rV   r  KTestPrangeSpecific.test_record_array_setitem_yield_array.<locals>.test_impl  s4    A6;;'!"QsA (MrY   r4  c                 D    \         P                  P                  W4       R # r[   r  r   s   &&rV   r  JTestPrangeSpecific.test_record_array_setitem_yield_array.<locals>.comparer  r  rY   r  N)r   r5  r  r  r  )rS   r
  r  r
  r  s   &    rV   %test_record_array_setitem_yield_array8TestPrangeSpecific.test_record_array_setitem_yield_array  sV    hhbgg/0	 "K0	* 	9!/7j 	 	:rY   c                2    R  pV P                  V^^4       R# )c                     \         P                  ! V 34      pV^8X  d0   \        V 4       F  pW#;;,          ^,          uu&   K  	  V^ ,          # \        V 4       F  pW#;;,          ^,          uu&   K  	  V^ ,          # r  r  )r7  caser  r  s   &&  rV   r  4TestPrangeSpecific.test_issue7501.<locals>.test_impl  sc    XXtg&FqytAINI %
 !9 tAINI %!9rY   Nr	  r!  s   & rV   test_issue7501!TestPrangeSpecific.test_issue7501  s    	 	9a+rY   c                p    R  p^p\         P                  P                  V4      pV P                  W4       R# )c                    R p\         P                  ! . RO4      pVP                  ^ ,          pV P                  ^ ,          p^ p\        V4       F  pW,          pWr,
          ^,          ) ^V^,          ,          ,          p\         P                  ! V4      p	WY\         P
                  ! W,          4      ,
          \         P
                  ! \         P                  ! \         P                  ! W,
          4      4      4      ,           ,          pK  	  V# )re  )r	  r  r  )r   r  r  r
  r  rg  r  ri  )
r~  r   pointsr  r  expsr  rv  rq  rJ  s
   &         rV   r  6TestPrangeSpecific.test_kde_example.<locals>.test_impl  s    AXX./FQA
AD1XDzAo%!ad(3FF1IBFF15M)BFF266"&&-3H,III	 
 KrY   N)r   r  r  r  )rS   r  r  r~  s   &   rV   test_kde_example#TestPrangeSpecific.test_kde_example  s.    	 IINN19(rY   c                Z    R  p\         P                  ! R4      pV P                  W4       R# )c                     \         P                  ! V 4      p\         P                  ! V 4      p\        \	        V 4      4       F  pVP                  4       W&   K  	  V# r[   )r   r	  r  r
  r   r  )r   r  r  r  s   &   rV   r  4TestPrangeSpecific.test_issue7578.<locals>.test_impl  sC    a A&&)C3q6]wwy # HrY   r  N)r   r  r  r  s   &  rV   test_issue7578!TestPrangeSpecific.test_issue7578  s$    	 IIcN9(rY   r   N)&r   rN   r   r   rc  r	  r	  r	  r	  r=   r	  r
  r
  r  r	  r
  r
  r
  r!
  r(
  r0
  r;
  r@
  rO
  rX
  r]
  rd
  ri
  rw
  r~
  r
  r
  r
  r
  r9   r
  r   r   r   s   @rV   r	  r	    s     >	)2&& , ,00
2 ]]Z["J \"JH))
)
>&*B.	+-,-6)3(&JJ::$,)& ) )rY   r	  c                   j   a  ] tR tRt o RtRtR tR tR tR t	R t
R	 tR
 tR tR tR tR tRtV tR# )TestParforChunksizingi  z2
Tests chunksize handling in ParallelAccelerator.
Fc                    \        ^ 4       R# r  r   r]   s   &rV   setUpTestParforChunksizing.setUp  
    q!rY   c                    \        ^ 4       R# r  r
  r]   s   &rV   tearDownTestParforChunksizing.tearDown  r
  rY   c                    V P                  \        4       ^ 4       \        ^4       V P                  \        4       ^4       \        ^ 4       V P                  \        4       ^ 4       R# r  )r   r   r   r]   s   &rV   $test_python_parallel_chunksize_basic:TestParforChunksizing.test_python_parallel_chunksize_basic  sN    /115q!/115q!/115rY   c                    V P                  \        4       ^ 4       \        ^4      ;_uu_ 4        V P                  \        4       ^4       RRR4       V P                  \        4       ^ 4       R#   + '       g   i     L,; ir  )r   r   r   r]   s   &rV   test_python_with_chunksize0TestParforChunksizing.test_python_with_chunksize  sW    /115""35q9 #/115 #"s   A--A=	c                    \         R  4       p\         R 4       pV P                  V! 4       ^ 4       V! ^4       V P                  V! 4       ^4       V! ^ 4       V P                  V! 4       ^ 4       R# )c                      \        4       # r[   )r   r   rY   rV   get_csHTestParforChunksizing.test_njit_parallel_chunksize_basic.<locals>.get_cs  s    )++rY   c                     \        V 4      # r[   r
  r  s   &rV   set_csHTestParforChunksizing.test_njit_parallel_chunksize_basic.<locals>.set_cs  s    )!,,rY   NrW
  )rS   r
  r
  s   &  rV   "test_njit_parallel_chunksize_basic8TestParforChunksizing.test_njit_parallel_chunksize_basic  sn    		, 
	, 
	- 
	- 	1%q	1%q	1%rY   c                    \         R  4       pV! ^4      w  r#pV P                  V^ 4       V P                  V^4       V P                  V^ 4       R# )c                     \        4       p\        ^4      ;_uu_ 4        \        4       pRRR4       \        4       pVXV3#   + '       g   i     L; i)r  N)r   r   )r   cs1cs2cs3s   &   rV   r  ATestParforChunksizing.test_njit_with_chunksize.<locals>.test_impl   s?    (*C#A&&,. '(*CS=  '&s   A  A	NrW
  )rS   r  r
  r
  r
  s   &    rV   test_njit_with_chunksize.TestParforChunksizing.test_njit_with_chunksize  sS    		! 
	! "!#a a a rY   c                $   \        RR7      R 4       pR Fw  p\        ^4       Fe  pV! V^,           V4      w  rEV P                  \        P                  ! V^8H  4      4       V P                  \        P                  ! V^ 8H  4      4       Kg  	  Ky  	  R# )zTest that all the iterations get run if you set the
chunksize.  Also check that the chunksize that each
worker thread sees has been reset to 0. Tr   c                 J   \         P                  ! V4      p\         P                  ! VR4      p\        P                  ! V 4      ;_uu_ 4        \        P
                  ! V4       F  p\        P                  ! 4       W4&   ^W$&   K   	  RRR4       W#3#   + '       g   i     Y#3# ; i)r  Ni)r   r  r  r   r   r   r   )csr  rf  inner_csr  s   &&   rV   r  LTestParforChunksizing.test_all_iterations_reset_chunksize.<locals>.test_impl  sz    ((1+Cwwq#H))"--aA"'">">"@HKCF ) . = 	 .- = s   9BB"	N)i  i  i  i  )r   r
  rU  r   all)rS   r  r  r  rf  r
  s   &     rV   #test_all_iterations_reset_chunksize9TestParforChunksizing.test_all_iterations_reset_chunksize  sy    
 
t		! 
	! 'A2Y )!A#q 1sby 12x1} 56  'rY   c                    V P                  \        4      ;_uu_ 4       p\        R  4       pV! 4        RRR4       RpV P                  V\	        XP
                  4      4       R#   + '       g   i     L9; i)c                      \        R4       R# )r  NrM   r
  r   rY   rV   neg_testMTestParforChunksizing.test_njit_parallel_chunksize_negative.<locals>.neg_test)  s
    &r*rY   N/chunksize must be greater than or equal to zero)r  r   r   r   r  r  )rS   r  r
  r   s   &   rV   %test_njit_parallel_chunksize_negative;TestParforChunksizing.test_njit_parallel_chunksize_negative&  s]    z**f+ + J + @c3v//01 +*s   A##A3	c                    V P                  \        4      ;_uu_ 4       p\        R4       RRR4       RpV P                  V\	        XP
                  4      4       R#   + '       g   i     L9; i)r  Nr
  rM   )r  r   r   r   r  r  rS   r  r   s   &  rV   'test_python_parallel_chunksize_negative=TestParforChunksizing.test_python_parallel_chunksize_negative2  sL    z**f"2& + @c3v//01	 +*   AA+	c                    V P                  \        P                  4      ;_uu_ 4       p\        R  4       pV! 4        RRR4       RpV P	                  V\        XP                  4      4       R#   + '       g   i     L9; i)c                      \        R 4       R# )invalid_typeNr
  r   rY   rV   r   MTestParforChunksizing.test_njit_parallel_chunksize_invalid_type.<locals>.impl<  s
    &~6rY   N)The parallel chunksize must be an integer)r  r   TypingErrorr   r   r  r  )rS   r  r   r   s   &   rV   )test_njit_parallel_chunksize_invalid_type?TestParforChunksizing.test_njit_parallel_chunksize_invalid_type:  sb    v1122f7 7 F 3 :c3v//01 32s   A--A=	c                    V P                  \        4      ;_uu_ 4       p\        R 4       RRR4       RpV P                  V\	        XP
                  4      4       R#   + '       g   i     L9; i)r
  Nr
  )r  	TypeErrorr   r   r  r  r
  s   &  rV   +test_python_parallel_chunksize_invalid_typeATestParforChunksizing.test_python_parallel_chunksize_invalid_typeE  sK    y))V">2 * :c3v//01	 *)r
  r   N)r   rN   r   r   rc  r   r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r
  r   r   r   s   @rV   r
  r
    sN      """66& ! 70
22	22 2rY   r
  c                      a  ] tR tRt o RtR t]]P                  R 4       4       t	]]P                  ! RR/R7      R 4       4       t
]]P                  ! RR/R7      R	 4       4       tR
tV tR# )TestParforsVectorizeriM  Fc                   VP                  R R4      pVP                  RR4      pVP                  RR4      pVP                  RR4      pRVR	V/p	. p
V	P                  4        F  w  rV
P                  \        W4      4       K!  	  V
^ ,          ;_uu_ 4        V
^,          ;_uu_ 4        \	        V Uu. uF  p\
        P                  ! V4      NK  	  up4      pV P                  VR
4      pVR8X  d   V P                  W4      pMV P                  W4      pV P                  V4      pV'       d   \        P                  ! R4      pVP                  VP                  P                  4       4      pV P!                  \#        V4      ^4       V P%                  V^ ,          V4       V P'                  V/ 4       VuuR
R
R
4       uuR
R
R
4       # u upi   + '       g   i     M; iR
R
R
4       R
#   + '       g   i     R
# ; i)r   Fcpu_namezskylake-avx512
assertionsTcpu_featuresz-prefer-256-bitNUMBA_CPU_NAMENUMBA_CPU_FEATURESNz%call\s+\w+\*\s+@do_scheduling_(\w+)\()r   r^  r   r6   r   r   r   r  r   r   rA  rF  ri  findallr   r   r   r   r   assertNotEqual)rS   r   schedule_typer   r   r   r
  r
  r
  env_opts	overridesr   r  r   r   pfunc_vectorizabler   asmschedtymatchess   &&&*,               rV   get_gufunc_asm$TestParforsVectorizer.get_gufunc_asmT  s   ::j%0::j*:;ZZd3
 zz.2CD$h(, 	NN$DA067 % q\\9Q<<$7$Qa$78C!%!:!:4!F4556HN,,-?E &&t,C**%MN!//$,,*C*C*EF''Ga8  ];##C,% (<\\7 (<\\\\s>   G)'
G	1GAG	,BG	2
G)G	GG))G:	c                \   R p\         P                  ! ^
4      pV P                  VRVRR7      pV P                  VRVRR7      pVP                  4        FL  pV P	                  RV9   4       T P	                  RV9   ;'       g    RV9   4       V P	                  R	V9   4       KN  	  VP                  4        Ft  pV P	                  RV9  4       V P	                  RV9  4       T P	                  R
V9   ;'       d    RV9  4       V P	                  RV9   4       V P	                  R	V9  4       Kv  	  R# )This checks that if fastmath is set and the underlying hardware
is suitable, and the function supplied is amenable to fastmath based
vectorization, that the vectorizer actually runs.
c                 ~    \        V 4      p^ p\        V4       F   pV\        P                  ! V4      ,          pK"  	  V# r  r   r
  r   rh  )r  r  rF  r  s   &   rV   will_vectorizeJTestParforsVectorizer.test_vectorizer_fastmath_asm.<locals>.will_vectorize  s5    AAC1Xrwwqz! JrY   r   Tr   Fvaddpdvsqrtpd__svml_sqrtzmmvsqrtsdvaddsdN)r   r  r
  r  rU  )rS   r
  r  fast_asmslow_asmr  s   &     rV   test_vectorizer_fastmath_asm2TestParforsVectorizer.test_vectorizer_fastmath_asmy  s   	 hhrl&&~z304 ' 6&&~z305 ' 7"A OOHM*OOIN@@mq.@AOOEQJ' # "AOOHA-.OOIQ./OOINEE}A/EFOOHM*OOEN+ #rY   NUMBA_BOUNDSCHECK0)envvarsc                6   R pR p\         P                  ! ^
4      pV P                  \        P                  4       V P                  VRVRR7      pV P                  VRVRR7      pVP                  4        F?  pV P                  RV9  4       V P                  RV9   4       V P                  R	V9  4       KA  	  VP                  4        FL  pT P                  RV9   ;'       g    R
V9   4       V P                  RV9   4       V P                  R	V9   4       KN  	  R# )r
  c                     \        V 4      p\        V) ^ 4       F!  p\        P                  ! W,          4      W&   K#  	  V # r  r
  r  r  r  s   &  rV   will_not_vectorizeTTestParforsVectorizer.test_unsigned_refusal_to_vectorize.<locals>.will_not_vectorize  s3    AAA2q\wwqt} "HrY   c                 |    \        V 4      p\        V4       F!  p\        P                  ! W,          4      W&   K#  	  V # r[   r
  r  s   &  rV   r
  PTestParforsVectorizer.test_unsigned_refusal_to_vectorize.<locals>.will_vectorize  s/    AA1Xwwqt} HrY   r   Tr
  r   r
  r  r   r
  vmovupdN)r   r  r  r   BOUNDSCHECKr
  r  rU  )rS   r  r
  r  	novec_asmvec_asmr  s   &      rV   "test_unsigned_refusal_to_vectorize8TestParforsVectorizer.test_unsigned_refusal_to_vectorize  s   		 hhrl 	++,''(:Hc15 ( 7	 %%nj#15 & 7 !!#AOOIQ./OOIN+OOEN+ $ !A OOIN@@mq.@AOOIN+OOEQJ' "rY   c                `   R pR pV P                  \        P                  4       V P                  VRRR7      pV P                  VRRR7      pR pVP	                  4        F  w  rgV! V4      p M	  VP	                  4        F  w  rgV! V4      p	 M	  ^ RIHp
 V P                  \        X4      \        X	4      4       \        W4       Fb  w  rW8X  d   K  V
! R	 W4      pVP                  4       pV F5  pV^ ,          R
8X  g   K  V P                  WR,          VR,           R4       K7  	  Kd  	  R# )zThis checks vectorization for signed vs unsigned variants of a
trivial accumulator, the only meaningful difference should be the
presence of signed vs. unsigned unpack instructions (for the
induction var).
c                  F    R p Rp\        V ) ^ 4       F  pW,          pK  	  V# i   r]  r  r  s      rV   signed_variantMTestParforsVectorizer.test_signed_vs_unsigned_vec_asm.<locals>.signed_variant  s*    AAA2q\ "HrY   c                  B    R p Rp\        V 4       F  pW,          pK  	  V# r  r  r  s      rV   unsigned_variantOTestParforsVectorizer.test_signed_vs_unsigned_vec_asm.<locals>.unsigned_variant  s&    AA1X HrY   r   Tr
  r   c                 `   . pV P                  4        F  pVP                  4       pVR 8w  g   K  VP                  R4      '       d   K5  VP                  R4      '       d   KN  VP                  R4      '       d   Kg  RV9   d   Kp  VP                  \        P
                  ! RR V4      4       K  	  V# ) rH   rI   "r1  z[	])rE  strip
startswithr   rF  sub)r
  rF  r   spds   &   rV   strip_instrsKTestParforsVectorizer.test_signed_vs_unsigned_vec_asm.<locals>.strip_instrs  s    C^^%ggi "9cnnS&9&9(+s(;(;(+s(;(;(?3(F

266&"c#:; & JrY   )SequenceMatcherc                     V R 8H  # )	r   r  s   &rV   r:  GTestParforsVectorizer.test_signed_vs_unsigned_vec_asm.<locals>.<lambda>  s    drY   insertr  Nr  rM   )r  r   r  r
  r^  difflibr(  r   r   r   get_opcodes)rS   r  r  
signed_asmunsigned_asmr&  r   r  signed_instrunsigned_instrsmr   r   r	  rW  rZ  s   &               rV   test_signed_vs_unsigned_vec_asm5TestParforsVectorizer.test_signed_vs_unsigned_vec_asm  s+   		 	++,((59 ) ;
**+;Z59 + ;	 $$&DA'?L ' !&&(DA)!_N ) 	2 	\*C,?@5DAv*A1mmoB!u(((b6"R&)93?  6rY   r   N)r   rN   r   r   r   r
  r7   r3   run_test_in_subprocessr  r  r4  r   r   r   s   @rV   r
  r
  M  s     
 "#J $$%, % %,N $$.A3-GH)( I )(V  $$.A3-GH=@ I =@rY   r
  c                   6   a  ] tR tRt o RtR tR tR tRtV t	R# ) TestParforReductionSetNumThreadsi  zCTest execution correctness on reductions with set_num_threads.
    c                   aa \         P                  p^V,          oV^,
          o\        RR7      VV3R l4       pVP                  S4      pV! S4      pV P	                  W44       R# )r  Tr   c                    < ^ p\        V 4       \        S4       F0  p^VS,          ,           p\        V4       \        4       pW,          pK2  	  V# r  r   r   r   nthreadsrF  r  
local_maskgntr	  masks   &    rV   udt6TestParforReductionSetNumThreads.test_add.<locals>.udt  I    CH%AYT\

+%'
	 
 JrY   Nr   r2  r   r  ry  rS   r  rA  expectr}  r	  r@  s   &    @@rV   test_add)TestParforReductionSetNumThreads.test_add  ^    $$E1u	t		 
	 T"$i,rY   c                   aa \        ^\        P                  4      p^V,          oV^,
          o\        RR7      VV3R l4       pVP	                  S4      pV! S4      pV P                  W44       R# )r  Tr   c                    < ^p\        V 4       \        S4       F0  p^VS,          ,           p\        V4       \        4       pW,          pK2  	  V# r  r;  r<  s   &    rV   rA  6TestParforReductionSetNumThreads.test_mul.<locals>.udt2  rC  rY   N)r  r   r2  r   r  ry  rE  s   &    @@rV   test_mul)TestParforReductionSetNumThreads.test_mul+  sg     6++,E1u	t		 
	 T"$i,rY   c                   aa \         P                  p^V,          oV^,
          o\        RR7      VV3R l4       pVP                  S4      pV! S4      pV P	                  W44       R# )r  Tr   c                    < ^p\        V 4       \        S4       F3  p^VS,          ,           p\        V4       \        4       p\        W4      pK5  	  V# r  )r   r   r   r  r<  s   &    rV   rA  6TestParforReductionSetNumThreads.test_max.<locals>.udtF  sK    CH%AYT\

+%'#m	 
 JrY   NrD  rE  s   &    @@rV   r  )TestParforReductionSetNumThreads.test_maxA  rI  rY   r   N)
r   rN   r   r   rc  rG  rM  r  r   r   r   s   @rV   r8  r8    s     -(-,- -rY   r8  c                   N   a  ] tR tRt o ]P
                  ! 4       R 4       tRtV tR# )TestDiagnosticEnvVariV  c                    R \         P                  R&   \        4       ;_uu_ 4       p\        RR7      R 4       pV! 4        RRR4       XP	                  4       pV P                  RV4       R#   + '       g   i     L4; i)4NUMBA_PARALLEL_DIAGNOSTICSTr   c                      ^dp \         P                  ! V \         P                  R7      p\        V 4       F  p^W&   K	  	  V# )rQ  r4  )r   r  r  r   )r  r   r  s      rV   r   <TestDiagnosticEnvVar.test_diagnostics_env_var1.<locals>.impl\  s5    HHa

3AAD #rY   NzParallel Accelerator Optimizing)r8  r9  r4   r   rU  r   )rS   rV  r   
the_outputs   &   rV   test_diagnostics_env_var1.TestDiagnosticEnvVar.test_diagnostics_env_var1X  se    14

/0&4  ! F  __&
7D s   A,,A<	r   N)	r   rN   r   r   r3   r6  r[  r   r   r   s   @rV   rT  rT  V  s"     $$&E 'ErY   rT  __main__)i386x86_64r  r[   )r  r8  rF  r  r   r   r6  
subprocessr   r  rH  	functoolsr   r  r   numpy.randomr   r  collectionsr   r   r   	itertoolsr	   r
   r:  numba.parfors.parforr   r   r   r   r   r   r   r   r   
numba.corer   r   r   r   r   r   r   r   numba.typedr   r   numba.extendingr   r   r    r!   r"   r#   numba.core.registryr$   numba.core.annotationsr%   numba.core.ir_utilsr&   r'   r(   r)   r*   r+   r,   numba.np.unsafe.ndarrayr-   r  numba.core.compilerr.   r/   numba.core.compiler_machineryr0   r1   numba.core.typed_passesr2   numba.tests.supportr3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   numba.core.extendingrA   numba.core.bytecoderB   rC   rD  r  rE   r  r   x86_onlyrJ  rK  r   r   r   ry  r  r  r  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  rE  rU  r  r  r:  r  r  r  r	  r	  r
  r
  r8  rT  r   mainr   rY   rV   <module>ru     s    	 	 
   
        /  "  = = =Q Q Q "F F * 3; ; ; C B E 2@ @ @ @ 2 4    : : :z ??8++-5GGY  ,.@A	 ^h ^ ^B	 ?B	A$"D
 D	
!6 
! h@o h@ h@V 'Ko 'K 'KT VOo VO VOr2X 2, x/ x xv! # # #4 f% f% f%R	 "; "; ";J :M :M :Mz B9o B9 B9J zD_ zD zDzT_ Tn a1n a1 a1H   |) |) |)| w2H w2 w2t 	A@N A@ 
 A@H ?-x ?- ?-D E8 E E$ zMMO rY   