+
    :i+                         ^ RI t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHtH	t	 ]! RR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# )    N)
namedtupleIS_WIN32)find_lib	find_file_env_path_tuplebyinfoc                .    V  F  w  rVf   K  W3u # 	  R# )zFind valid path from *options*, which is a list of 2-tuple of
(name, path).  Return first pair where *path* is not None.
If no valid path is found, return ('<unknown>', None)
)z	<unknown>N )optionsr	   datas   &  S/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/cuda/cuda_paths.py_find_valid_pathr      s%    
 8O  !     c                      R \        4       3R\        4       3R\        RR4      3R\        RR4      3R\	        4       3.p \        V 4      w  rW3# )Conda environment"Conda environment (NVIDIA package)	CUDA_HOMEnvvm	libdeviceSystemzDebian package)get_conda_ctkget_nvidia_libdevice_ctkget_cuda_homeget_system_ctkget_debian_pkg_libdevicer   r   r	   libdirs      r   _get_libdevice_path_decisionr       s_    	mo.	-/G/IJ	mFK89	>&+67	356G "'*JB:r   c                  "    \         '       d   R# R# )r   )r   bin)r   lib64r   r   r   r   _nvvm_lib_dirr$   %   s    xr   c                      R \        4       3R\        4       3R\        \        4       !  3R\	        \        4       !  3.p \        V 4      w  rW3# r   r   r   r   )r   get_nvidia_nvvm_ctkr   r$   r   r   )r   r	   paths      r   _get_nvvm_path_decisionr)   ,   sR    	mo.	-/B/DE	m]_56	>=?34	G  (HB8Or   c                      \        4       w  rR p\        \        P                  ! V4      V4      p\	        VRR7      p\        W4      # )zlibdevice(\.\d+)*\.bc$N)default)r    r   recompilemaxr   )r	   r   pat
candidatesouts        r   _get_libdevice_pathsr2   7   s<    -/JB
#C2::c?F3J
j$
'C2##r   c                  "    \         '       d   R # R# )r"   r#   r   r   r   r   _cudalib_pathr4   A   s    xr   c                  "    \         '       d   R# R# )lib)r6   x64)r#   r   r   r   r   _cuda_home_static_cudalib_pathr8   H   s    xr   c                      R \        4       3R\        4       3R\        \        4       4      3R\	        \        4       4      3.p \        V 4      w  rW3# r&   )r   get_nvidia_cudalib_ctkr   r4   r   r   r   s      r   _get_cudalib_dir_path_decisionr;   O   sS    	mo.	-/E/GH	mMO45	>-/23	G "'*JB:r   c                      R \        4       3R\        4       3R\        \        4       !  3R\	        \        4       4      3.p \        V 4      w  rW3# r&   )r   get_nvidia_static_cudalib_ctkr   r8   r   r4   r   r   s      r   %_get_static_cudalib_dir_path_decisionr>   Z   sU    	mo.	-/L/NO	m%C%EFG	>-/23	G "'*JB:r   c                  0    \        4       w  r\        W4      # N)r;   r   r	   r   s     r   _get_cudalib_dirrB   e   s    /1JB2&&r   c                  0    \        4       w  r\        W4      # r@   )r>   r   rA   s     r   _get_static_cudalib_dirrD   j   s    68JB2&&r   c                     \         P                  P                  R4      '       dL   Rp\        P                  P                  V4      '       d#   \        P                  P                  ! V.V O5!  # R# R# )zJReturn path to system-wide cudatoolkit; or, None if it doesn't exist.
    linuxz/usr/local/cudaN)sysplatform
startswithosr(   existsjoin)subdirsbases   * r   r   r   o   sU     ||w'' !77>>$77<</w//  	 (r   c                 &   \         P                  P                  \         P                  P                  \        P
                  R4      4      p V '       g   R# \        R4      pV'       g   R# \         P                  P                  \        V4      4      # )MReturn path to directory containing the shared libraries of cudatoolkit.
    
