
    wir                        d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
Z
d dlZd dlmZ d dlmZ d dlZd dlmZ d dlmZ d dlmZ d dlmZmZmZmZmZ d dlm Z  d dl!m"Z" d d	l#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z- d d
l.m/Z/ 	 d dl0Z0n# e1$ r dZ0Y nw xY wd Z2 e2            Z3dZ4 e	j5        e3e4          Z6d Z7d Z8d Z9d Z:d Z;d Z< G d de$e%          Z=d Z> G d de%          Z? G d de?          Z@ G d de@          ZA G d de@          ZB G d de@          ZCe+ G d  d!e@                      ZD G d" d#e@          ZE G d$ d%e?          ZFe* G d& d'e	j%                              ZGd( ZH G d) d*e	j%                  ZI G d+ d,e?          ZJ G d- d.e          ZK G d/ d0e%          ZL G d1 d2e%          ZMeNd3k    r e	jO                     dS dS )4    N)Path)floor)njit)codegen)UserWideCacheLocatorZipCacheLocatorFunctionCacheInTreeCacheLocatorInTreeCacheLocatorFsAgnostic)NumbaWarning)parfor)
SerialMixinTestCasecapture_cache_logimport_dynamicoverride_configrun_in_new_process_cachingskip_if_typeguardskip_parfors_unsupportedtemp_directoryoverride_env_config)
cpu_targetc                  H   t          d          } t          j                            | d          }t          j        |           t          t          j                            |d          d          5 }|                    d           d d d            n# 1 swxY w Y   t          j        |d           	 t          t          j                            |d          d          5 }|                    d           d d d            n# 1 swxY w Y   	 t          j        |d	           t          j	        |           d
S # t          $ r- Y t          j        |d	           t          j	        |           dS w xY w# t          j        |d	           t          j	        |           w xY w)N
test_cachewritable_testwrite_okwtcheck1@  write_forbiddencheck2i  FT)r   ospathjoinmkdiropenwritechmodshutilrmtreePermissionError)tempdirtest_dirfs      h/root/.openclaw/workspace/chatterbox_venv_py311/lib/python3.11/site-packages/numba/tests/test_caching.pycheck_access_is_preventabler0   3   s    \**GWo66HHX	bgll8Z00$	7	7 1	               HXu "',,x):;;TBB 	aGGH	 	 	 	 	 	 	 	 	 	 	 	 	 	 	  	5!!!h     
5!!!h 	5!!!hsZ   2BBB5.D< #D9D< D		D< D	D< <
E3E6 2E33E6 6+F!z9Cannot create a directory to which writes are preventablec                  (    d} t          |           | fS )Nabcd)hash)cs    r/   constant_unicode_cacher5   W   s    A77A:    c                      t           }  t          d          |           } |             \  }} |            \  }}||k    sJ ||k    sJ d S NTcache)r5   r   )pyfunccfuncexp_hvexp_strgot_hvgot_strs         r/   check_constant_unicode_cacherA   \   sg    #FDtV$$EfhhOFGeggOFGVgr6   c                      dddS )N      )ab rG   r6   r/   
dict_cacherH   e   s    r6   c                  ~    t           }  t          d          |           } |             } |            }||k    sJ d S r8   )rH   r   r;   r<   expgots       r/   check_dict_cacherM   i   sH    FDtV$$E
&((C
%''C#::::::r6   c               #      K   dD ]} | V  d S )N)rC   rD      rG   )vs    r/   generator_cacherQ   q   s*         r6   c                      t           }  t          d          |           }t           |                       }t           |                      }||k    sJ d S r8   )rQ   r   listrJ   s       r/   check_generator_cacherT   v   sT    FDtV$$E
vvxx..C
uuww--C#::::::r6   c                   ,    e Zd Zd Zd Zd Zd Zd ZdS )TestCachingc                 p     |             t          |          }|                     |d         d           d S )Nexitcoder   )r   assertEqual)selffuncress      r/   run_testzTestCaching.run_test   s:    (..Z!,,,,,r6   c                 :    |                      t                     d S N)r]   rA   rZ   s    r/   test_constant_unicode_cachez'TestCaching.test_constant_unicode_cache   s    233333r6   c                 :    |                      t                     d S r_   )r]   rM   r`   s    r/   test_dict_cachezTestCaching.test_dict_cache   s    &'''''r6   c                 :    |                      t                     d S r_   )r]   rT   r`   s    r/   test_generator_cachez TestCaching.test_generator_cache   s    +,,,,,r6   c                    t          | j        j                  }t          j                    }|                                }|                    t          ||df          }|                                 |	                                 |
                                \  }}|s|                     |           |                     |dd           |                    t          ||df          }|                                 |	                                 |
                                \  }}|s|                     |           |                     |dd           d S )NFtargetargs  z-Omitted function returned an incorrect outputT)r   	__class____name__multiprocessingget_contextQueueProcessomitted_child_test_wrapperstartr$   getfailrY   )rZ   	cache_dirctxresult_queueprocsuccessoutputs          r/   test_omittedzTestCaching.test_omitted   sc    #4>#:;;	)++yy{{{{-	51  
 
 	

		&**,,  	IIf;	
 	
 	
 {{-	40  
 
 	

		&**,,  	IIf;	
 	
 	
 	
 	
r6   N)rl   
__module____qualname__r]   ra   rc   re   r{   rG   r6   r/   rV   rV   ~   s_        - - -
4 4 4( ( (- - -(
 (
 (
 (
 (
r6   rV   c                 D   t          d|          5  t          d          dd            }	  |            }|rM|j        |j        d                  dk    s
J d            |j        |j        d                  dk    s
J d	            nL|j        |j        d                  dk    s
J d
            |j        |j        d                  dk    s
J d            d}n#  t          j                    }d}Y nxY w|                     ||f           d d d            d S # 1 swxY w Y   d S )N	CACHE_DIRTr9   rj   c                     | S r_   rG   )nums    r/   testz(omitted_child_test_wrapper.<locals>.test   s    Jr6   r   rC   zCache did not hit as expectedzCache has an unexpected misszCache did not miss as expectedzCache has an unexpected hitF)rj   )r   r   _cache_hits
signatures_cache_misses	traceback
format_excput)rw   ru   second_callr   rz   ry   s         r/   rq   rq      s   	i	0	0 , ,	D				 	 	 
			TVVF  	2'(:;q@@@3 A@@)$/!*<=BBB2 CBBB )$/!*<=BBB4 CBB'(:;q@@@1 A@@GG	)++FGGG'6*+++1, , , , , , , , , , , , , , , , , ,s)   DB'CDC.,DDDc                   @    e Zd ZdZdZd Zd Zd Zd Zd Z	d Z
d ZdS )	BaseCacheTestNc                    t          d          | _        t          j                            d| j                   t
          j                            | j        | j        dz             | _        t
          j                            | j        d          | _	        t          j        | j        | j                   t          j        | j        t          j        t          j        z             d | _        d S )Nr   r   z.py__pycache__)r   r,   sysr#   insertr"   r$   modnamemodfileru   r)   copyusecases_filer(   statS_IREADS_IWRITEmaxDiffr`   s    r/   setUpzBaseCacheTest.setUp   s    %l334<(((w||DL$,2FGGdlMBBD&555
t|dm;<<<r6   c                     t           j                            | j        d            t           j                            | j                   d S r_   )r   modulespopr   r#   remover,   r`   s    r/   tearDownzBaseCacheTest.tearDown   s6    d+++%%%%%r6   c                 F   t           j                            | j        d           }|2|j        g}|D ]'}	 t          j        |           # t          $ r Y $w xY wt          | j                  }| 	                    |j
                            d          | j                   |S )Nco)r   r   r   r   
