� u��g"����dZddlZddlZddlZddlZddlZddlZddlmZddl Z ddl m Z ddl m Z mZddlmZddlmZdZgd �Zej�d d ��ejd krejnejZejd krejnejZGd �dej��Z ejZ n#e!$r ej"Z YnwxYwGd�de ��Z#Gd�de#��Z$Gd�de#��Z%Gd�de#��Z&Gd�de#��Z'Gd�de#��Z(e$e%e'e(e&gZ)e*e+d�e)D������Z,d�e)D��Z-e*e+d�e)D������Z.d�e)D��Z/e(j0Z1d�Z2d �Z3ed!�"��d#���Z4e3e*e,��e-�$��d%���Z5Gd&�d'��Z6Gd(�d)e6e��Z7e3d*�8d+�e,D����d*�8e/��d*�8e1���,��Gd-�d.e6����Z9Gd/�d0��Z:d1�Z;e<d2kr e;��dSdS)3z�threadpoolctl This module provides utilities to introspect native libraries that relies on thread pools (notably BLAS and OpenMP implementations) and dynamically set the maximal number of threads they can use. �N)�final)� find_library)�ABC�abstractmethod)� lru_cache)�ContextDecoratorz3.6.0)�threadpool_limits�threadpool_info�ThreadpoolController� LibController�register�KMP_DUPLICATE_LIB_OK�Truelc�>�eZdZdefdejfdejfdefgZdS)� _dl_phdr_info� dlpi_addr� dlpi_name� dlpi_phdr� dlpi_phnumN) �__name__� __module__� __qualname__� _SYSTEM_UINT�ctypes�c_char_p�c_void_p�_SYSTEM_UINT_HALF�_fields_���]/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/threadpoolctl.pyrr8s:������ �l�#� �f�o�&� �f�o�&� �(�)� �H�H�Hr rc��eZdZdZedddd�d���Zd�Zd�Zed���Z e d���Z e d ���Z e d ���Z d �Zd �ZdS) r a Abstract base class for the individual library controllers A library controller must expose the following class attributes: - user_api : str Usually the name of the library or generic specification the library implements, e.g. "blas" is a specification with different implementations. - internal_api : str Usually the name of the library or concrete implementation of some specification, e.g. "openblas" is an implementation of the "blas" specification. - filename_prefixes : tuple Possible prefixes of the shared library's filename that allow to identify the library. e.g. "libopenblas" for libopenblas.so. and implement the following methods: `get_num_threads`, `set_num_threads` and `get_version`. Threadpoolctl loops through all the loaded shared libraries and tries to match the filename of each library with the `filename_prefixes`. If a match is found, a controller is instantiated and a handler to the library is stored in the `dynlib` attribute as a `ctypes.CDLL` object. It can be used to access the necessary symbols of the shared library to implement the above methods. The following information will be exposed in the info dictionary: - user_api : standardized API, if any, or a copy of internal_api. - internal_api : implementation-specific API. - num_threads : the current thread limit. - prefix : prefix of the shared library's filename. - filepath : path to the loaded shared library. - version : version of the library (if available). In addition, each library controller may expose internal API specific entries. They must be set as attributes in the `set_additional_attributes` method. N��filepath�prefix�parentc� �||_||_||_tj|t ���|_|���\|_|_ |� ��|_ |� ��dS)z0This is not meant to be overriden by subclasses.��modeN) r&r%r$r�CDLL� _RTLD_NOLOAD�dynlib� _find_affixes�_symbol_prefix�_symbol_suffix� get_version�version�set_additional_attributes)�selfr$r%r&s r!�__init__zLibController.__init__lsv���� ��� � �� ��k�(��>�>�>�� �37�3E�3E�3G�3G�0���T�0��'�'�)�)�� � �&�&�(�(�(�(�(r c���d�|j|j|jd��fd�t|�����D���S)�&Return relevant info wrapped in a dict)r,r&r.r/)�user_api� internal_api� num_threadsc�$��i|] \}}|�v� ||�� Srr)�.0�k�v� hidden_attrss �r!� <dictcomp>z&LibController.info.<locals>.<dictcomp>~s)���L�L�L���1�a�|�6K�6K�q�!�6K�6K�6Kr )r7r8r9�vars�items)r3r>s @r!�infozLibController.infowsY���O� �� � �-��+� � �M�L�L�L��T� � � 0� 0� 2� 2�L�L�L�  � r c��dS)z>Set additional attributes meant to be exposed in the info dictNr�r3s r!r2z'LibController.set_additional_attributes�����r c�*�|���S)z�Exposes the current thread limit as a dynamic property This is not meant to be used or overriden by subclasses. )�get_num_threadsrDs r!r9zLibController.num_threads�s�� �#�#�%�%�%r c��dS)z5Return the maximum number of threads available to useNrrDs r!rGzLibController.get_num_threads�rEr c��dS)z(Set the maximum number of threads to useNr)r3r9s r!�set_num_threadszLibController.set_num_threads�rEr c��dS)z(Return the version of the shared libraryNrrDs r!r0zLibController.get_version�rEr c��dS)z8Return the affixes for the symbols of the shared library)�rMrrDs r!r-zLibController._find_affixes�s���vr c�N�t|j|j�|�|j��d��S)zBReturn the symbol of the shared library accounding for the affixesN)�getattrr,r.r/)r3�names r!� _get_symbolzLibController._get_symbol�s3��� �K�D�/�L��L�t�7J�L�L�d� � � r )rrr�__doc__rr4rBr2�propertyr9rrGrJr0r-rQrr r!r r Hs�������!�!�F �#'��T�)�)�)�)� �U�)� � � �M�M�M��&�&��X�&��D�D��^�D��7�7��^�7��7�7��^�7���� � � � � r r c��eZdZdZdZdZdZdZdZe d�e j ee��D����Z d�Z d �Zd �Zd �Zd �Zd �Zd�ZdS)�OpenBLASControllerzController class for OpenBLAS�blas�openblas)� libopenblas�libblas�libscipy_openblas)rM�scipy_)rM�64_�_64c#�*K�|]\}}|�d|��V��dS)�openblas_get_num_threadsNr)r;r%�suffixs r!� <genexpr>zOpenBLASController.<genexpr>�sH������ �F�F� �3�3�6�3�3������r c��tj|j|j��D]%\}}t |j|�d|����r||fcS�&dS�Nr_)� itertools�product�_symbol_prefixes�_symbol_suffixes�hasattrr,)r3r%r`s r!r-z OpenBLASController._find_affixes�sp��'�/� � !�4�#8� � � &� &�N�F�F��t�{�v�$O�$O�v�$O�$O�P�P� &��v�~�%�%�%� &� &� &r c�j�|���|_|���|_dS�N��_get_threading_layer�threading_layer�_get_architecture� architecturerDs r!r2z,OpenBLASController.set_additional_attributes��0��#�8�8�:�:��� �2�2�4�4����r c�H�|�d��}|� |��SdSrc�rQ)r3�get_num_threads_funcs r!rGz"OpenBLASController.get_num_threads�s1��#�/�/�0J�K�K�� � +�'�'�)�)� )��tr c�J�|�d��}|� ||��SdS)N�openblas_set_num_threadsrr)r3r9�set_num_threads_funcs r!rJz"OpenBLASController.set_num_threads�s3��#�/�/�0J�K�K�� � +�'�'� �4�4� 4��tr c���|�d��}|�Vtj|_|�����}|ddkr|d�d��SdSdS)N�openblas_get_configrsOpenBLAS��utf-8)rQrr�restype�split�decode)r3�get_version_func�configs r!r0zOpenBLASController.get_version�su�� �+�+�,A�B�B�� � '�'-�� � $�%�%�'�'�-�-�/�/�F��a�y�K�'�'��a�y�'�'��0�0�0��4��tr c�l�|�d��}|�|��}|dkrdS|dkrdSdSdS) z&Return the threading layer of OpenBLAS�openblas_get_parallelN��openmpry�pthreads�disabled�unknownrr)r3�get_threading_layer_funcrms r!rlz'OpenBLASController._get_threading_layer�sU��#'�#3�#3�4K�#L�#L� � #� /�6�6�8�8�O��!�#�#��x� �A�%�%�!�z��:��yr c��|�d��}|�.tj|_|���d��SdS)z,Return the architecture detected by OpenBLAS�openblas_get_corenameNrz)rQrrr{r})r3�get_architecture_funcs r!rnz$OpenBLASController._get_architecture�sJ�� $� 0� 0�1H� I� I�� � ,�,2�O� !� )�(�(�*�*�1�1�'�:�:� :��tr N)rrrrRr7r8�filename_prefixesrfrg�tuplerdre� check_symbolsr-r2rGrJr0rlrnrr r!rUrU�s�������'�'��H��L�G��%��)���E���/�i�/�0@�BR�S�S������M� &�&�&�5�5�5���� ��� � � � � � �����r rUc�F�eZdZdZdZdZdZdZd�Zd�Z d�Z d �Z d �Z d �Z d S) �BLISControllerzController class for BLISrV�blis)�libblisrY)�bli_thread_get_num_threads�bli_thread_set_num_threads�bli_info_get_version_str�bli_info_get_enable_openmp�bli_info_get_enable_pthreads�bli_arch_query_id�bli_arch_stringc�j�|���|_|���|_dSrjrkrDs r!r2z(BLISController.set_additional_attributes�rpr c�X�t|jdd���}|��}|dkrdn|S)Nr�c��dSrjrrr r!�<lambda>z0BLISController.get_num_threads.<locals>.<lambda>s��d�r �����ry�rOr,�r3�get_funcr9s r!rGzBLISController.get_num_threads�s9���4�;�(D�l�l�S�S���h�j�j� � �2�%�%�q�q�;�6r c�F�t|jdd���}||��S)Nr�c��dSrjr�r9s r!r�z0BLISController.set_num_threads.<locals>.<lambda>s��4�r r��r3r9�set_funcs r!rJzBLISController.set_num_threadss1��� �K�5�7O�7O� � ���x� �$�$�$r c��t|jdd��}|�dStj|_|���d��S)Nr�rz)rOr,rrr{r})r3� get_version_s r!r0zBLISController.get_version sE���t�{�,F��M�M� � � ��4�%�� ���|�~�~�$�$�W�-�-�-r c��t|jdd�����rdSt|jdd�����rdSdS)z"Return the threading layer of BLISr�c��dS�NFrrr r!r�z5BLISController._get_threading_layer.<locals>.<lambda>s��e�r r�r�c��dSr�rrr r!r�z5BLISController._get_threading_layer.<locals>.<lambda>s��%�r r�r�r�rDs r!rlz#BLISController._get_threading_layersS�� L�7�4�;� <�m�m� L� L� N� N� ��8� P�W�T�[�"@�-�-� P� P� R� R� ��:��zr c���t|jdd��}t|jdd��}|�|�dStj|_tj|_||�����d��S)z(Return the architecture detected by BLISr�Nr�rz)rOr,r�c_intr{rr})r3r�r�s r!rnz BLISController._get_architecturesz��#�D�K�1D�d�K�K��!�$�+�/@�$�G�G�� � $��(?��4�%+�L��!�"(�/�����0�0�2�2�3�3�:�:�7�C�C�Cr N)rrrrRr7r8r�r�r2rGrJr0rlrnrr r!r�r��s�������#�#��H��L�.���M�5�5�5�7�7�7�%�%�%� .�.�.���� D� D� D� D� Dr r�c���eZdZdZdZdZdZdZed���Z ed���Z �fd�Z d �Z d �Z d �Zd �Zdd�Zd�Zd�Z�xZS)�FlexiBLASControllerzController class for FlexiBLASrV� flexiblas)� libflexiblas)�flexiblas_get_num_threads�flexiblas_set_num_threads�flexiblas_get_version�flexiblas_list�flexiblas_list_loaded�flexiblas_current_backendc�.�|�d���S)NT��loaded)�_get_backend_listrDs r!�loaded_backendsz#FlexiBLASController.loaded_backends9s���%�%�T�%�2�2�2r c�*�|���Srj)�_get_current_backendrDs r!�current_backendz#FlexiBLASController.current_backend=s���(�(�*�*�*r c�p��t�����}|j|d<|j|d<|S)r6r�r�)�superrBr�r�)r3� exposed_attrs� __class__s �r!rBzFlexiBLASController.infoAs8������ � ��� �+/�+?� �'�(�+/�+?� �'�(��r c�<�|�d���|_dS)NFr�)r��available_backendsrDs r!r2z-FlexiBLASController.set_additional_attributesKs!��"&�"8�"8��"8�"F�"F����r c�X�t|jdd���}|��}|dkrdn|S)Nr�c��dSrjrrr r!r�z5FlexiBLASController.get_num_threads.<locals>.<lambda>Os��T�r r�ryr�r�s r!rGz#FlexiBLASController.get_num_threadsNs9���4�;�(C�\�\�R�R���h�j�j� � �2�%�%�q�q�;�6r c�F�t|jdd���}||��S)Nr�c��dSrjrr�s r!r�z5FlexiBLASController.set_num_threads.<locals>.<lambda>Ws��$�r r�r�s r!rJz#FlexiBLASController.set_num_threadsUs1��� �K�4�6N�6N� � ���x� �$�$�$r c�`�t|jdd��}|�dStj��}tj��}tj��}|tj|��tj|��tj|����|j�d|j�d|j��S)Nr��.)rOr,rr��byref�value)r3r��major�minor�patchs r!r0zFlexiBLASController.get_version[s����t�{�,C�T�J�J� � � ��4�� ����� ����� ����� �V�\�%�(�(�&�,�u�*=�*=�v�|�E�?R�?R�S�S�S��+�;�;�� �;�;�e�k�;�;�;r Fc�f�d|rdnd��}t|j|d��}|�dS|ddd��}g}t|��D]n}tjd��}||d|��|j�d��dkr-|�|j�d�����o|S) z�Return the list of available backends for FlexiBLAS. If loaded is False, return the list of available backends from the FlexiBLAS configuration. If loaded is True, return the list of actually loaded backends. r��_loadedrMNr�rz� __FALLBACK__)rOr,�ranger�create_string_bufferr�r}�append)r3r�� func_name�get_backend_list_� n_backends�backends�i� backend_names r!r�z%FlexiBLASController._get_backend_listfs��� C�&�%@�Y�Y�b�B�B� �#�D�K��D�A�A�� � $��4�&�&�t�Q��2�2� ����z�"�"� D� D�A�!�6�t�<�<�L� � �l�D�!� 4� 4� 4��!�(�(��1�1�^�C�C���� � 2� 9� 9�'� B� B�C�C�C���r c���t|jdd��}|�dStjd��}||tj|����|j�d��S)zReturn the backend of FlexiBLASr�Nr�rz)rOr,rr��sizeofr�r})r3� get_backend_�backends r!r�z(FlexiBLASController._get_current_backend}sc���t�{�,G��N�N� � � ��4��-�d�3�3��� �W�f�m�G�4�4�5�5�5��}�#�#�G�,�,�,r c���||jvr�||jvrt|jdd���}nt|jdd���}|t |���d����}|dkrt d|�d|j�d ����|j���t|jd d ���}|j� |��}||��}|dkrt d |�d ����dS)aSwitch the backend of FlexiBLAS Parameters ---------- backend : str The name or the path to the shared library of the backend to switch to. If the backend is not already loaded, it will be loaded first. �flexiblas_load_backendc��dS�Nr�r��_s r!r�z4FlexiBLASController.switch_backend.<locals>.<lambda>�s��UW�r �flexiblas_load_backend_libraryc��dSr�rr�s r!r�z4FlexiBLASController.switch_backend.<locals>.<lambda>�s��R�r rzr�zFailed to load backend zS. It must either be the name of a backend available in the FlexiBLAS configuration z' or the path to a valid shared library.�flexiblas_switchc��dSr�rr�s r!r�z4FlexiBLASController.switch_backend.<locals>.<lambda>�s���r zFailed to switch to backend r�N) r�r�rOr,�str�encode� RuntimeErrorr&�_load_libraries�index)r3r�� load_func�res� switch_func�idxs r!�switch_backendz"FlexiBLASController.switch_backend�s:�� �$�.� .� .��$�1�1�1�#�D�K�1I�<�<�X�X� � �#��K�!A�<�<��� ��)�C��L�L�/�/��8�8�9�9�C��b�y�y�"�X�g�X�X��.�X�X�X���� �K� '� '� )� )� )��d�k�+=�|�|�L�L� ��"�(�(��1�1���k�#���� �"�9�9��J�g�J�J�J�K�K� K� �9r )F)rrrrRr7r8r�r�rSr�r�rBr2rGrJr0r�r�r�� __classcell__�r�s@r!r�r�*s�������(�(��H��L�)���M��3�3��X�3��+�+��X�+������G�G�G�7�7�7�%�%�%� <� <� <�����.-�-�-� L� L� L� L� L� L� Lr r�c�@�eZdZdZdZdZdZdZd�Zd�Z d�Z d �Z d �Z d S) � MKLControllerzController class for MKLrV�mkl)� libmkl_rt�mkl_rtrY)�MKL_Get_Max_Threads�MKL_Set_Num_Threads�MKL_Get_Version_String�MKL_Set_Threading_Layerc�8�|���|_dSrj)rlrmrDs r!r2z'MKLController.set_additional_attributes�s��#�8�8�:�:����r c�D�t|jdd���}|��S)Nr�c��dSrjrrr r!r�z/MKLController.get_num_threads.<locals>.<lambda>����t�r r��r3r�s r!rGzMKLController.get_num_threads��$���4�;�(=�|�|�L�L���x�z�z�r c�F�t|jdd���}||��S)Nr�c��dSrjrr�s r!r�z/MKLController.set_num_threads.<locals>.<lambda>����SW�r r�r�s r!rJzMKLController.set_num_threads��*���4�;�(=�?W�?W�X�X���x� �$�$�$r c�L�t|jd��sdStjd��}|j�|d��|j�d��}tjd|��}|�|� ��d}|� ��S)Nr���rzzVersion ([^ ]+) r) rhr,rr�r�r�r}�re�search�groups�strip)r3r�r1�groups r!r0zMKLController.get_version�s����t�{�$<�=�=� ��4��)�#�.�.�� � �*�*�3��4�4�4��)�"�"�7�+�+��� �-�w�7�7�� � ��l�l�n�n�Q�'�G��}�}���r c�d�t|jdd���}ddddddd �}||d ��S) z!Return the threading layer of MKLrc��dSr�r)�layers r!r�z4MKLController._get_threading_layer.<locals>.<lambda>�s��"�r �intel� sequential�pgi�gnu�tbbz not specified)rryr���r�r�r�)r3�set_threading_layer� layer_maps r!rlz"MKLController._get_threading_layer�s[�� &� �K�2�4D�4D� � ��������  � � ��,�,�R�0�0�1�1r N) rrrrRr7r8r�r�r2rGrJr0rlrr r!r�r��s|������"�"��H��L�:���M�;�;�;����%�%�%� � � �2�2�2�2�2r r�c�4�eZdZdZdZdZdZdZd�Zd�Z d�Z dS) �OpenMPControllerzController class for OpenMPr�)�libiomp�libgomp�libomp�vcomp)�omp_get_max_threads�omp_get_num_threadsc�D�t|jdd���}|��S)Nr$c��dSrjrrr r!r�z2OpenMPController.get_num_threads.<locals>.<lambda>�rr r�rs r!rGz OpenMPController.get_num_threads�rr c�F�t|jdd���}||��S)N�omp_set_num_threadsc��dSrjrr�s r!r�z2OpenMPController.set_num_threads.<locals>.<lambda>�r r r�r�s r!rJz OpenMPController.set_num_threads�r r c��dSrjrrDs r!r0zOpenMPController.get_version�s���tr N) rrrrRr7r8r�r�rGrJr0rr r!rr�s^������%�%��H��L�A���M� ���%�%�%�����r rc#�$K�|] }|jV�� dSrj)r7�r;�libs r!raras$����C�C�3�#�,�C�C�C�C�C�Cr c��g|] }|j�� Sr)r8r-s r!� <listcomp>r0s��C�C�C�3�c�&�C�C�Cr c#�.K�|]}|jD]}|V���dSrj)r�)r;r.r%s r!raras2����O�O�3��9N�O�O�v��O�O�O�O�O�O�Or c�2�g|]}|jdk� |j��S)rV)r7r8r-s r!r0r0 s.������C�L�F�4J�4J�C��4J�4J�4Jr c���t�|��t�|j��t�|j��t �|j��dS)zRegister a new controllerN) �_ALL_CONTROLLERSr��_ALL_USER_APISr7�_ALL_INTERNAL_APISr8� _ALL_PREFIXES�extendr�)� controllers r!r r sa�����J�'�'�'����*�-�.�.�.����j�5�6�6�6�����5�6�6�6�6�6r c������fd�}|S)Nc�D��|j�|jj�i���|_|Srj)rR�format)�o�args�kwargss ��r!� decoratorz$_format_docstring.<locals>.decorators+��� �9� �(�� �(�$�9�&�9�9�A�I��r r)r>r?r@s`` r!�_format_docstringrAs*���������� �r i')�maxsizec�@�tj�|��S)zCSmall caching wrapper around os.path.realpath to limit system calls)�os�path�realpath�r$s r!� _realpathrH!s�� �7� � �H� %� %�%r )� USER_APIS� INTERNAL_APISc�B�t�����S)a�Return the maximal number of threads for each detected library. Return a list with all the supported libraries that have been found. Each library is represented by a dict with the following information: - "user_api" : user API. Possible values are {USER_APIS}. - "internal_api": internal API. Possible values are {INTERNAL_APIS}. - "prefix" : filename prefix of the specific implementation. - "filepath": path to the loaded library. - "version": version of the library (if available). - "num_threads": the current thread limit. In addition, each library may contain internal_api specific entries. )r rBrr r!r r 's�� � !� !� &� &� (� (�(r c�f�eZdZdZddd�d�Zd�Zd�Zeddd�d���Zd�Z e Z d �Z d �Z d �Z dS) �_ThreadpoolLimitera�The guts of ThreadpoolController.limit Refer to the docstring of ThreadpoolController.limit for more details. It will only act on the library controllers held by the provided `controller`. Using the default constructor sets the limits right away such that it can be used as a callable. Setting the limits can be delayed by using the `wrap` class method such that it can be used as a decorator. N��limitsr7c���||_|�||��\|_|_|_|j���|_|���dSrj)� _controller� _check_params�_limits� _user_api� _prefixesrB�_original_info�_set_threadpool_limits�r3r9rOr7s r!r4z_ThreadpoolLimiter.__init__Esb��%���7;�7I�7I� �H�8 �8 �4�� �d�n�d�n�#�.�3�3�5�5��� �#�#�%�%�%�%�%r c��|SrjrrDs r!� __enter__z_ThreadpoolLimiter.__enter__Ms��� r c�.�|���dSrj)�restore_original_limits)r3�typer�� tracebacks r!�__exit__z_ThreadpoolLimiter.__exit__Ps�� �$�$�&�&�&�&�&r c�&�t|||���S)z@Return an instance of this class that can be used as a decorator)r9rOr7)�_ThreadpoolLimiterDecorator)�clsr9rOr7s r!�wrapz_ThreadpoolLimiter.wrapSs"��+�!�&�8� � � � r c��t|jj|j��D] \}}|�|d���!dS)z,Set the limits back to their original valuesr9N)�ziprQ�lib_controllersrVrJ)r3�lib_controller� original_infos r!r\z*_ThreadpoolLimiter.restore_original_limitsZsZ��-0� � � ,�d�.A�. �. � I� I� )�N�M� � *� *�=��+G� H� H� H� H� I� Ir c�~��i}g}|jD]���fd�|jD��}t|��}t|��}|dkr|���}n-|dkrd}n$t |��}|����||�<��|r-tjdd� |��zdz��|S)zuOriginal num_threads from before calling threadpool_limits Return a dict `{user_api: num_threads}`. c�8��g|]}|d�k�|d��S)r7r9r)r;�lib_infor7s �r!r0z?_ThreadpoolLimiter.get_original_num_threads.<locals>.<listcomp>ms8��������J�'�8�3�3���'�3�3�3r ryrNz1Multiple value possible for following user apis: �, z. Returning the minimum.) rTrV�set�len�pop�minr��warnings�warn�join)r3r9� warning_apisrO�n_limits�limitr7s @r!�get_original_num_threadsz+_ThreadpoolLimiter.get_original_num_threadsds���� � �� ��� *� *�H����� $� 3����F� ��[�[�F��6�{�{�H��1�}�}�� � � � ����Q�������F� � ���#�#�H�-�-�-�$)�K�� !� !� � � �M�C��)�)�L�)�)�*�,�-� � � � �r c���t�t��r4�dkr.|j������\�}��t�t ��rE|�t }n(|t vr|g}ntdt �d|�d�������fd�|D���g}n�t�t��r d��D���n&t�t��rd��j D���t�t��s td t����d ����d ��D��}d ��D��}�||fS) zCSuitable values for the _limits, _user_api and _prefixes attributes�sequential_blas_under_openmpNzuser_api must be either in z or None. Got z instead.c���i|]}|���Srr)r;�apirOs �r!r?z4_ThreadpoolLimiter._check_params.<locals>.<dictcomp>�s���:�:�:�#�#�v�:�:�:r c�,�i|]}|d|d��S�r%r9r)r;rks r!r?z4_ThreadpoolLimiter._check_params.<locals>.<dictcomp>�s1�����DL�H�X�&���(?���r c�(�i|]}|j|j��Srr}�r;rgs r!r?z4_ThreadpoolLimiter._check_params.<locals>.<dictcomp>�s0�����&�#�)�>�+E���r zUlimits must either be an int, a list, a dict, or 'sequential_blas_under_openmp'. Got z insteadc�$�g|] }|tv� |��Sr)r7)r;r%s r!r0z4_ThreadpoolLimiter._check_params.<locals>.<listcomp>�s"��O�O�O�6�v��7N�7N��7N�7N�7Nr c�$�g|] }|tv� |��Sr)r5�r;r{s r!r0z4_ThreadpoolLimiter._check_params.<locals>.<listcomp>�s"��G�G�G����1F�1F��1F�1F�1Fr )� isinstancer�rQ�,_get_params_for_sequential_blas_under_openmp�values�intr5� ValueError�listr rf�dict� TypeErrorr])r3rOr7�prefixess ` r!rRz _ThreadpoolLimiter._check_params�s���� �f�c� "� "� Y�v�1O�'O�'O�� �M�M�O�O�V�V�X�X� ��� �>�Z���4�4�>���)����^�+�+�$�:��� �+�.�+�+��+�+�+���� �!�:�:�:�:��:�:�:���H�H��&�$�'�'� ���PV�������F�$8�9�9� ���*0�*@����� �f�d�+�+� ��R�;?��<�<�R�R�R����P�O�V�O�O�O�H�G�G�v�G�G�G�H��x��)�)r c���|j�dS|jjD]\}|j|jvr|j|j}n"|j|jvr|j|j}n�E|�|�|���]dS)z�Change the maximal number of threads in selected thread pools. Return a list with all the supported libraries that have been found matching `self._prefixes` and `self._user_api`. N)rSrQrfr%r7rJ)r3rgr9s r!rWz)_ThreadpoolLimiter._set_threadpool_limits�s��� �<� � �F�"�.�>� <� <�N��$�� �4�4�"�l�>�+@�A� � ��(�D�L�8�8�"�l�>�+B�C� � ���&��.�.�{�;�;�;�� <� <r )rrrrRr4rZr_� classmethodrcr\� unregisterrwrRrWrr r!rMrM:s���������.2�D�&�&�&�&�&����'�'�'��(,�t� � � � ��[� � I�I�I�)�J�"�"�"�H1*�1*�1*�f<�<�<�<�<r rMc�&�eZdZdZddd�d�Zd�ZdS)raz8Same as _ThreadpoolLimiter but to be used as a decoratorNrNc�f�|�||��\|_|_|_||_dSrj)rRrSrTrUrQrXs r!r4z$_ThreadpoolLimiterDecorator.__init__�s9��7;�7I�7I� �H�8 �8 �4�� �d�n�d�n�&����r c�j�|j���|_|���|Srj)rQrBrVrWrDs r!rZz%_ThreadpoolLimiterDecorator.__enter__�s2��#�.�3�3�5�5��� �#�#�%�%�%�� r )rrrrRr4rZrr r!rara�sG������B�B�-1�D�&�&�&�&�&� ����r rarlc#�"K�|] }d|�d�V�� dS)�"Nrr�s r!rara�s*����=�=�s� �C� � � �=�=�=�=�=�=r �rI� BLAS_LIBS� OPENMP_LIBSc�@��eZdZdZd�fd� Zed�fd� ��Z�xZS)r agChange the maximal number of threads that can be used in thread pools. This object can be used either as a callable (the construction of this object limits the number of threads), as a context manager in a `with` block to automatically restore the original state of the controlled libraries when exiting the block, or as a decorator through its `wrap` method. Set the maximal number of threads that can be used in thread pools used in the supported libraries to `limit`. This function works for libraries that are already loaded in the interpreter and can be changed dynamically. This effect is global and impacts the whole Python process. There is no thread level isolation as these libraries do not offer thread-local APIs to configure the number of threads to use in nested parallel calls. Parameters ---------- limits : int, dict, 'sequential_blas_under_openmp' or None (default=None) The maximal number of threads that can be used in thread pools - If int, sets the maximum number of threads to `limits` for each library selected by `user_api`. - If it is a dictionary `{{key: max_threads}}`, this function sets a custom maximum number of threads for each `key` which can be either a `user_api` or a `prefix` for a specific library. - If 'sequential_blas_under_openmp', it will chose the appropriate `limits` and `user_api` parameters for the specific use case of sequential BLAS calls within an OpenMP parallel region. The `user_api` parameter is ignored. - If None, this function does not do anything. user_api : {USER_APIS} or None (default=None) APIs of libraries to limit. Used only if `limits` is an int. - If "blas", it will only limit BLAS supported libraries ({BLAS_LIBS}). - If "openmp", it will only limit OpenMP supported libraries ({OPENMP_LIBS}). Note that it can affect the number of threads used by the BLAS libraries if they rely on OpenMP. - If None, this function will apply to all supported libraries. Nc�h��t���t��||���dS�NrN)r�r4r )r3rOr7r�s �r!r4zthreadpool_limits.__init__s/��� �����-�/�/����R�R�R�R�Rr c�d��t���t��||���Sr�)r�rcr )rbrOr7r�s �r!rczthreadpool_limits.wraps&����w�w�|�|�0�2�2�6�H�|�U�U�Ur )NN)rrrrRr4r�rcr�r�s@r!r r �s�������� ,�,�\S�S�S�S�S�S��V�V�V�V�V��[�V�V�V�V�Vr r c�.�eZdZdZe��Zd�Zed���Zd�Z d�Z d�Z e d� d�eD����d� e��d� e��� ��d d d �d ���Ze d� d �eD����d� e��d� e��� ��d d d �d���Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zed���Zed���Zd S)r z�Collection of LibController objects for all loaded supported libraries Attributes ---------- lib_controllers : list of `LibController` objects The list of library controllers of all loaded supported libraries. c�d�g|_|���|���dSrj)rfr��_warn_if_incompatible_openmprDs r!r4zThreadpoolController.__init__0s4��!��� ������ �)�)�+�+�+�+�+r c�>�|�|��}||_|Srj)�__new__rf)rbrf�new_controllers r!�_from_controllersz&ThreadpoolController._from_controllers5s!�����S�)�)��)8��&��r c�$�d�|jD��S)z.Return lib_controllers info as a list of dictsc�6�g|]}|�����Sr)rBrs r!r0z-ThreadpoolController.info.<locals>.<listcomp>=s$��Q�Q�Q�.��#�#�%�%�Q�Q�Qr )rfrDs r!rBzThreadpoolController.info;s��Q�Q�D�<P�Q�Q�Q�Qr c ��������D]"\}}t|t��s|gn|�|<�#�fd�|jD��}t�|��S)a>Return a ThreadpoolController containing a subset of its current library controllers It will select all libraries matching at least one pair (key, value) from kwargs where key is an entry of the library info dict (like "user_api", "internal_api", "prefix", ...) and value is the value or a list of acceptable values for that entry. For instance, `ThreadpoolController().select(internal_api=["blis", "openblas"])` will select all library controllers whose internal_api is either "blis" or "openblas". c�p���g|]1�t�fd�����D�����/���2S)c3�D�K�|]\}}t�|d��|vV��dSrj)rO)r;�key�valsrgs �r!raz9ThreadpoolController.select.<locals>.<listcomp>.<genexpr>RsL��������C�����T�2�2�d�:������r )�anyrA)r;rgr?s @�r!r0z/ThreadpoolController.select.<locals>.<listcomp>Osh���� � � �������!'���������� � � � � r )rAr�r�rfr r�)r3r?r�r�rfs ` r!�selectzThreadpoolController.select?s���� ����� I� I�I�C��(2�4��(>�(>�H�4�&�&�D�F�3�K�K� � � � �"&�"6� � � ��$�5�5�o�F�F�Fr c�N�|�dd���jrddd�Sddd�S)z�Return appropriate params to use for a sequential BLAS call in an OpenMP loop This function takes into account the unexpected behavior of OpenBLAS with the OpenMP threading layer. rWr�)r8rmNrNryrV)r�rfrDs r!r�zAThreadpoolController._get_params_for_sequential_blas_under_openmpZsE�� �;�;�#�X� � � � � 6�#��5�5� 5���0�0�0r rlc#�@K�|]}d�|��V��dS�z"{}"N�r<r�s r!razThreadpoolController.<genexpr>g�.����I�I�3�F�M�M�#�.�.�I�I�I�I�I�Ir r�NrNc�&�t|||���S)a�Change the maximal number of threads that can be used in thread pools. This function returns an object that can be used either as a callable (the construction of this object limits the number of threads) or as a context manager, in a `with` block to automatically restore the original state of the controlled libraries when exiting the block. Set the maximal number of threads that can be used in thread pools used in the supported libraries to `limits`. This function works for libraries that are already loaded in the interpreter and can be changed dynamically. This effect is global and impacts the whole Python process. There is no thread level isolation as these libraries do not offer thread-local APIs to configure the number of threads to use in nested parallel calls. Parameters ---------- limits : int, dict, 'sequential_blas_under_openmp' or None (default=None) The maximal number of threads that can be used in thread pools - If int, sets the maximum number of threads to `limits` for each library selected by `user_api`. - If it is a dictionary `{{key: max_threads}}`, this function sets a custom maximum number of threads for each `key` which can be either a `user_api` or a `prefix` for a specific library. - If 'sequential_blas_under_openmp', it will chose the appropriate `limits` and `user_api` parameters for the specific use case of sequential BLAS calls within an OpenMP parallel region. The `user_api` parameter is ignored. - If None, this function does not do anything. user_api : {USER_APIS} or None (default=None) APIs of libraries to limit. Used only if `limits` is an int. - If "blas", it will only limit BLAS supported libraries ({BLAS_LIBS}). - If "openmp", it will only limit OpenMP supported libraries ({OPENMP_LIBS}). Note that it can affect the number of threads used by the BLAS libraries if they rely on OpenMP. - If None, this function will apply to all supported libraries. rN)rM�r3rOr7s r!rvzThreadpoolController.limitfs��f"�$�v��I�I�I�Ir c#�@K�|]}d�|��V��dSr�r�r�s r!razThreadpoolController.<genexpr>�r�r c�<�t�|||���S)a�Change the maximal number of threads that can be used in thread pools. This function returns an object that can be used as a decorator. Set the maximal number of threads that can be used in thread pools used in the supported libraries to `limits`. This function works for libraries that are already loaded in the interpreter and can be changed dynamically. Parameters ---------- limits : int, dict or None (default=None) The maximal number of threads that can be used in thread pools - If int, sets the maximum number of threads to `limits` for each library selected by `user_api`. - If it is a dictionary `{{key: max_threads}}`, this function sets a custom maximum number of threads for each `key` which can be either a `user_api` or a `prefix` for a specific library. - If None, this function does not do anything. user_api : {USER_APIS} or None (default=None) APIs of libraries to limit. Used only if `limits` is an int. - If "blas", it will only limit BLAS supported libraries ({BLAS_LIBS}). - If "openmp", it will only limit OpenMP supported libraries ({OPENMP_LIBS}). Note that it can affect the number of threads used by the BLAS libraries if they rely on OpenMP. - If None, this function will apply to all supported libraries. rN)rMrcr�s r!rczThreadpoolController.wrap�s ��N"�&�&�t�F�X�&�N�N�Nr c�*�t|j��Srj)rnrfrDs r!�__len__zThreadpoolController.__len__�s���4�'�(�(�(r c��tjdkr|���dStjdkr|���dSdtjvr|���dS|���dS)zALoop through loaded shared libraries and store the supported ones�darwin�win32�pyodideN)�sys�platform�_find_libraries_with_dyld�+_find_libraries_with_enum_process_module_ex�modules�_find_libraries_pyodide�$_find_libraries_with_dl_iterate_phdrrDs r!r�z$ThreadpoolController._load_libraries�s��� �<�8� #� #� � *� *� ,� ,� ,� ,� ,� �\�W� $� $� � <� <� >� >� >� >� >� �#�+� %� %� � (� (� *� *� *� *� *� � 5� 5� 7� 7� 7� 7� 7r c�������}t|d��stjdt��gS�fd�}t jt jt jt��t j t j ��}||��}t j d��}|� ||��dS)anLoop through loaded libraries and return binders on supported ones This function is expected to work on POSIX system only. This code is adapted from code by Intel developer @anton-malakhov available at https://github.com/IntelPython/smp Copyright (c) 2017, Intel Corporation published under the BSD 3-Clause license �dl_iterate_phdrz9Could not find dl_iterate_phdr in the C standard library.c�x��|jj}|r*|�d��}��|��dS)Nrzr)�contentsrr}�_make_controller_from_path)rB�size�datar$r3s �r!�match_library_callbackzYThreadpoolController._find_libraries_with_dl_iterate_phdr.<locals>.match_library_callback�sA����}�.�H�� :�#�?�?�7�3�3���/�/��9�9�9��1r r N) � _get_libcrhrqrr�RuntimeWarningr� CFUNCTYPEr��POINTERr�c_size_trr�)r3�libcr��c_func_signature�c_match_library_callbackr�s` r!r�z9ThreadpoolController._find_libraries_with_dl_iterate_phdr�s�����~�~�����t�.�/�/� � �M�K�� � � ��I� � � � � �"�+� �L� �N�=� )� )� �O� �O�  � �� $4�#3�4J�#K�#K� ���s�#�#�� ���5�t�<�<�<�<�<r c��|���}t|d��stjdt��gS|���}t j|j_ t|��D]S}t j |�|����}|� d��}|� |���TdS)z�Loop through loaded libraries and return binders on supported ones This function is expected to work on OSX system only �_dyld_image_countz;Could not find _dyld_image_count in the C standard library.rzN)r�rhrqrrr�r�rr�_dyld_get_image_namer{r�� string_atr}r�)r3r��n_dyldr�r$s r!r�z.ThreadpoolController._find_libraries_with_dyld�s��� �~�~�����t�0�1�1� � �M�M�� � � ��I��'�'�)�)��,2�O��!�)��v��� 6� 6�A��'��(A�(A�!�(D�(D�E�E�H����w�/�/�H� � +� +�H� 5� 5� 5� 5�  6� 6r c �n�ddlm}m}m}d}d}d}|�d��}|�d��}|�||zdt j����} | s#td t j������� d } |��} || z��} tj | ��} |� | tj | ��| tj | ��|��std ���| | j krn| j | | zz} ��| j | | zz}t|| d |���}d|z}tj|��} |��}|D]�}|�| |tj | ��tj |����std���| j }t#|��|krt%jd|��t(����|�|���� |�| ��d S#|�| ��wxYw)aLoop through loaded libraries and return binders on supported ones This function is expected to work on windows system only. This code is adapted from code by Philipp Hagemeister @phihag available at https://stackoverflow.com/questions/17474574 r)�DWORD�HMODULE�MAX_PATHr��r�Psapi�kernel32FzCould not open PID �TzEnumProcessModulesEx failedN� zGetModuleFileNameEx failedz�Could not get the full path of a dynamic library (path too long). This library will be ignored and threadpoolctl might not be able to control or display information about all loaded libraries. Here's the truncated path: )�ctypes.wintypesr�r�r�� _get_windll� OpenProcessrD�getpid�OSErrorrr��EnumProcessModulesExr�r��map�create_unicode_buffer�GetModuleFileNameExWrnrqrrr�r�� CloseHandle)r3r�r�r��PROCESS_QUERY_INFORMATION�PROCESS_VM_READ�LIST_LIBRARIES_ALL�ps_api� kernel_32� h_process� buf_count�needed�buf�buf_size�count� h_modules�max_path�n_size�h_moduler$s r!r�z@ThreadpoolController._find_libraries_with_enum_process_module_exs��� =�<�<�<�<�<�<�<�<�<�$*�!� ��!���!�!�'�*�*���$�$�Z�0�0� ��)�)� %�� 7��� � � � � � �� ?��=�� � � �=�=�>�>� >�1 -��I��U�W�W�F� D�*�w��*�-�-��!�=��-�-���2�2���L��%�%���L��(�(�&� ��A�"�"?�@�@�@��v�|�+�+��"�L�X��-B�C� � D��L�X��%:�;�E��G�S��%��[�1�1�I� �H�}�H��.�x�8�8�C��U�W�W�F�%� >� >���2�2��x���c�):�):�F�L��<P�<P���@�"�">�?�?�?��9���x�=�=�H�,�,��M�U�IQ�U�U�'� �����3�3�H�=�=�=�=�% >�( � !� !�)� ,� ,� ,� ,� ,��I� !� !�)� ,� ,� ,� ,���s � E9H�H4c�� ddlm}n%#t$rtjd��YdSwxYw|j���D]6}tj� |��r|� |���7dS)a�Pyodide specific implementation for finding loaded libraries. Adapted from suggestion in https://github.com/joblib/threadpoolctl/pull/169#issuecomment-1946696449. One day, we may have a simpler solution. libc dl_iterate_phdr needs to be implemented in Emscripten and exposed in Pyodide, see https://github.com/emscripten-core/emscripten/issues/21354 for more details. r)�LDSOzHUnable to import LDSO from pyodide_js._module. This should never happen.N) �pyodide_js._moduler�� ImportErrorrqrr�loadedLibsByName� as_object_maprDrE�existsr�)r3r�r$s r!r�z,ThreadpoolController._find_libraries_pyodide\s��� � /� /� /� /� /� /� /��� � � � �M�� � � � �F�F�  �����-�;�;�=�=� :� :�H� �w�~�~�h�'�'� :��/�/��9�9�9��  :� :s � �+�+c�b���t|��}tj�|�����}t D]�}|�||j��}|�� |dkrR|�d��r<tj |t���t�fd�|j D����s�vn�x||||����|d�|jD��vr��t|d��r t�fd�|j D����r|j������dS) z:Store a library controller if it is supported and selectedNrY�.dllc3�8�K�|]}t�|��V��dSrj)rh)r;�funcrYs �r!razBThreadpoolController._make_controller_from_path.<locals>.<genexpr>�sA������� � ���.�.������r r#c3�$K�|] }|jV�� dSrjrGr-s r!razBThreadpoolController._make_controller_from_path.<locals>.<genexpr>�s$����I�I�S�C�L�I�I�I�I�I�Ir r�c3�B�K�|]}t�j|��V��dSrj)rhr,)r;rrgs �r!razBThreadpoolController._make_controller_from_path.<locals>.<genexpr>�sL�����E�E����-�t�4�4�E�E�E�E�E�Er )rHrDrE�basename�lowerr4� _check_prefixr��endswithrr*r+r�r�rfrhr�)r3r$�filename�controller_classr%rgrYs @@r!r�z/ThreadpoolController._make_controller_from_pathws������X�&�&���7�#�#�H�-�-�3�3�5�5��!1�. <�. <� ��'�'��2B�2T�U�U�F��~�� ��"�"��$�$�V�,�,� �$�k�(�L�A�A�G������$4�$B������!�!� !��.�-�!�&�����N��I�I�D�4H�I�I�I�I�I���+�_�=�=� <��E�E�E�E�,�:�E�E�E�B�B� <��$�+�+�N�;�;�;��]. <�. <r c�B�|D]}|�|��r|cS�dS)z]Return the prefix library_basename starts with Return None if none matches. N)� startswith)r3�library_basenamer�r%s r!rz"ThreadpoolController._check_prefix�s<�� (� � �F��*�*�6�2�2� �� � � � ��tr c��d�|jD��}tjd��}d|vr d|vrtj|t ��dSdSdS)z?Raise a warning if llvm-OpenMP and intel-OpenMP are both loadedc��g|] }|j�� Sr)r%rs r!r0zEThreadpoolController._warn_if_incompatible_openmp.<locals>.<listcomp>�s��U�U�U�n�N�)�U�U�Ur a� Found Intel OpenMP ('libiomp') and LLVM OpenMP ('libomp') loaded at the same time. Both libraries are known to be incompatible and this can cause random crashes or deadlocks on Linux when loaded in the same Python program. Using threadpoolctl may cause crashes or deadlocks. For more information and possible workarounds, please see https://github.com/joblib/threadpoolctl/blob/master/multiple_openmp.md r"r N)rf�textwrap�dedentrqrrr�)r3r��msgs r!r�z1ThreadpoolController._warn_if_incompatible_openmp�sk��U�U��@T�U�U�U���o� �  �  �� �x� � �I��$9�$9� �M�#�~� .� .� .� .� .� � �$9�$9r c��|j�d��}|�2tjt d��t ���}||jd<|S)z Load the lib-C for unix systems.r�N�cr()�_system_libraries�getrr*rr+)rbr�s r!r�zThreadpoolController._get_libc�sO���$�(�(��0�0�� �<��;�|�C�0�0�|�D�D�D�D�,0�C� !�&� )�� r c��|j�|��}|�!tj|�d���}||j|<|S)zLoad a windows DLLNr)rrr�WinDLL)rb�dll_name�dlls r!r�z ThreadpoolController._get_windll�sI���#�'�'��1�1�� �;��-�8� 1� 1� 1�2�2�C�.1�C� !�(� +�� r )rrrrRr�rr4r�r�rBr�r�rArsr5�_ALL_BLAS_LIBRARIES�_ALL_OPENMP_LIBRARIESrvrcr�r�r�r�r�r�r�rr�r�r�rr r!r r !sV�������������,�,�,� ����[�� R�R�R�G�G�G�6 1� 1� 1����)�)�I�I�.�I�I�I�I�I��)�)�/�0�0��I�I�3�4�4���� #�T�.J�.J�.J�.J� �� .J�`���)�)�I�I�.�I�I�I�I�I��)�)�/�0�0��I�I�3�4�4���� "�D�"O�"O�"O�"O� �� "O�H)�)�)� 8� 8� 8�'=�'=�'=�R6�6�6�.H-�H-�H-�T:�:�:�68<�8<�8<�t���/�/�/�"� � ��[� �����[���r r c�&�ddl}ddl}ddl}ddl}|�dd���}|�dddd d d � ��|�d dd���|�|jdd���}|jD]A} |� |d����#t$rtd||j ���Y�>wxYw|j rt|j ��t|�t!��d�����dS)zBCommandline interface to display thread-pool information and exit.rNz5python -m threadpoolctl -i numpy scipy.linalg xgboostz)Display thread-pool information and exit.)�usage� descriptionz-iz--importr��*rz;Python modules to import before introspecting thread-pools.)�dest�nargs�default�helpz-cz --commandz@a Python statement to execute before introspecting thread-pools.)r$ry)�packagezWARNING: could not import)�filer�)�indent)�argparse� importlib�jsonr��ArgumentParser� add_argument� parse_args�argvr�� import_moduler��print�stderr�command�exec�dumpsr )r(r)r*r��parser�options�modules r!�_mainr8�sy���O�O�O������K�K�K��J�J�J� � $� $�E�?�%���F� ��� �� ��� J� ���� ��� �� O����� �������� �-�-�G��/�H�H�� H� � #� #�F�D� #� 9� 9� 9� 9��� H� H� H� �-�v�C�J� G� G� G� G� G� G� H������� �W�_���� �$�*�*�_�&�&�q�*� 1� 1�2�2�2�2�2s�B�!C�C�__main__)=rRrDr r�rrdr�typingrrq� ctypes.utilr�abcrr� functoolsr� contextlibr� __version__�__all__�environ� setdefaultrB�c_uint64�c_uint32r�c_uint16r� Structurer� RTLD_NOLOADr+�AttributeError� DEFAULT_MODEr rUr�r�r�rr4r�rmr5r6r7rr�rr rArHr rMrarsr r r8rrr r!�<module>rJs+���� � � � � � � � � � � � � � � � �������������������$�$�$�$�$�$�#�#�#�#�#�#�#�#�������'�'�'�'�'�'�� � � � ��(� ���,�f�5�5�5�#&�+��"5�"5�v���6�?� �'*�{�U�':�':�F�O�O���������F�$����'��>�L�L���'�'�'��&�L�L�L�'����X �X �X �X �X �C�X �X �X �vE�E�E�E�E��E�E�E�P<D�<D�<D�<D�<D�]�<D�<D�<D�~}L�}L�}L�}L�}L�-�}L�}L�}L�@52�52�52�52�52�M�52�52�52�p�����}����6����� ����c�c�C�C�2B�C�C�C�C�C�D�D��C�C�2B�C�C�C�����C�O�O�*�O�O�O�O�O��� ��� 0�����)�:��7�7�7���� ��5����&�&���&� ��T�T�.�1�1�AS�T�T�T�)�)�U�T�)�$V<�V<�V<�V<�V<�V<�V<�V<�r�����"4�6F����$���i�i�=�=�n�=�=�=�=�=��i�i�+�,�,�� � �/�0�0���� 4V�4V�4V�4V�4V�*�4V�4V� �� 4V�nA�A�A�A�A�A�A�A�H#3�#3�#3�L �z��� �E�G�G�G�G�G��s�&B.�. B=�<B=
Memory