§
    ÐÁ³g  ã            	       ót   — d dl mZ d dlZd dlZ ej        e¦  «        Z	 d	dej        dee         deddfd„Z	dS )
é    )ÚListNFÚtrained_indexÚshard_fnamesÚivfdata_fnameÚreturnc                 ó|  — t          | t          j        ¦  «        r
J d¦   «         ‚g }|D ]s}t                               d|z   ¦  «         t          j        |t          j        ¦  «        }t          j        |¦  «        }|                     |j	        ¦  «         d|_
        Œt| }t          j        |¦  «        }|j        dk    s
J d¦   «         ‚t          j        |j        |j        |¦  «        }t          j        ¦   «         }	|D ]}
|	                     |
¦  «         Œt                               d|	                     ¦   «         z  ¦  «         |                     |	                     ¦   «         |	                     ¦   «         |¦  «        }|x|_        |_        |                     |d¦  «         |j                             ¦   «          dS )	z„Add the contents of the indexes stored in shard_fnames into the index
    trained_index. The on-disk data is stored in ivfdata_fnamez1IndexIVFPQR is not supported as an on disk index.zread Fr   zworks only on empty indexzmerge %d inverted lists TN)Ú
isinstanceÚfaissÚIndexIVFPQRÚLOGÚinfoÚ
read_indexÚIO_FLAG_MMAPÚextract_index_ivfÚappendÚinvlistsÚown_invlistsÚntotalÚOnDiskInvertedListsÚnlistÚ	code_sizeÚInvertedListsPtrVectorÚ	push_backÚsizeÚmerge_from_multipleÚdataÚreplace_invlistsÚthisÚdisown)r   r   r   Ú	shift_idsÚivfsÚfnameÚindexÚ	index_ivfr   Ú
ivf_vectorÚivfr   s               úR/var/www/html/mpstechhub/venv/lib/python3.11/site-packages/faiss/contrib/ondisk.pyÚmerge_ondiskr(      sÂ  € õ
 Ø•uÔ(ñô ð ;ð ;à:ñ;ô ;ð ;ð
 €DØð 
'ð 
'ˆõ 	�Š�˜5‘Ñ!Ô!Ð!ÝÔ  ­Ô(:Ñ;Ô;ˆÝÔ+¨EÑ2Ô2ˆ	Ø�Š�IÔ&Ñ'Ô'Ð'ð "'ˆ	ÔÐð €EÝÔ'¨Ñ.Ô.€IàŒ<˜1ÒÐÐÐ9ÑÔÐõ Ô(ØŒ˜Ô,¨mñô €Hõ
 Ô-Ñ/Ô/€JØð "ð "ˆØ×Ò˜SÑ!Ô!Ð!Ð!å‡H‚HÐ'¨*¯/ª/Ñ*;Ô*;Ñ;Ñ<Ô<Ð<Ø×)Ò)¨*¯/ª/Ñ*;Ô*;¸Z¿_º_Ñ=NÔ=NÐPYÑZÔZ€Fð '-Ð,€E„L�9Ô#Ø×Ò˜x¨Ñ.Ô.Ð.Ø„M×ÒÑÔÐÐÐó    )F)
Útypingr   r
   ÚloggingÚ	getLoggerÚ__name__r   ÚIndexÚstrr(   © r)   r'   ú<module>r1      s�   ðð Ð Ð Ð Ð Ð Ø €€€Ø €€€à€gÔ˜Ñ!Ô!€ð X]ð.ð .Ø”;ð.Ø.2°3¬ið.ØHKð.à	ð.ð .ð .ð .ð .ð .r)   