__cached__r"   unlinkFileNotFoundErrorr   rY   __file__rstripr   )rZ   oldcachedfnmods        r/   import_modulezBaseCacheTest.import_module   s     koodlD11?n%F  IbMMMM(   DT\**,,T22DLAAA
s   A


AAc                 n    	 d t          j        | j                  D             S # t          $ r g cY S w xY w)Nc                 <    g | ]}|                     d           |S ))z.pycz.pyo)endswith).0r   s     r/   
<listcomp>z0BaseCacheTest.cache_contents.<locals>.<listcomp>   s9     : : :2;;'788:B : : :r6   )r"   listdirru   r   r`   s    r/   cache_contentszBaseCacheTest.cache_contents   sW    	: :DN!;!; : : : :  	 	 	III	s   "% 44c                 x     t           fdt                                                     D                       S )Nc              3      K   | ]H}|t           j                            t           j                            j        |                    fV  Id S r_   )r"   r#   getmtimer$   ru   )r   r   rZ   s     r/   	<genexpr>z1BaseCacheTest.get_cache_mtimes.<locals>.<genexpr>   s^       = = ))"',,t~r*J*JKKL = = = = = =r6   )dictsortedr   r`   s   `r/   get_cache_mtimeszBaseCacheTest.get_cache_mtimes   sO     = = = =$T%8%8%:%:;;= = = = = 	=r6   c                 v    |                                  }|                     t          |          ||           d S r_   )r   rY   len)rZ   nr4   s      r/   check_pycachezBaseCacheTest.check_pycache  s7    !!QA&&&&&r6   c                     d S r_   rG   r`   s    r/   
dummy_testzBaseCacheTest.dummy_test  s    r6   )rl   r|   r}   r   r   r   r   r   r   r   r   r   rG   r6   r/   r   r      s        MG  & & &  "  = = =' ' '    r6   r   c                       e Zd Zej                            e          Zej                            ed          Z	dZ
dddZddZdS )DispatcherCacheUsecasesTestcache_usecases.pydispatcher_caching_test_fodderNenvvarsc          	         |i }dt          | j        | j                  z  }t          j                                        }|                    |           t          j        t          j
        d|gt          j        t          j        |          }|                                \  }}|j        dk    rBt          d|j        d|                                d|                                d	          d S )
Nzif 1:
            import sys

            sys.path.insert(0, %(tempdir)r)
            mod = __import__(%(modname)r)
            mod.self_test()
            r,   r   -c)stdoutstderrenvr   process failed with code z: 
stdout follows
z
stderr follows

)r   r,   r   r"   environr   update
subprocessPopenr   
executablePIPEcommunicate
returncodeAssertionErrordecode)rZ   r   codesubp_envpopenouterrs          r/   run_in_separate_processz3DispatcherCacheUsecasesTest.run_in_separate_process  s     ?G t|T\BBBC :??$$    #.$!=(2
%-/ / / $$&&Sq   . ###SZZ\\\\3::<<<<A   ! r6   c                    |j         }|                     t          |j                                                  ||j                   |B|                     t          |j                                                  ||j                   d S d S r_   )statsrY   sum
cache_hitsvaluescache_misses)rZ   r[   hitsmissessts        r/   
check_hitsz&DispatcherCacheUsecasesTest.check_hits,  s    ZR]113344dBMJJJS!7!7!9!9::F_. . . . . r6   r_   )rl   r|   r}   r"   r#   dirnamer   herer$   r   r   r   r   rG   r6   r/   r   r     sr        7??8$$DGLL':;;M.G15     8. . . . . .r6   r   c                   z   e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Zd Zd Zd Zd Zd Ze ej        ej        dk    d          d                         Ze ej        ej        dk    d          d                         Zd Z ej        edu pej        d         dk     d          d             ZdS )	TestCachec                     |                      d           |                                 }|                      d           |j        }|                      |dd          d           |                      d           |                      |dd          d           |                      d           |                     |dd           |j        }|                      |dd          d           |                      d           |                      |dd          d           |                      d           |                     |dd           |j        } ||j        d          }|                     t          |          d	            ||j	        d          }|                     t          |          d	           |                      d
           |                     |dd           | 
                                 d S )Nr   rD   rO            @      @   rC   )rD   g     E@	   )r   r   add_usecaseassertPreciseEqualr   add_objmode_usecaserecord_returnaligned_arrtuple
packed_arrr   )rZ   r   r.   recs       r/   test_cachingzTestCache.test_caching6  s   1  ""1O!Q+++1#q		3///11a   #!Q+++1#q		3///11a   a##c

I666a""c

I66611a    	$$&&&&&r6   c                    |                      d           |                                 }|                      d           |j        }|                      |dd          d           |                      d           |                      |dt	          j        d                    dt	          j        d          z   dz              |                      d           |                     |dd           d S )Nr   rD   rO   r   rC   )r   r   r   r   nparanger   rZ   r   r.   s      r/   test_caching_nrt_prunedz!TestCache.test_caching_nrt_prunedT  s    1  ""1O!Q+++1!RYq\\ 2 2A	!4Dq4HIII11a     r6   c                    |                                  }|                     |                    dd          d           |                     d           |j        }|                      |dd          d           |                     d           |                                  }|j        }|                      |dd          d           |                     d           |j        }|                      |dd          d           |                     d           |                      |dd          d           |                     d           d S )NrO   rD   r            @r   )r   r   innerr   outer_uncachedouterr   s      r/   test_inner_then_outerzTestCache.test_inner_then_outera  sG     ""		!Q3331!Q+++1  ""!Q+++1I!Q+++1#q		3///1r6   c                 4   |                                  }|                     |                    dd          d           |                     d           |                     |                    dd          d           |                     d           |                                  }|j        }|                      |dd          d           |                     d           |                      |dd          d           |                     d           d S )NrO   rD   r   r   r   r   r   )r   r   r  r   r  r  r   s      r/   test_outer_then_innerzTestCache.test_outer_then_inneru  s	     ""		!Q3331 2 21a 8 8!<<<1  ""I!Q+++1#q		3///1r6   c                     |                                  }|j        }|                      |dd          d           |                     d           d S )NrD   rO   r   r   )r   add_nocache_usecaser   r   r   s      r/   test_no_cachingzTestCache.test_no_caching  sU      ""#!Q+++1r6   c                    |                                  }t          j        d          5 }t          j        dt                     |j        }|                      |d          d           |                     d           d d d            n# 1 swxY w Y   |                     t          |          d           | 
                    dt          |d         j                             d S )	NTrecordalwaysr   r   r   rC   zBCannot cache compiled function "looplifted" as it uses lifted code)r   warningscatch_warningssimplefilterr   
loopliftedr   r   rY   r   assertInstrmessagerZ   r   wr.   s       r/   test_loopliftedzTestCache.test_looplifted  s     ""$D111 	"Q!(L999A##AAaDD!,,,q!!!	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	Q### /03AaDL0A0A	C 	C 	C 	C 	Cs   ABBBc                    |                                  }t          j        d          5 }t          j        dt                     |j        }t          j                             |            |j	                   | 
                    d           d d d            n# 1 swxY w Y   |                     t          |          d           |                     dt          |d         j                             d S )NTr  r  r   rC   zICannot cache compiled function "use_big_array" as it uses dynamic globals)r   r  r  r  r   use_big_arrayr   testingassert_equalbiggier   rY   r   r  r  r  r  s       r/   test_big_arrayzTestCache.test_big_array  s!     ""$D111 	"Q!(L999!AJ##AACC444q!!!	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	Q### 347!4E4E	G 	G 	G 	G 	Gs   A$BB!Bc                 $   |                                  }|j        |j        |j        fD ]}t	          j        d          5 }t	          j        dt                     |                      |d          d           | 	                    d           d d d            n# 1 swxY w Y   | 
                    t          |          d           |                     d                    |j                  t          |d         j                             d S )NTr  r  g        r   rC   z#Cannot cache compiled function "{}")r   	use_c_sinuse_c_sin_nest1use_c_sin_nest2r  r  r  r   r   r   rY   r   r  formatrl   r  r  )rZ   r   r.   r  s       r/   test_ctypeszTestCache.test_ctypes  sE      ""-!4c6IJ 	 	A(555 &%h===''#444""1%%%	& & & & & & & & & & & & & & & SVVQ'''MM5<<QZHHAaDL!!   	 	s    ABB	"B	c                    |                                  }t          j                    5  t          j        dt                     |j        }|                      |d          d           |j        }|                      |d          d           |j        }|                      |d          d           |j	        }|                      |d          d           | 
                    d           d d d            d S # 1 swxY w Y   d S )NerrorrO   r      
      r   )r   r  r  r  r   closure1r   closure2closure3closure4r   r   s      r/   test_closurezTestCache.test_closure  sA     ""$&& 	" 	"!'<888A##AAaDD!,,,A##AAaDD!,,,A##AAaDD"---A##AAaDD"---q!!!	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	"s   CC==DDc                    |                                  }|j        }|                      ||j        d          d           |                      ||j        d          d           |                      ||j        d          d           |                      ||j        d          d           |                     d           d S )NrC   r'  d   rD         )r   first_class_function_usecaserY   first_class_function_mulfirst_class_function_addr   r   s      r/   test_first_class_functionz#TestCache.test_first_class_function  s      "",37;;Q???37<<cBBB37;;Q???37<<bAAA 	1r6   c                    |                                  }|                    dd           |                    dd           |                    dd           |                    dd           |                    dd           |                    |j        d           |                    |j        d           |                                 }| 	                    |j        dd           |                                  }| 
                    ||           |j        } |dd           | 	                    |dd            |dd           | 	                    |dd           |j        } |dd           | 	                    |dd           |                     |                                 |           |                                  |                     |                                 |           d S )NrD   rO   r   r   r   rC   )r   r   r   r  r  r   r   r   r   r   assertIsNotrY   r   )rZ   r   mtimesmod2r.   s        r/   test_cache_reusezTestCache.test_cache_reuse  s     ""1S!!!1%%%1a   		!Q#.!,,,#/1---&&((A...!!##d###	!Q1a   	#s1a   $	!Q1a    	..00&999$$&&&..00&99999r6   c                    |                                  }|j        }|                      |dd          d           t          | j        d          5 }|                    d           d d d            n# 1 swxY w Y   |                                  }|j        }|                      |dd          d           |j        }|                      |dd          d           d S )NrD   rO   r   rE   z
Z = 10
   )r   r   r   r&   r   r'   r   r   s      r/   test_cache_invalidatezTestCache.test_cache_invalidate  s     ""O!Q+++ $,$$ 	"GGL!!!	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	"   ""O!Q,,,#!Q,,,,,s   A33A7:A7c                    |                                  }|j        }|                      |dd          d           |                                  }|j        }d|_        |                      |dd          d           |                                 |                      |dd          d           |                                  }|j        }|                      |dd          d           d S )NrD   rO   r   r'  r<  )r   r   r   Z	recompiler   s      r/   test_recompilezTestCache.test_recompile  s      ""O!Q+++  ""O!Q+++	!Q,,,   ""O!Q,,,,,r6   c                     |                                  }|j        }|                      |d          d           |j        }|                      |d          d           d S )NrD   r   r&  )r   renamed_function1r   renamed_function2r   s      r/   test_same_nameszTestCache.test_same_names  se      ""!!a(((!!a(((((r6   c                    ddl m} |j        }t          ddd          }	 ||_        t	          j        |          }t          j        ||          }|                     |           dt          _
        t          j        ||          }|                     |t                     ||_        t          `
