§
    ƒÛgR
  ã                   óº   — 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mZ d dlZd„ Zd„ Z G d„ dej        ¦  «        Zedk    r ej        ¦   «          dS dS )	é    N)Újit)Ú
needs_blasÚexpected_failure_py311c                 óp   — d}t          t          | ¦  «        ¦  «        D ]}|| |         ||         z  z  }Œ|S )Nr   )ÚrangeÚlen)ÚaÚbÚsumÚis       úO/granary/edev/quantum/lib/python3.11/site-packages/numba/tests/test_profiler.pyÚdotr      s?   € Ø
€CÝ•3�q‘6”6‰]Œ]ð ð ˆØˆq�Œt�A�a”D‰yÑˆˆØ€Jó    c                 ó,   — t          j        | |¦  «        S ©N)Únpr   )r	   r
   s     r   Únp_dotr      s   € ÝŒ6�!�Q‰<Œ<Ðr   c                   ó6   — e Zd Zd„ Zd„ Zed„ ¦   «         Zd„ ZdS )ÚTestProfilerc                 ó†  — t          j        dt           j        ¬¦  «        }t          j        dt           j        ¬¦  «        } t          d¬¦  «        |¦  «        } |||¦  «         t	          j        ¦   «         }|                     ¦   «          	  |||¦  «         |                     ¦   «          n# |                     ¦   «          w xY wt          j	        |¦  «         
                    ¦   «         }|j        }t          j                             |j        ¦  «        |j        |j        f}|                      ||j        ¦  «         dS )zy
        Make sure the jit-compiled function shows up in the profile stats
        as a regular Python function.
        é   )ÚdtypeT)ÚnopythonN)r   ÚarangeÚfloat32r   ÚprofilerÚProfileÚenableÚdisableÚpstatsÚStatsÚ
strip_dirsÚ__code__ÚosÚpathÚbasenameÚco_filenameÚco_firstlinenoÚco_nameÚassertInÚstats)	ÚselfÚpyfuncr	   r
   ÚcfuncÚpr+   ÚcodeÚexpected_keys	            r   Úcheck_profiler_dotzTestProfiler.check_profiler_dot   s  € õ
 ŒI�b¥¤
Ð+Ñ+Ô+ˆÝŒI�b¥¤
Ð+Ñ+Ô+ˆØ"•˜TÐ"Ñ"Ô" 6Ñ*Ô*ˆàˆˆa�‰ŒˆÝÔÑÔˆØ	�Š‰
Œ
ˆ
ð	ØˆE�!�Q‰KŒKˆKà�IŠI‰KŒKˆKˆKøˆA�IŠI‰KŒKˆKˆKøøøÝ”˜Q‘”×*Ò*Ñ,Ô,ˆØŒˆÝœ×(Ò(¨Ô)9Ñ:Ô:ØÔ+Øœðˆð 	�Š�l E¤KÑ0Ô0Ð0Ð0Ð0s   ÂB/ Â/Cc                 ó:   — |                       t          ¦  «         d S r   )r2   r   )r,   s    r   Útest_profilerzTestProfiler.test_profiler2   s   € Ø×Ò¥Ñ$Ô$Ð$Ð$Ð$r   c                 óL   — d}t          j        t          j        d|g¦  «         d S )NaÊ  if 1:
            import cProfile as profiler

            import numpy as np

            from numba import jit
            from numba.tests.test_profiler import np_dot

            cfunc = jit(nopython=True)(np_dot)

            a = np.arange(16, dtype=np.float32)
            b = np.arange(16, dtype=np.float32)

            p = profiler.Profile()
            p.enable()
            cfunc(a, b)
            cfunc(a, b)
            p.disable()
            ú-c©Ú
subprocessÚ
check_callÚsysÚ
executable©r,   r0   s     r   Útest_profiler_np_dotz!TestProfiler.test_profiler_np_dot5   s+   € ðˆõ& 	Ô�sœ~¨t°TÐ:Ñ;Ô;Ð;Ð;Ð;r   c                 óL   — d}t          j        t          j        d|g¦  «         d S )Na  if 1:
            import cProfile as profiler
            p = profiler.Profile()
            p.enable()

            from numba.tests.npyufunc.test_dufunc import TestDUFunc
            t = TestDUFunc('test_npm_call')
            t.test_npm_call()

            p.disable()
            r6   r7   r<   s     r   Útest_issue_3229zTestProfiler.test_issue_3229M   s+   € ð
ˆõ 	Ô�sœ~¨t°TÐ:Ñ;Ô;Ð;Ð;Ð;r   N)Ú__name__Ú
__module__Ú__qualname__r2   r4   r   r=   r?   © r   r   r   r      s\   € € € € € ð1ð 1ð 1ð0%ð %ð %ð ð<ð <ñ „Zð<ð.<ð <ð <ð <ð <r   r   Ú__main__)ÚcProfiler   r$   r    r8   r:   Únumpyr   Únumbar   Únumba.tests.supportr   r   Úunittestr   r   ÚTestCaser   r@   ÚmainrC   r   r   ú<module>rL      sñ   ðØ Ð Ð Ð Ø 	€	€	€	Ø €€€Ø Ð Ð Ð Ø 
€
€
€
à Ð Ð Ð à Ð Ð Ð Ð Ð Ø BÐ BÐ BÐ BÐ BÐ BÐ BÐ BØ €€€ðð ð ðð ð ðG<ð G<ð G<ð G<ð G<�8Ô$ñ G<ô G<ð G<ðR ˆzÒÐØ€H„M�O„O€O€O€Oð Ðr   