conda-metaNr   )	rJ   r(   rK   rL   rG   prefixr   dirnamer.   )is_conda_envpathss     r   r   r   {   sV     77>>"'',,szz<"HILVE77??3u:&&r   c                 4   \         P                  P                  \         P                  P                  \        P
                  R4      4      p V '       g   R# \         P                  P                  \        P
                  R\        4       4      p\         P                  P                  V4      '       d&   \         P                  P                  V4      '       g   \         P                  P                  \        P
                  RR\        4       4      p\         P                  P                  V4      '       d&   \         P                  P                  V4      '       g   R# \        RVR7      pV'       g   R# \         P                  P                  \        V4      4      # )zAReturn path to directory containing the NVVM shared library.
    rQ   Nr   Library)r   )rJ   r(   rK   rL   rG   rR   r4   isdirr   rS   r.   )rT   r   rU   s      r   r'   r'      s     77>>"'',,szz<"HIL WW\\#**fmo>F77>>&!!v)>)>cjj)V]_Mww~~f%%RWW]]6-B-B VF+E77??3u:&&r   c                     \        4       p V '       g   R# \        P                  P                  V 4      p\        P                  P	                  VR4      # )z?Return path to directory containing the libdevice library.
    Nr   )r'   rJ   r(   rS   rL   )nvvm_ctknvvm_dirs     r   r   r      s9     #$Hwwx(H77<<+..r   c                     \        4       p V '       g   R# \        P                  P                  \        P                  P                  V 4      4      p\        '       d   RMRp\        P                  P                  W4      # )rP   Nr"   r6   )r'   rJ   r(   rS   r   rL   )rZ   env_dirsubdirs      r   r:   r:      sO     #$Hggoobggooh78GhUEF77<<((r   c                    \        4       p V '       g   R# \        '       d   RV 9  d   RpMRp\        P                  P	                  \        P                  P	                  V 4      4      p\        P                  P
                  ! V.VO5!  # )zMReturn path to directory containing the static libraries of cudatoolkit.
    NrW   )Libr7   )r6   )r'   r   rJ   r(   rS   rL   )rZ   dirsr]   s      r   r=   r=      sa     #$HxYh. ggoobggooh78G77<<'$''r   c                     \         P                  P                  R4      pVf    \         P                  P                  R4      pVe#   \         P                  P                  ! V.V O5!  # R# )zeGet paths of CUDA_HOME.
If *subdirs* are the subdirectory name to be appended in the resulting
path.
r   N	CUDA_PATH)rJ   environgetr(   rL   )rM   	cuda_homes   * r   r   r      sQ    
 

{+IJJNN;/	ww||I000 r   c                  r    \        4       w  r\        R V4      pV'       d   \        V4      MRp\        W4      # )r   N)r)   r   r.   r   )r	   r(   r0   s      r   _get_nvvm_pathrh      s0    &(HB&$'J(3z?dD2$$r   c            	         \        \        R4      '       d   \        P                  # R\        4       R\	        4       R\        4       R\        4       /p V \        n        V # )a$  Returns a dictionary mapping component names to a 2-tuple
of (source_variable, info).

The returned dictionary will have the following keys and infos:
- "nvvm": file_path
- "libdevice": List[Tuple[arch, file_path]]
- "cudalib_dir": directory_path

Note: The result of the function is cached.
_cached_resultr   r   cudalib_dirstatic_cudalib_dir)hasattrget_cuda_pathsrj   rh   r2   rB   rD   )ds    r   rn   rn      sY     ~/00,,, N$-/+- "9";	
 )*%r   c                 X    Rp \         P                  P                  V 4      '       g   R# V # )zQ
Return the Debian NVIDIA Maintainers-packaged libdevice location, if it
exists.
z&/usr/lib/nvidia-cuda-toolkit/libdeviceN)rJ   r(   rK   )pkg_libdevice_locations    r   r   r      s(    
 F77>>011!!r   ) rG   r,   rJ   collectionsr   numba.core.configr   numba.misc.findlibr   r   r   r   r    r$   r)   r2   r4   r8   r;   r>   rB   rD   r   r   r'   r   r:   r=   r   rh   rn   r   r   r   r   <module>ru      s    
 	 	 " & 2 .v?	!	$'
'
	0''6/)($
1%6"r   