d S # ||_        t          `
w xY w)NrC   functionpassztests/dummy_module.pyexecT)dummy_modulerH  __code__compileinspectgetfiler   from_functionassertIsNoner   frozenassertIsInstance)rZ   rH  old_codecode_objsourcelocators         r/   test_frozenzTestCache.test_frozen  s    ******$6#:FCC	 (H_X..F +86JJGg&&&CJ +86JJG!!'+?@@@ !)H


 !)H
NNNNs   BB1 1Cc                    |                                  }|j        }|                     t          j        |j        j        d           |                      |dd          d           |                     |dd           |                                  }|j        }|                      |dd          d           |                     |dd           | 	                    d           dS )	zy
        With a disabled __pycache__, test there is a working fallback
        (e.g. on the user-wide cache dir)
        T)ignore_errorsrD   rO   r   r   rC   N)
r   r   
addCleanupr)   r*   r   
cache_pathr   r   r   )rZ   r   r.   r9  s       r/   _test_pycache_fallbackz TestCache._test_pycache_fallback2  s    
   ""O 	qw'9NNN!Q+++1a    !!##!Q+++1a    	1r6   ntz3cannot easily make a directory read-only on Windowsc                     t          j        | j                  j        }t          j        | j        d           |                     t           j        | j        |           |                                  d S )Nr   )r"   r   r,   st_moder(   r[  r]  )rZ   	old_permss     r/   test_non_creatable_pycachez$TestCache.test_non_creatable_pycacheK  s^    
 GDL))1	
