
    qKg
                         d Z ddlZdgZddZy)z!
Introspection helper functions.
    Nopt_func_infoc                    ddl m}m} | Jt        j                  |       }|j                         D ci c]  \  }}|j                  |      r|| }}}n|}|t        j                  |      }i }	|j                         D ]x  \  }}i }
|j                         D ]V  \  }}t        |D cg c]6  }|j                  |      xs! |j                   ||      j                        8 c}      sR||
|<   X |
st|
|	|<   z |	S |}	|	S c c}}w c c}w )aR  
    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':

    >>> 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)"
            }
          }
        }

    r   )__cpu_targets_info__dtype)	numpy._core._multiarray_umathr   r   recompileitemssearchanyname)	func_name	signaturetargetsr   func_patternkvmatching_funcssig_patternmatching_sigsmatching_charscharscs                X/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/numpy/lib/introspect.pyr   r   	   s5   r zz),$]]_
,TQ""1% qD_ 	 

 !jj+"((*DAqN"#'')w # #  &&q) 6&&uQx}}56" 
 -4N5) #, #1a  +  '/
s   D';D)NN)__doc__r   __all__r        r   <module>r      s    

Vr   