
    *i
                         S r S/rSS jrg)z!
Introspection helper functions.
opt_func_infoNc                   ^^ SSK nSSKJn  SSKJm  U bN  UR	                  U 5      nUR                  5        VVs0 s H  u  pVUR                  U5      (       d  M  XV_M!     nnnOUnUbw  UR	                  U5      m0 nUR                  5        HN  u  pV0 n	UR                  5        H&  u  p[        UU4S jU
 5       5      (       d  M"  X9U
'   M(     U	(       d  MJ  XU'   MP     U$ UnU$ s  snnf )a  
Returns a dictionary containing the currently supported CPU dispatched
features for all optimized functions.

Parameters
----------
func_name : str (optional)
    Regular expression to filter by function name.

signature : str (optional)
    Regular expression to filter by data type.

Returns
-------
dict
    A dictionary where keys are optimized function names and values are
    nested dictionaries indicating supported targets based on data types.

Examples
--------
Retrieve dispatch information for functions named 'add' or 'sub' and
data types 'float64' or 'float32':

>>> import numpy as np
>>> dict = np.lib.introspect.opt_func_info(
...     func_name="add|abs", signature="float64|complex64"
... )
>>> import json
>>> print(json.dumps(dict, indent=2))
    {
      "absolute": {
        "dd": {
          "current": "SSE41",
          "available": "SSE41 baseline(SSE SSE2 SSE3)"
        },
        "Ff": {
          "current": "FMA3__AVX2",
          "available": "AVX512F FMA3__AVX2 baseline(SSE SSE2 SSE3)"
        },
        "Dd": {
          "current": "FMA3__AVX2",
          "available": "AVX512F FMA3__AVX2 baseline(SSE SSE2 SSE3)"
        }
      },
      "add": {
        "ddd": {
          "current": "FMA3__AVX2",
          "available": "FMA3__AVX2 baseline(SSE SSE2 SSE3)"
        },
        "FFF": {
          "current": "FMA3__AVX2",
          "available": "FMA3__AVX2 baseline(SSE SSE2 SSE3)"
        }
      }
    }

    N)__cpu_targets_info__)dtypec              3      >#    U  H>  nTR                  U5      =(       d!    TR                  T" U5      R                  5      v   M@     g 7f)N)searchname).0cr   sig_patterns     R/var/www/html/ai-backend/venv/lib/python3.13/site-packages/numpy/lib/introspect.py	<genexpr> opt_func_info.<locals>.<genexpr>V   s>      "  &&q)N[-?-?a-NN"s   AA	)renumpy._core._multiarray_umathr   r   compileitemsr   any)	func_name	signaturer   targetsfunc_patternkvmatching_funcsmatching_sigsmatching_charscharsr   r   s              @@r   r   r      s    t M3zz),$]]_
,TQ""1% AD_ 	 

 !jj+"((*DAN"#'') "   -45) #, ~#1a  +  '-
s   C$C$)NN)__doc____all__r        r   <module>r#      s    
Wr"   