u%%%$,	:::##%%%%%r6   c                 >   t           j                            | j        d          }t          j        |           t          j        |          j        }t          j        |d           |                     t           j        ||           | 	                                 d S )Nr   r   )
r"   r#   r$   r,   r%   r   r`  r(   r[  r]  )rZ   pycachera  s      r/   test_non_writable_pycachez#TestCache.test_non_writable_pycacheV  s    
 ',,t|];;
GG$$,	
%   '9555##%%%%%r6   c                 t    t           j        ddgg dz  	 t          j        dgz             }n9# t          j        $ r'}                     d|j        z             Y d }~nd }~ww xY w|                                                                }t          j
                             j        d          t          d          5 }|                    d           d d d            n# 1 swxY w Y    fd	} |              |            }                     d
|                                           d S )N-mIPythonz--quietz--quickz--no-bannerz--colors=NoColor	--version%ipython not available: return code %dzipython_cache_usecase.txtr  }  
                import os
                import sys

                from numba import jit

                # IPython 5 does not support multiline input if stdin isn't
                # a tty (https://github.com/ipython/ipython/issues/9752)
                f = jit(cache=True)(lambda: 42)

                res = f()
                # IPython writes on stdout, so use stderr instead
                sys.stderr.write(u"cache hits = %d\n" % f.stats.cache_hits[()])

                # IPython hijacks sys.exit(), bypass it
                sys.stdout.flush()
                sys.stderr.flush()
                os._exit(res)
                c                  :   t          d          5 } t          j        | t          j        t          j        d          }|                                \  }}|j        dk    r                     d|j        ||fz             |cd d d            S # 1 swxY w Y   d S NrbT)stdinr   r   universal_newlines*   z6unexpected return code %d
-- stdout:
%s
-- stderr:
%s
r&   r   r   r   r   r   rt   rp  pr   r   base_cmdinputfnrZ   s       r/   execute_with_inputz2TestCache.test_ipython.<locals>.execute_with_input      gt$$ $XU,6O,6O8<> > > ==??S<2%%II 1 "#sC 89 : : :                     A1BBBcache hits = 1)r   r   r   check_outputCalledProcessErrorskipTestr   stripr   r"   r#   r$   r,   r&   r'   r  )rZ   verer.   rx  r   rv  rw  s   `     @@r/   test_ipythonzTestCache.test_ipythonc  s   ND)4MMMM	*)(k]*BCCCC, 	* 	* 	*MMAL) * * * * * * * *	* iikk  ""',,t|-HII'3 	1GG    	 	 	 	 	 	 	 	 	 	 	 	 	 	 	*	 	 	 	 	 	 	 	  ""&		44444s'   4 A*A%%A*C**C.1C.Nr   r   zrequires ipykernel >= 6c                 ^    t           j        ddgg dz  	 t          j        dgz             }n9# t          j        $ r'}                     d|j        z             Y d }~nd }~ww xY w|                                                                }ddl	m
} |                                t          d          5 }|                    d	           d d d            n# 1 swxY w Y    fd
} |              |            }                     d|                                           d S )Nrg  rh  ri  rj  rk  r   )compilerr  rl  c                  :   t          d          5 } t          j        | t          j        t          j        d          }|                                \  }}|j        dk    r                     d|j        ||fz             |cd d d            S # 1 swxY w Y   d S rn  rs  rt  s       r/   rx  z4TestCache.test_ipykernel.<locals>.execute_with_input  ry  rz  r{  )r   r   r   r|  r}  r~  r   r  r   	ipykernelr  get_tmp_directoryr&   r'   r  )	rZ   r  r  r  r.   rx  r   rv  rw  s	   `      @@r/   test_ipykernelzTestCache.test_ipykernel  s   
 ND)4MMMM	*)(k]*BCCCC, 	* 	* 	*MMAL) * * * * * * * *	* iikk  ""&&&&&&,,..'3 	1GG    	 	 	 	 	 	 	 	 	 	 	 	 	 	 	*	 	 	 	 	 	 	 	  ""&		44444s'   4 A*A%%A*=CC#&C#)rl   r|   r}   r   r   r  r  r	  r  r  r#  r-  r5  r:  r=  rA  rE  rX  r]  skip_bad_accessunittestskipIfr"   namerb  re  r  r  version_infor  rG   r6   r/   r   r   4  s       ' ' '<! ! !  (    C C CG G G  $" " " 	 	 	: : :<- - -- - -$) ) )  .  2 X_RW_JL L& &L L _& X_RW_JL L& &L L _&35 35 35j X_i4'KY-CA-F-J.0 055 550 055 55 55r6   r   c                   *     e Zd Z fdZd Zd Z xZS )TestCacheZipc                 r   t                                                       d}d}d}t          j                            | j        |          }t          j        |d          5 }|                    ||           d d d            n# 1 swxY w Y   t          j        
                    d|           d| _        d S )NzI
