Ë
    7^(hå  ã                   óê   — d dl Z d dlmZ d dlmZ d dlmZmZ d dlm	Z	 d dl
mZmZ d dlmZmZmZmZmZmZmZmZmZ d dlmZmZ d d	lmZ  ed
«      Z ed«      Zd„ Zd„ Ze	 ed«      d„ «       «       Z y)é    N)Úimport_module)Úccode)Úcompile_link_import_stringsÚhas_c)Ú	may_xfail)ÚskipÚskip_under_pyodide)	ÚFunctionDefinitionÚFunctionPrototypeÚVariableÚPointerÚrealÚ
AssignmentÚintegerÚ	CodeBlockÚWhile)ÚvoidÚPreIncrement)Úrender_as_source_fileÚcythonÚnumpyc                  ó<  — t        dt        «      t        dt        «      t        dt        «      fx} \  }}}t        dt        «      }t	        ||k  t        ||   ||   «      t        |«      g«      }t        |j                  d¬«      |«      }t        t        d| |«      S )NÚnÚinpÚoutÚir   )ÚvalueÚour_test_function)r   r   r   r   r   r   r   r   Úas_Declarationr
   r   )Údeclarsr   r   r   r   ÚwhlÚbodys          úc/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/sympy/codegen/tests/test_applications.pyÚ	_mk_func1r$      s�   € Ü$ S¬'Ó2´G¸EÄ4Ó4HÌ'ÐRWÔY]ÓJ^Ð^Ð^€G‰kˆa��cÜ�”gÓ€AÜ
��!‘”j  Q¡¨¨Q©Ó0´,¸q³/ÐBÓ
C€CÜ�Q×%Ñ%¨AÐ%Ó.°Ó4€DÜœdÐ$7¸À$ÓGÐGó    c           	      óÞ   — t        | ddi¬«      }t        t        j                  | «      «      }t	        d|fddj                  d«      dz   j                  || j                  d	¬
«      fg|¬«      S )NÚcontractF)Úsettingszour_test_func.cz_our_test_func.pyxz#cython: language_level={}
Ú3zfcdef extern {declar}
def _{fname}({typ}[:] inp, {typ}[:] out):
    {fname}(inp.size, &inp[0], &out[0])Údouble)ÚdeclarÚfnameÚtyp©Ú	build_dir)r   r   r   Úfrom_FunctionDefinitionr   ÚformatÚname)Úfuncdefr/   Úcode_strr+   s       r#   Ú_render_compile_importr5      s‹   € Ü$ W¸
ÀEÐ7JÔK€HÜÔ$×<Ñ<¸WÓEÓF€FÜ&Ø	˜HÐ%Ø	Ð >× EÑ EÀcÓ Jð!Jñ!J÷ LRÉ6Ø+1¸¿¹È8ð LRó L"ð	#ð(ð ôð r%   z,Emscripten does not support process spawningc                  ó¢  — t         st        d«       t        «       st        d«       t        st        d«       d } t	        j
                  «       5 }t        t        «       |¬«      \  }} t         j                  d«      }t         j                  |«      }|j                  ||«       t         j                  ||«      sJ ‚	 d d d «       y # 1 sw Y   y xY w)Nznumpy not installed.zNo C compiler found.zCython not found.r.   g      $@)Únpr   r   r   ÚtempfileÚTemporaryDirectoryr5   r$   ÚarangeÚ
empty_likeÚ_our_test_functionÚallclose)ÚinfoÚfolderÚmodr   r   s        r#   Útest_copying_functionrA   *   s£   € õ ÜÐ#Ô$ÜŒ7ÜÐ#Ô$ÝÜÐ Ô!à€DÜ	×	$Ñ	$Ó	&ð %¨&Ü*¬9«;À&ÔI‰	ˆˆTÜ�i‰i˜‹oˆÜ�m‰m˜CÓ ˆØ×Ñ˜s CÔ(Ü�{‰{˜3 Ô$Ð$Ñ$÷%÷ %ñ %ús   ÁA-CÃC)!r8   Úsympy.externalr   Úsympy.printing.codeprinterr   Úsympy.utilities._compilationr   r   Ú!sympy.utilities._compilation.utilr   Úsympy.testing.pytestr   r	   Úsympy.codegen.astr
   r   r   r   r   r   r   r   r   Úsympy.codegen.cnodesr   r   Úsympy.codegen.cutilsr   r   r7   r$   r5   rA   © r%   r#   ú<module>rK      sr   ðó å (Ý ,ß KÝ 7ß 9÷÷ õ ÷ 4Ý 6á	�xÓ	 €Ù�7Ó€òHòð ÙÐBÓCñ%ó Dó ñ%r%   