from numba import jit

@jit(cache=True)
def add(x, y):
    return x + y
ztest_module.pyztest_archive.zipr  r   test_module)superr   r"   r#   r$   r,   zipfileZipFilewritestrr   r   r   )rZ   mod_contentmod_filenamezip_filenamezip_pathzfrk   s         r/   r   zTestCacheZip.setUp  s     () 7<<l;;_Xs++ 	3rKKk222	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	8$$$$s   "BB	B	c                     t           j                            d           t           j                            dd            d S )Nr   r  )r   r#   r   r   r`   s    r/   r   zTestCacheZip.tearDown  s/    Qt,,,,,r6   c                    dd l }|                    dd          }|                     |d           |                     |j        dd           |                     |j        d           t          j        d= t          j                     dd l }|                    dd          }|                     |d           |                     |j        d           d S )Nr   rD   rO   r   rC   r  )r  addrY   r   r   r   	importlibinvalidate_caches)rZ   r  result1result2s       r/   test_zip_cachingzTestCacheZip.test_zip_caching  s     	//!Q''!$$$A... 	+++ K&#%%% //!Q''!$$$ 	+++++r6   )rl   r|   r}   r   r   r  __classcell__rk   s   @r/   r  r    sV        % % % % %.- - -, , , , , , ,r6   r  c                       e Zd ZdZd Zd ZdS )TestCacheZipLibzR
    ZipCache tests that don't require the setup/teardown from `TestCacheZip`
    c                    d }d}t          j        ||          }|                     |           |                     |j        t          t          d                               |                     |j        d           d S )Nc                      d S r_   rG   rG   r6   r/   	mock_funcz<TestCacheZipLib.test_zip_locator_creation.<locals>.mock_func      Dr6   z/path/to/archive.zip/module.pyz/path/to/archive.zipz	module.py)r   rP  assertIsNotNonerY   	_zip_pathr  r   _internal_path)rZ   r  r  rW  s       r/   test_zip_locator_creationz)TestCacheZipLib.test_zip_locator_creation  s    	 	 	 4!/	8DDW%%%*C5K0L0L,M,MNNN/=====r6   c                 d    d }d}t          j        ||          }|                     |           d S )Nc                      d S r_   rG   rG   r6   r/   r  z@TestCacheZipLib.test_zip_locator_non_zip_path.<locals>.mock_func  r  r6   z/path/to/module.py)r   rP  rQ  )rZ   r  non_zip_pathrW  s       r/   test_zip_locator_non_zip_pathz-TestCacheZipLib.test_zip_locator_non_zip_path  sD    	 	 	 ,!/	<HH'"""""r6   N)rl   r|   r}   __doc__r  r  rG   r6   r/   r  r    s<         
> 
> 
># # # # #r6   r  c                   .     e Zd Z fdZ fdZd Z xZS )TestSequentialParForsCachec                 n    t          t          |                                            dt          _        d S )NT)r  r  r   r   sequential_parfor_loweringrZ   rk   s    r/   r   z TestSequentialParForsCache.setUp*  s.    ($//55777,0)))r6   c                 n    t          t          |                                            dt          _        d S )NF)r  r  r   r   r  r  s    r/   r   z#TestSequentialParForsCache.tearDown/  s.    ($//88:::,1)))r6   c                 v   |                                  }|                     d           |j        }t          j        d          }|                      ||          ||z  |z              d |j                                        D             }|                     |dg           |                     d           d S )Nr   r'  c                 &    g | ]}|j         j        S rG   )libraryhas_dynamic_globals)r   cress     r/   r   z;TestSequentialParForsCache.test_caching.<locals>.<listcomp>:  s-     = = =#  <; = = =r6   FrD   )	r   r   parfor_usecaser   onesr   	overloadsr   rY   )rZ   r   r.   arydynamic_globalss        r/   r   z'TestSequentialParForsCache.test_caching4  s      ""1gbkk#c	C888= ='({'9'9';';= = =5'2221r6   )rl   r|   r}   r   r   r   r  r  s   @r/   r  r  (  s`        1 1 1 1 1
2 2 2 2 2
	 	 	 	 	 	 	r6   r  c                   t    e Zd ZdZd Z ej         ej                    dk    d          d             Z	d Z
dS )TestCacheWithCpuSettingFc                     d}|                                                                  D ]*\  }}||v r!|                     |||                    |dz  }+|                     |dd           d S )Nr   rC   znothing to comparemsg)r   itemsassertGreaterEqualassertGreater)rZ   
mtimes_oldmatch_countkrP   s        r/   check_later_mtimesz*TestCacheWithCpuSetting.check_later_mtimesD  s    ))++1133 	! 	!DAqJ'':a=999q ;3 	 	5 	5 	5 	5 	5r6   genericzLLVM detected 'generic' CPUc                    |                      d           |                     t          j                    dd           |                                 }t          |                                           }|                     ddd           |                     |           |                     t          |                                           |           | 	                                }|j
        j        }|j        }|                                }|                     t          |          d           |                                \  }}|d         d         dk    r||}
}	n||}	}
|                     |
d         d         t          j                               |                     |
d         d         d           |                     |	d         d         d           |                     |	d         d         d           d S )Nr    )NUMBA_CPU_NAMENUMBA_CPU_FEATURESr   r  rD   rC   )r   r   llget_host_cpu_namer   r   r   r  r  r   r   _cache_cache_file_load_indexrY   keys)rZ   r8  
cache_sizer   r:   
cache_filecache_indexkey_akey_bkey_generickey_hosts              r/   test_user_set_cpu_namez.TestCacheWithCpuSetting.test_user_set_cpu_nameM  s     	1 	$$')';'='=+-/ / 	% 	
 	
 	
 &&((,,..//
 	$$'"$.
 .
$ 	 	 	
 	'''3t224455zBBB  ""&&
 ,,..[))1---$))++8A;)##$)5KK$)5kH!Q)=)?)?@@@!Q,,,Q*I666Q*B/////r6   c                    |                      d           t          j                                        }t          j                    }|                     d|i           t          |                                           }|                                 }d}| 	                    ||           |                     d|i           | 
                    |           |                     t          |                                           |           |                                 }|j        j        }|j        }|                                }	|                     t          |	          d           |	                                \  }
}|
d         d         |k    r|
|}}n|
|}}|                     |d         d         |                                           |                     |d         d         |           |                     |d         d         |                                           |                     |d         d         |           d S )Nr   r  r   z	-sse;-avxrD   rC   )r   r   target_contextr   get_host_cpu_featuresr   r   r   r   assertNotEqualr  r  r   r   r  r  r  rY   r  _get_host_cpu_name)rZ   cpu_codegensystem_featuresr  r8  my_cpu_featuresr   r:   r  r  r  r  key_modifiedr  s                 r/   test_user_set_cpu_featuresz2TestCacheWithCpuSetting.test_user_set_cpu_featuresr  s1   1 /7799!799 	$$)?; 	% 	
 	
 	
 ,,..//
&&((%O_===$$)?; 	% 	
 	
 	
 	'''3t224455zBBB  ""&&
 ,,..[))1---$))++8A;/))%*E(LL%*ElH!Q)G)G)I)IJJJ!Q999a+[-K-K-M-MNNNa+_=====r6   N)rl   r|   r}   _numba_parallel_test_r  r  r  r  r  r  r  rG   r6   r/   r  r  @  s{        !5 5 5 X_)R)++y824 4!0 !04 4!0F'> '> '> '> '>r6   r  c                       e Zd ZdZej                            e          Zej        	                    ed          Z
dZd ZdS )TestMultiprocessCacheFr   r   c                    |                                  }|j        }d}	 t          j        d          }n# t          $ r
 t          }Y nw xY w|                    |          }	 t          |                    |t          |                              }|	                                 n# |	                                 w xY w| 
                    |||dz
  z  dz             d S )NrO   spawnrC   rD   )r   simple_usecase_callerrm   rn   AttributeErrorPoolr   imaprangecloserY   )rZ   r   r.   r   rv   poolr\   s          r/   test_multiprocessingz*TestMultiprocessCache.test_multiprocessing  s      "" %	"!-g66CC 	" 	" 	"!CCC	"xx{{	dii588,,--CJJLLLLDJJLLLLa1q5kQ./////s   4 AA!0B& &B<N)rl   r|   r}   r  r"   r#   r   r   r   r$   r   r   r  rG   r6   r/   r  r    sY         "7??8$$DGLL':;;M.G0 0 0 0 0r6   r  c                       e Zd ZdZej                            e          Zej        	                    ed          Z
dZdZdZd Zd Zd Zd	 Zd
 Z ej         eed          d          d             ZdS )TestCacheFileCollisionFr   caching_file_loc_fodderzD
from numba import njit
@njit(cache=True)
def bar():
    return 123
zD
from numba import njit
@njit(cache=True)
def bar():
    return 321
c                    t          d          | _        t          j                            d| j                   d| _        |                     | j        t          j                   | j        | _        d	                    | j        dg          | _
        t          j        	                    | j        | j                  }t          j        |           t          t          j        	                    |d          d          5 }t          | j        |           d d d            n# 1 swxY w Y   t          t          j        	                    |d	          d          5 }t          | j        |           d d d            d S # 1 swxY w Y   d S )
Ntest_cache_file_locr   module_name_that_is_unlikely.fooz__init__.pyr  filezfoo.py)r   r,   r   r#   r   r   assertNotInr   modname_bar1r$   modname_bar2r"   r%   r&   printsource_text_1source_text_2)rZ   foomodfouts      r/   r   zTestCacheFileCollision.setUp  s   %&;<<4<(((5s{333 LHHdlE%:;;dlDL99
"',,v}55s;; 	1t$$40000	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1"',,vx00#66 	1$$$40000	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1 	1s$   ?D""D&)D&E??FFc                     t           j                            | j        d            t           j                            | j        d            t           j                            | j                   d S r_   )r   r   r   r  r  r#   r   r,   r`   s    r/   r   zTestCacheFileCollision.tearDown  sP    )4000)4000%%%%%r6   c                 4    t          | j                  j        S r_   )r   r  barr`   s    r/   import_bar1z"TestCacheFileCollision.import_bar1      d/0044r6   c                 4    t          | j                  j        S r_   )r   r  r  r`   s    r/   import_bar2z"TestCacheFileCollision.import_bar2  r  r6   c                 f   |                                  }|                                 }|j        j        j        }|j        j        j        }|                     ||           |                     |                    d                     |                     |                    d                     d S )Nz__init__.bar-3.pyzfoo.bar-3.py)r  r  r  r  _index_namer  
assertTrue
startswith)rZ   bar1bar2idxname1idxname2s        r/   test_file_locationz)TestCacheFileCollision.test_file_location  s    !!!!;*6;*6Hh///++,?@@AAA++N;;<<<<<r6   rn   z)Test requires multiprocessing.get_contextc                    |                                  }|                                 }t                      5 } |            }d d d            n# 1 swxY w Y   |                                }|                     |                    d          d           |                     |                    d          d           |                     |                    d          d           |                     |                    d          d           t                      5 } |            }d d d            n# 1 swxY w Y   |                                }|                     |                    d          d           |                     |                    d          d           |                     |                    d          d           |                     |                    d          d           |                     ||           	 t          j        d          }n# t          $ r t          d           Y nw xY w|                                }|                    t          || j        | j        | j        f	          }	|	                                 |                                }
|                                }|                                }|                                }|	                                 |                     ||           |                     ||           |                     |
                    d          d           |                     |
                    d          d           |                     |
                    d          d           |                     |
                    d          d           |                     |                    d          d           |                     |                    d          d           |                     |                    d          d           |                     |                    d          d           d S )
Nzindex savedrC   z
data savedzindex loadedr   zdata loadedr  zmissing spawn contextrg   )r  r  r   getvaluerY   countr  rm   rn   
ValueErrorr  ro   rp   cache_file_collision_testerr,   r  r  rr   rs   r$   )rZ   r  r  bufres1cachelogres2mpqrx   log1got1log2got2s                 r/   test_no_collisionz(TestCacheFileCollision.test_no_collision  s[    !!!!   	C466D	 	 	 	 	 	 	 	 	 	 	 	 	 	 	<<>>66:::55q99977;;;66:::   	C466D	 	 	 	 	 	 	 	 	 	 	 	 	 	 	<<>>66:::55q99977;;;66:::D$'''	+ !,W55BB 	+ 	+ 	+)*****	+ HHJJzz!< !4< $ 1 $ 1 3  4 4 	

uuwwuuwwuuwwuuww		 	t$$$t$$$ 	M22A666L111555N33Q777M22A666 	M22A666L111555N33Q777M22A66666s5   AAAD66D:=D:H% %I IN)rl   r|   r}   r  r"   r#   r   r   r   r$   r   r   r  r	  r   r   r  r  r  r  
skipUnlesshasattrrm   r+  rG   r6   r/   r  r    s        !7??8$$DGLL':;;M'GMM1 1 1& & &
5 5 55 5 5= = = X-@@DF F97 97F F97 97 97r6   r  c                 F   t           j                            d|           t          |          j        }t          |          j        }t                      5 } |            }d d d            n# 1 swxY w Y   |                     |                                           |                     |           t                      5 } |            }d d d            n# 1 swxY w Y   |                     |                                           |                     |           d S )Nr   )r   r#   r   r   r  r   r   r  )	r&  r,   r  r  r  r  r!  r1r2s	            r/   r   r   .  s`   HOOAw,''+D,''+D			 TVV              EE#,,..EE"III			 TVV              EE#,,..EE"IIIIIs$   A..A25A2CC!Cc                   ,    e Zd ZdZdZdZd Zd Zd ZdS )#TestCacheMultipleFilesWithSignatureFz
from file2 import function2
z
from numba import njit

@njit('float64(float64)', cache=True)
def function1(x):
    return x

@njit('float64(float64)', cache=True)
def function2(x):
    return x
c                    t          d          | _        t          j                            | j        d          | _        t          | j        d          5 }t          | j        |           d d d            n# 1 swxY w Y   t          j                            | j        d          | _	        t          | j	        d          5 }t          | j
        |           d d d            d S # 1 swxY w Y   d S )Nr  zfile1.pyr  r  zfile2.py)r   r,   r"   r#   r$   file1r&   r  source_text_file1file2source_text_file2)rZ   r  s     r/   r   z)TestCacheMultipleFilesWithSignature.setUpP  sI   %&;<<W\\$,
;;
$*c"" 	5d$(t4444	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 W\\$,
;;
$*c"" 	5d$(t4444	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5 	5s$   A77A;>A;C%%C),C)c                 8    t          j        | j                   d S r_   )r)   r*   r,   r`   s    r/   r   z,TestCacheMultipleFilesWithSignature.tearDown[  s    dl#####r6   c                 t   t          j        t          j        | j        gt           j        t           j                  }|                                \  }}d|                                 d|                                 }|                     |j	        d|           t          j        t          j        | j
        gt           j        t           j                  }|                                \  }}d|                                 d|                                 }|                     |j	        d|           d S )Nr   r   zstdout:
z


stderr:
r   r  )r   r   r   r   r4  r   r   r   rY   r   r6  )rZ   r   r   r   r  s        r/   *test_caching_mutliple_files_with_signaturezNTestCacheMultipleFilesWithSignature.test_caching_mutliple_files_with_signature^  s    #.$*!=(2(29 9 9 $$&&SC#**,,CCSZZ\\CC)1#666  #.$*!=(2(29 9 9 $$&&SC#**,,CCSZZ\\CC)1c22222r6   N)	rl   r|   r}   r  r5  r7  r   r   r;  rG   r6   r/   r2  r2  <  sY         "
	5 	5 	5$ $ $3 3 3 3 3r6   r2  c                       e Zd Zej                            e          Zej                            ed          Z	dZ
d Zd Zd ZdS )TestCFuncCachezcfunc_cache_usecases.pycfunc_caching_test_fodderc                 P   dt          | j        | j                  z  }t          j        t
          j        d|gt          j        t          j                  }|                                \  }}|j	        dk    r-t          d|j	         d|                                 d          d S )	Naf  if 1:
            import sys

            sys.path.insert(0, %(tempdir)r)
            mod = __import__(%(modname)r)
            mod.self_test()

            f = mod.add_usecase
            assert f.cache_hits == 1
            f = mod.outer
            assert f.cache_hits == 1
            f = mod.div_usecase
            assert f.cache_hits == 1
            r   r   r:  r   r   z:stderr follows
r   )r   r,   r   r   r   r   r   r   r   r   r   r   )rZ   r   r   r   r   s        r/   r   z&TestCFuncCache.run_in_separate_processv  s     t|T\BBBC  #.$!=(2
Q Q Q$$&&Sq    "EU=M "E "E47JJLL"E "E "E F F F ! r6   c                 .    |                                  d S r_   )	self_testrZ   r   s     r/   check_modulezTestCFuncCache.check_module  s    r6   c                 P   |                      d           |                                 }|                      d           |                     |j        j        d           |                     |j        j        d           |                     |j        j        d           |                     |j        j        d           |                     |           |                                 }|                      d           |                     |j        j        d           |                     |j        j        d           |                     |j        j        d           |                     |j        j        d           |                     |           | 	                                 d S )Nr   r   rC   )
r   r   rY   r   r   r  r  div_usecaserC  r   rB  s     r/   r   zTestCFuncCache.test_caching  s|   1  ""13Q777-q1110;Q???3Q777#   ""13Q777-q1110;Q???3Q777#$$&&&&&r6   N)rl   r|   r}   r"   r#   r   r   r   r$   r   r   r   rC  r   rG   r6   r/   r=  r=  p  sr        7??8$$DGLL'@AAM)GF F F0  ' ' ' ' 'r6   r=  c                       e Zd ZdS )TestLocatorN)rl   r|   r}   rG   r6   r/   rG  rG    s        Dr6   rG  c                   0    e Zd ZdZd Zd Zd Zd Zd ZdS )&TestCacheLocatorEnvironmentIntegrationz9Integration tests for environment variable functionality.c                     d }t          dd          5  |                     t                    5  t          |           d d d            n# 1 swxY w Y   d d d            d S # 1 swxY w Y   d S )Nc                      dS Nrr  rG   rG   r6   r/   r  z\TestCacheLocatorEnvironmentIntegration.test_locators_env_override_unknown.<locals>.mock_func      2r6   NUMBA_CACHE_LOCATOR_CLASSESzfoo,bar)r   assertRaisesRuntimeErrorr	   )rZ   r  s     r/   "test_locators_env_override_unknownzITestCacheLocatorEnvironmentIntegration.test_locators_env_override_unknown  s   	 	 	 !)
 
 	) 	) ""<00 ) )i((() ) ) ) ) ) ) ) ) ) ) ) ) ) )		) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	) 	)s3   A#AA#A	A#A	A##A'*A'c                     d }t          dd          5  t          |          }t          }|                     |j        j        |           d d d            d S # 1 swxY w Y   d S )Nc                      dS rL  rG   rG   r6   r/   r  z[TestCacheLocatorEnvironmentIntegration.test_locators_env_override_single.<locals>.mock_func  rM  r6   rN  r   )r   r	   r   rS  _implrW  rZ   r  r:   expectedLocators       r/   !test_locators_env_override_singlezHTestCacheLocatorEnvironmentIntegration.test_locators_env_override_single  s    	 	 	 !)*
 
 	3 	3 "),,E:O!!%+"5"13 3 3	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3s   7AAAc                     d }t          dt           d          5  t          |          }t          }|                     |j        j        |           d d d            d S # 1 swxY w Y   d S )Nc                      dS rL  rG   rG   r6   r/   r  z[TestCacheLocatorEnvironmentIntegration.test_locators_env_override_custom.<locals>.mock_func  rM  r6   rN  z.TestLocator)r   rl   r	   rG  rS  rT  rW  rU  s       r/   !test_locators_env_override_customzHTestCacheLocatorEnvironmentIntegration.test_locators_env_override_custom  s    	 	 	 !)%%%
 
 	3 	3 "),,E)O!!%+"5"13 3 3	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3s   7A  A$'A$c                     d }d}t           }t          d|          5  t          |          }|                     |j        j        |           d d d            d S # 1 swxY w Y   d S )Nc                      dS rL  rG   rG   r6   r/   r  zYTestCacheLocatorEnvironmentIntegration.test_locators_env_override_list.<locals>.mock_func  rM  r6   zXInTreeCacheLocatorFsAgnostic,InTreeCacheLocator,IPythonCacheLocator,UserWideCacheLocatorrN  )r   r   r	   rS  rT  rW  )rZ   r  locatorClassesrV  r:   s        r/   test_locators_env_override_listzFTestCacheLocatorEnvironmentIntegration.test_locators_env_override_list  s    	 	 	E6 )
 
 	H 	H "),,E!!%+"5GGG	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	H 	Hs   0AA!Ac                 x    d }t          |          }t          }|                     |j        j        |           d S )Nc                      dS rL  rG   rG   r6   r/   r  zOTestCacheLocatorEnvironmentIntegration.test_default_locators.<locals>.mock_func  rM  r6   )r	   r
   rS  rT  rW  rU  s       r/   test_default_locatorsz<TestCacheLocatorEnvironmentIntegration.test_default_locators  sF    	 	 	 i((,ek1?CCCCCr6   N)	rl   r|   r}   r  rQ  rW  rZ  r^  ra  rG   r6   r/   rI  rI    sm        CC	) 	) 	)3 3 33 3 3H H HD D D D Dr6   rI  c                       e Zd ZdZd Zd ZdS ) TestInTreeCacheLocatorFsAgnosticz7Test _InTreeCacheLocatorFsAgnostic class functionality.c                    ddl m} t          j        |          }t	          j        ||          }t          j        ||          }|                     |           |                     |           |                                }|                                }| 	                    t          |          d           | 	                    t          |          d           | 	                    |d         |d                    | 	                    |d         t          |d                              |                     |d         |d                    dS )z9Test that FsAgnostic locator floors timestamp to seconds.rC   rG  rD   r   N)rK  rH  rN  rO  r
   rP  r   r  get_source_stamprY   r   r   assertLessEqual)rZ   rH  rV  regular_locatorfs_agnostic_locatorregular_stampfs_agnostic_stamps          r/   test_source_stamp_precisionz<TestInTreeCacheLocatorFsAgnostic.test_source_stamp_precision  sU   ******** -:8VLL:Hf
 

 	_---0111 (88::/@@BB 	]++Q///.//333 	q)+<Q+?@@@ 	*1-u]15E/F/FGGG 	.q1=3CDDDDDr6   c                 Z   ddl m} t          j        |          }t	          j        ||          }t          j        |          }|j        }|	                                }t          |          }|                     |d         |           |                     |d         |j                   dS )z:Test FsAgnostic timestamp handling using filesystem mtime.rC   rG  r   N)rK  rH  rN  rO  r   rP  r"   r   st_mtimere  r   rY   st_size)rZ   rH  rV  rh  stat_resultoriginal_mtimestampexpected_timestamps           r/   test_timestamp_precision_on_fsz?TestInTreeCacheLocatorFsAgnostic.test_timestamp_precision_on_fs  s     	+******* ;Hf
 

 gfoo$- $4466 #>22q#5666 	q;#677777r6   N)rl   r|   r}   r  rk  rs  rG   r6   r/   rc  rc    s<        AAE E EB8 8 8 8 8r6   rc  __main__)Pr  rN  rm   r"   r)   r   r   r   r   r  r  r  pathlibr   llvmlite.bindingbindingr  numpyr   mathr   numbar   
numba.corer   numba.core.cachingr   r   r	   r
   r   numba.core.errorsr   numba.parforsr   numba.tests.supportr   r   r   r   r   r   r   r   r   r   numba.core.registryr   r  ImportErrorr0   _access_preventable_access_msgr,  r  r5   rA   rH   rM   rQ   rT   rV   rq   r   r   r   r  r  r  r  r  r  r   r2  r=  rG  rI  rc  rl   mainrG   r6   r/   <module>r     s            				       



                                                       + * * * * *                                    + * * * * *   III     > 2133 I%(%&9;GG  
        
  7
 7
 7
 7
 7
+x 7
 7
 7
t, , ,84 4 4 4 4H 4 4 4n&. &. &. &. &.- &. &. &.R[5 [5 [5 [5 [5+ [5 [5 [5|8, 8, 8, 8, 8,. 8, 8, 8,v# # # # #1 # # #6     !<   .Y> Y> Y> Y> Y>9 Y> Y> Y>x0 0 0 0 0M 0 0 0: q7 q7 q7 q7 q7X. q7 q7 q7h  13 13 13 13 13(*; 13 13 13h6' 6' 6' 6' 6'] 6' 6' 6'r	 	 	 	 	$ 	 	 	=D =D =D =D =DX =D =D =D@<8 <8 <8 <8 <8x <8 <8 <8~ zHMOOOOO s   B BB