From 68441f6fcdab04e30802c233b51a65eca47a44f2 Mon Sep 17 00:00:00 2001 From: facebook-github-bot Date: Fri, 26 Apr 2024 16:57:53 +0000 Subject: [PATCH] Update API docs (a233bc93). --- xml/InvertedLists_8h.xml | 703 +++++++++--------- xml/index.xml | 40 +- xml/namespacefaiss.xml | 2 +- xml/structfaiss_1_1ArrayInvertedLists.xml | 128 ++-- xml/structfaiss_1_1BlockInvertedLists.xml | 126 ++-- xml/structfaiss_1_1HStackInvertedLists.xml | 74 +- xml/structfaiss_1_1InvertedLists.xml | 144 ++-- ...tfaiss_1_1InvertedLists_1_1ScopedCodes.xml | 16 +- ...uctfaiss_1_1InvertedLists_1_1ScopedIds.xml | 16 +- xml/structfaiss_1_1MaskedInvertedLists.xml | 76 +- xml/structfaiss_1_1OnDiskInvertedLists.xml | 126 ++-- xml/structfaiss_1_1ReadOnlyInvertedLists.xml | 142 ++-- xml/structfaiss_1_1SliceInvertedLists.xml | 78 +- xml/structfaiss_1_1StopWordsInvertedLists.xml | 76 +- xml/structfaiss_1_1VStackInvertedLists.xml | 76 +- 15 files changed, 946 insertions(+), 877 deletions(-) diff --git a/xml/InvertedLists_8h.xml b/xml/InvertedLists_8h.xml index b67db4c699..b966875369 100644 --- a/xml/InvertedLists_8h.xml +++ b/xml/InvertedLists_8h.xml @@ -285,382 +285,391 @@ structInvertedLists{ size_tnlist;///<numberofpossiblekeyvalues size_tcode_size;///<codesizepervectorinbytes -booluse_iterator; - -InvertedLists(size_tnlist,size_tcode_size); + +///requesttouseiteratorratherthanget_codes/get_ids +booluse_iterator=false; -virtual~InvertedLists(); - -///usedforBlockInvertedLists,wherethecodesarepackedintogroups -///andtheindividualcodesizeismeaningless -staticconstsize_tINVALID_CODE_SIZE=static_cast<size_t>(-1); - -/************************* -*Readonlyfunctions*/ - -//checkifthelistisempty -boolis_empty(size_tlist_no,void*inverted_list_context)const; - -///getthesizeofalist -virtualsize_tlist_size(size_tlist_no)const=0; - -///getiterableforliststhatuse_iterator -virtualInvertedListsIterator*get_iterator( -size_tlist_no, -void*inverted_list_context)const; - -/**getthecodesforaninvertedlist -*mustbereleasedbyrelease_codes -* -*@returncodessizelist_size*code_size -*/ -virtualconstuint8_t*get_codes(size_tlist_no)const=0; - -/**gettheidsforaninvertedlist -*mustbereleasedbyrelease_ids -* -*@returnidssizelist_size -*/ -virtualconstidx_t*get_ids(size_tlist_no)const=0; +InvertedLists(size_tnlist,size_tcode_size); + +virtual~InvertedLists(); + +///usedforBlockInvertedLists,wherethecodesarepackedintogroups +///andtheindividualcodesizeismeaningless +staticconstsize_tINVALID_CODE_SIZE=static_cast<size_t>(-1); + +/************************* +*Readonlyfunctions*/ + +///getthesizeofalist +virtualsize_tlist_size(size_tlist_no)const=0; + +/**getthecodesforaninvertedlist +*mustbereleasedbyrelease_codes +* +*@returncodessizelist_size*code_size +*/ +virtualconstuint8_t*get_codes(size_tlist_no)const=0; + +/**gettheidsforaninvertedlist +*mustbereleasedbyrelease_ids +* +*@returnidssizelist_size +*/ +virtualconstidx_t*get_ids(size_tlist_no)const=0; + +///releasecodesreturnedbyget_codes(defaultimplementationisnop +virtualvoidrelease_codes(size_tlist_no,constuint8_t*codes)const; + +///releaseidsreturnedbyget_ids +virtualvoidrelease_ids(size_tlist_no,constidx_t*ids)const; -///releasecodesreturnedbyget_codes(defaultimplementationisnop -virtualvoidrelease_codes(size_tlist_no,constuint8_t*codes)const; +///@returnasingleidinaninvertedlist +virtualidx_tget_single_id(size_tlist_no,size_toffset)const; -///releaseidsreturnedbyget_ids -virtualvoidrelease_ids(size_tlist_no,constidx_t*ids)const; - -///@returnasingleidinaninvertedlist -virtualidx_tget_single_id(size_tlist_no,size_toffset)const; - -///@returnasinglecodeinaninvertedlist -///(shouldbedeallocatedwithrelease_codes) -virtualconstuint8_t*get_single_code(size_tlist_no,size_toffset)const; - -///preparethefollowinglists(defaultdoesnothing) -///alistcanbe-1hencethesignedlong -virtualvoidprefetch_lists(constidx_t*list_nos,intnlist)const; - -/************************* -*writingfunctions*/ - -///addoneentrytoaninvertedlist -virtualsize_tadd_entry( -size_tlist_no, -idx_ttheid, -constuint8_t*code, -void*inverted_list_context=nullptr); - -virtualsize_tadd_entries( +///@returnasinglecodeinaninvertedlist +///(shouldbedeallocatedwithrelease_codes) +virtualconstuint8_t*get_single_code(size_tlist_no,size_toffset)const; + +///preparethefollowinglists(defaultdoesnothing) +///alistcanbe-1hencethesignedlong +virtualvoidprefetch_lists(constidx_t*list_nos,intnlist)const; + +/***************************************** +*Iteratorinterface(withcontext)*/ + +///checkifthelistisempty +virtualboolis_empty(size_tlist_no,void*inverted_list_context=nullptr) +const; + +///getiterableforliststhatuse_iterator +virtualInvertedListsIterator*get_iterator( +size_tlist_no, +void*inverted_list_context=nullptr)const; + +/************************* +*writingfunctions*/ + +///addoneentrytoaninvertedlist +virtualsize_tadd_entry( size_tlist_no, -size_tn_entry, -constidx_t*ids, -constuint8_t*code)=0; +idx_ttheid, +constuint8_t*code, +void*inverted_list_context=nullptr); -virtualvoidupdate_entry( +virtualsize_tadd_entries( size_tlist_no, -size_toffset, -idx_tid, -constuint8_t*code); +size_tn_entry, +constidx_t*ids, +constuint8_t*code)=0; -virtualvoidupdate_entries( +virtualvoidupdate_entry( size_tlist_no, size_toffset, -size_tn_entry, -constidx_t*ids, -constuint8_t*code)=0; - -virtualvoidresize(size_tlist_no,size_tnew_size)=0; - -virtualvoidreset(); - -/************************* -*highlevelfunctions*/ - -///moveallentriesfromoivf(emptyonoutput) -voidmerge_from(InvertedLists*oivf,size_tadd_id); +idx_tid, +constuint8_t*code); + +virtualvoidupdate_entries( +size_tlist_no, +size_toffset, +size_tn_entry, +constidx_t*ids, +constuint8_t*code)=0; + +virtualvoidresize(size_tlist_no,size_tnew_size)=0; + +virtualvoidreset(); -//howtocopyasubsetofelementsfromtheinvertedlists -//Thisdependsontwointegers,a1anda2. -enumsubset_type_t:int{ -//dependsonIDs -SUBSET_TYPE_ID_RANGE=0,//copiesidsin[a1,a2) -SUBSET_TYPE_ID_MOD=1,//copiesidsifid%a1==a2 -//dependsonorderwithininvlists -SUBSET_TYPE_ELEMENT_RANGE= -2,//copiesfractionsofinvlistssothata1elementsareleft -//beforeanda2after -SUBSET_TYPE_INVLIST_FRACTION= -3,//takefractiona2outofa1fromeachinvlist,0<=a2<a1 -//copyonlyinvertedlistsa1:a2 -SUBSET_TYPE_INVLIST=4 -}; - -/**copyasubsetoftheentriesindextotheotherindex -*@returnnumberofentriescopied -*/ -size_tcopy_subset_to( -InvertedLists&other, -subset_type_tsubset_type, -idx_ta1, -idx_ta2)const; - -/************************* -*statistics*/ - -///1=perfectlybalanced,>1:imbalanced -doubleimbalance_factor()const; - -///displaysomestatsabouttheinvertedlists -voidprint_stats()const; +/************************* +*highlevelfunctions*/ + +///moveallentriesfromoivf(emptyonoutput) +voidmerge_from(InvertedLists*oivf,size_tadd_id); + +//howtocopyasubsetofelementsfromtheinvertedlists +//Thisdependsontwointegers,a1anda2. +enumsubset_type_t:int{ +//dependsonIDs +SUBSET_TYPE_ID_RANGE=0,//copiesidsin[a1,a2) +SUBSET_TYPE_ID_MOD=1,//copiesidsifid%a1==a2 +//dependsonorderwithininvlists +SUBSET_TYPE_ELEMENT_RANGE= +2,//copiesfractionsofinvlistssothata1elementsareleft +//beforeanda2after +SUBSET_TYPE_INVLIST_FRACTION= +3,//takefractiona2outofa1fromeachinvlist,0<=a2<a1 +//copyonlyinvertedlistsa1:a2 +SUBSET_TYPE_INVLIST=4 +}; + +/**copyasubsetoftheentriesindextotheotherindex +*@returnnumberofentriescopied +*/ +size_tcopy_subset_to( +InvertedLists&other, +subset_type_tsubset_type, +idx_ta1, +idx_ta2)const; + +/************************* +*statistics*/ -///sumuplistsizes -size_tcompute_ntotal()const; - -/************************************** -*Scopedinvertedlists(forautomaticdeallocation) -* -*insteadofwriting: -* -*uint8_t*codes=invlists->get_codes(10); -*...usecodes -*invlists->release_codes(10,codes) +///1=perfectlybalanced,>1:imbalanced +doubleimbalance_factor()const; + +///displaysomestatsabouttheinvertedlists +voidprint_stats()const; + +///sumuplistsizes +size_tcompute_ntotal()const; + +/************************************** +*Scopedinvertedlists(forautomaticdeallocation) * -*write: +*insteadofwriting: * -*ScopedCodescodes(invlists,10); -*...usecodes.get() -*//releasecalledautomaticallywhencodesgoesoutofscope +*uint8_t*codes=invlists->get_codes(10); +*...usecodes +*invlists->release_codes(10,codes) * -*thefollowingfunctioncallalsoworks: +*write: * -*foo(123,ScopedCodes(invlists,10).get(),456); -* -*/ - -structScopedIds{ -constInvertedLists*il; -constidx_t*ids; -size_tlist_no; - -ScopedIds(constInvertedLists*il,size_tlist_no) -:il(il),ids(il->get_ids(list_no)),list_no(list_no){} - -constidx_t*get(){ -returnids; -} - -idx_toperator[](size_ti)const{ -returnids[i]; -} - -~ScopedIds(){ -il->release_ids(list_no,ids); -} -}; - -structScopedCodes{ -constInvertedLists*il; -constuint8_t*codes; -size_tlist_no; - -ScopedCodes(constInvertedLists*il,size_tlist_no) -:il(il),codes(il->get_codes(list_no)),list_no(list_no){} - -ScopedCodes(constInvertedLists*il,size_tlist_no,size_toffset) -:il(il), -codes(il->get_single_code(list_no,offset)), -list_no(list_no){} - -constuint8_t*get(){ -returncodes; -} - -~ScopedCodes(){ -il->release_codes(list_no,codes); -} -}; -}; - -///simple(default)implementationasanarrayofinvertedlists -structArrayInvertedLists:InvertedLists{ -std::vector<std::vector<uint8_t>>codes;//binarycodes,sizenlist -std::vector<std::vector<idx_t>>ids;///<Invertedlistsforindexes - -ArrayInvertedLists(size_tnlist,size_tcode_size); - -size_tlist_size(size_tlist_no)constoverride; -constuint8_t*get_codes(size_tlist_no)constoverride; -constidx_t*get_ids(size_tlist_no)constoverride; +*ScopedCodescodes(invlists,10); +*...usecodes.get() +*//releasecalledautomaticallywhencodesgoesoutofscope +* +*thefollowingfunctioncallalsoworks: +* +*foo(123,ScopedCodes(invlists,10).get(),456); +* +*/ + +structScopedIds{ +constInvertedLists*il; +constidx_t*ids; +size_tlist_no; + +ScopedIds(constInvertedLists*il,size_tlist_no) +:il(il),ids(il->get_ids(list_no)),list_no(list_no){} + +constidx_t*get(){ +returnids; +} + +idx_toperator[](size_ti)const{ +returnids[i]; +} + +~ScopedIds(){ +il->release_ids(list_no,ids); +} +}; + +structScopedCodes{ +constInvertedLists*il; +constuint8_t*codes; +size_tlist_no; + +ScopedCodes(constInvertedLists*il,size_tlist_no) +:il(il),codes(il->get_codes(list_no)),list_no(list_no){} + +ScopedCodes(constInvertedLists*il,size_tlist_no,size_toffset) +:il(il), +codes(il->get_single_code(list_no,offset)), +list_no(list_no){} + +constuint8_t*get(){ +returncodes; +} + +~ScopedCodes(){ +il->release_codes(list_no,codes); +} +}; +}; + +///simple(default)implementationasanarrayofinvertedlists +structArrayInvertedLists:InvertedLists{ +std::vector<std::vector<uint8_t>>codes;//binarycodes,sizenlist +std::vector<std::vector<idx_t>>ids;///<Invertedlistsforindexes -size_tadd_entries( -size_tlist_no, -size_tn_entry, -constidx_t*ids, -constuint8_t*code)override; +ArrayInvertedLists(size_tnlist,size_tcode_size); + +size_tlist_size(size_tlist_no)constoverride; +constuint8_t*get_codes(size_tlist_no)constoverride; +constidx_t*get_ids(size_tlist_no)constoverride; -voidupdate_entries( +size_tadd_entries( size_tlist_no, -size_toffset, -size_tn_entry, -constidx_t*ids, -constuint8_t*code)override; - -voidresize(size_tlist_no,size_tnew_size)override; - -///permutetheinvertedlists,mapmapsnew_idtoold_id -voidpermute_invlists(constidx_t*map); - -~ArrayInvertedLists()override; -}; - -/***************************************************************** -*Meta-invertedlists -* -*Aboutterminology:theinvertedlistsareseenasasparsematrix, -*thatcanbestackedhorizontally,verticallyandsliced. -*****************************************************************/ - -///invliststhatfailforallwritefunctions -structReadOnlyInvertedLists:InvertedLists{ -ReadOnlyInvertedLists(size_tnlist,size_tcode_size) -:InvertedLists(nlist,code_size){} - -size_tadd_entries( -size_tlist_no, -size_tn_entry, -constidx_t*ids, -constuint8_t*code)override; - -voidupdate_entries( -size_tlist_no, -size_toffset, -size_tn_entry, -constidx_t*ids, -constuint8_t*code)override; - -voidresize(size_tlist_no,size_tnew_size)override; -}; - -///Horizontalstackofinvertedlists -structHStackInvertedLists:ReadOnlyInvertedLists{ -std::vector<constInvertedLists*>ils; - -///buildInvertedListsbyconcatenatingnilofthem -HStackInvertedLists(intnil,constInvertedLists**ils); - -size_tlist_size(size_tlist_no)constoverride; -constuint8_t*get_codes(size_tlist_no)constoverride; -constidx_t*get_ids(size_tlist_no)constoverride; - -voidprefetch_lists(constidx_t*list_nos,intnlist)constoverride; - -voidrelease_codes(size_tlist_no,constuint8_t*codes)constoverride; -voidrelease_ids(size_tlist_no,constidx_t*ids)constoverride; +size_tn_entry, +constidx_t*ids, +constuint8_t*code)override; + +voidupdate_entries( +size_tlist_no, +size_toffset, +size_tn_entry, +constidx_t*ids, +constuint8_t*code)override; + +voidresize(size_tlist_no,size_tnew_size)override; + +///permutetheinvertedlists,mapmapsnew_idtoold_id +voidpermute_invlists(constidx_t*map); + +boolis_empty(size_tlist_no,void*inverted_list_context=nullptr) +constoverride; + +~ArrayInvertedLists()override; +}; + +/***************************************************************** +*Meta-invertedlists +* +*Aboutterminology:theinvertedlistsareseenasasparsematrix, +*thatcanbestackedhorizontally,verticallyandsliced. +*****************************************************************/ + +///invliststhatfailforallwritefunctions +structReadOnlyInvertedLists:InvertedLists{ +ReadOnlyInvertedLists(size_tnlist,size_tcode_size) +:InvertedLists(nlist,code_size){} + +size_tadd_entries( +size_tlist_no, +size_tn_entry, +constidx_t*ids, +constuint8_t*code)override; + +voidupdate_entries( +size_tlist_no, +size_toffset, +size_tn_entry, +constidx_t*ids, +constuint8_t*code)override; + +voidresize(size_tlist_no,size_tnew_size)override; +}; + +///Horizontalstackofinvertedlists +structHStackInvertedLists:ReadOnlyInvertedLists{ +std::vector<constInvertedLists*>ils; + +///buildInvertedListsbyconcatenatingnilofthem +HStackInvertedLists(intnil,constInvertedLists**ils); -idx_tget_single_id(size_tlist_no,size_toffset)constoverride; - -constuint8_t*get_single_code(size_tlist_no,size_toffset) -constoverride; -}; +size_tlist_size(size_tlist_no)constoverride; +constuint8_t*get_codes(size_tlist_no)constoverride; +constidx_t*get_ids(size_tlist_no)constoverride; + +voidprefetch_lists(constidx_t*list_nos,intnlist)constoverride; -usingConcatenatedInvertedLists=HStackInvertedLists; - -///verticalsliceofindexesinanotherInvertedLists -structSliceInvertedLists:ReadOnlyInvertedLists{ -constInvertedLists*il; -idx_ti0,i1; - -SliceInvertedLists(constInvertedLists*il,idx_ti0,idx_ti1); +voidrelease_codes(size_tlist_no,constuint8_t*codes)constoverride; +voidrelease_ids(size_tlist_no,constidx_t*ids)constoverride; + +idx_tget_single_id(size_tlist_no,size_toffset)constoverride; + +constuint8_t*get_single_code(size_tlist_no,size_toffset) +constoverride; +}; -size_tlist_size(size_tlist_no)constoverride; -constuint8_t*get_codes(size_tlist_no)constoverride; -constidx_t*get_ids(size_tlist_no)constoverride; - -voidrelease_codes(size_tlist_no,constuint8_t*codes)constoverride; -voidrelease_ids(size_tlist_no,constidx_t*ids)constoverride; +usingConcatenatedInvertedLists=HStackInvertedLists; + +///verticalsliceofindexesinanotherInvertedLists +structSliceInvertedLists:ReadOnlyInvertedLists{ +constInvertedLists*il; +idx_ti0,i1; -idx_tget_single_id(size_tlist_no,size_toffset)constoverride; +SliceInvertedLists(constInvertedLists*il,idx_ti0,idx_ti1); -constuint8_t*get_single_code(size_tlist_no,size_toffset) -constoverride; - -voidprefetch_lists(constidx_t*list_nos,intnlist)constoverride; -}; - -structVStackInvertedLists:ReadOnlyInvertedLists{ -std::vector<constInvertedLists*>ils; -std::vector<idx_t>cumsz; - -///buildInvertedListsbyconcatenatingnilofthem -VStackInvertedLists(intnil,constInvertedLists**ils); - -size_tlist_size(size_tlist_no)constoverride; -constuint8_t*get_codes(size_tlist_no)constoverride; -constidx_t*get_ids(size_tlist_no)constoverride; - -voidrelease_codes(size_tlist_no,constuint8_t*codes)constoverride; -voidrelease_ids(size_tlist_no,constidx_t*ids)constoverride; - -idx_tget_single_id(size_tlist_no,size_toffset)constoverride; +size_tlist_size(size_tlist_no)constoverride; +constuint8_t*get_codes(size_tlist_no)constoverride; +constidx_t*get_ids(size_tlist_no)constoverride; + +voidrelease_codes(size_tlist_no,constuint8_t*codes)constoverride; +voidrelease_ids(size_tlist_no,constidx_t*ids)constoverride; + +idx_tget_single_id(size_tlist_no,size_toffset)constoverride; + +constuint8_t*get_single_code(size_tlist_no,size_toffset) +constoverride; + +voidprefetch_lists(constidx_t*list_nos,intnlist)constoverride; +}; + +structVStackInvertedLists:ReadOnlyInvertedLists{ +std::vector<constInvertedLists*>ils; +std::vector<idx_t>cumsz; + +///buildInvertedListsbyconcatenatingnilofthem +VStackInvertedLists(intnil,constInvertedLists**ils); -constuint8_t*get_single_code(size_tlist_no,size_toffset) -constoverride; - -voidprefetch_lists(constidx_t*list_nos,intnlist)constoverride; -}; - -/**usethefirstinvertedlistsiftheyarenon-emptyotherwiseusethesecond -* -*Thisisusefulifil1hasafewinvertedliststhataretoolong, -*andthatil0hasreplacementlistsforthose,withemptylistsfor -*theothers.*/ -structMaskedInvertedLists:ReadOnlyInvertedLists{ -constInvertedLists*il0; -constInvertedLists*il1; - -MaskedInvertedLists(constInvertedLists*il0,constInvertedLists*il1); - -size_tlist_size(size_tlist_no)constoverride; -constuint8_t*get_codes(size_tlist_no)constoverride; -constidx_t*get_ids(size_tlist_no)constoverride; - -voidrelease_codes(size_tlist_no,constuint8_t*codes)constoverride; -voidrelease_ids(size_tlist_no,constidx_t*ids)constoverride; +size_tlist_size(size_tlist_no)constoverride; +constuint8_t*get_codes(size_tlist_no)constoverride; +constidx_t*get_ids(size_tlist_no)constoverride; + +voidrelease_codes(size_tlist_no,constuint8_t*codes)constoverride; +voidrelease_ids(size_tlist_no,constidx_t*ids)constoverride; + +idx_tget_single_id(size_tlist_no,size_toffset)constoverride; + +constuint8_t*get_single_code(size_tlist_no,size_toffset) +constoverride; + +voidprefetch_lists(constidx_t*list_nos,intnlist)constoverride; +}; + +/**usethefirstinvertedlistsiftheyarenon-emptyotherwiseusethesecond +* +*Thisisusefulifil1hasafewinvertedliststhataretoolong, +*andthatil0hasreplacementlistsforthose,withemptylistsfor +*theothers.*/ +structMaskedInvertedLists:ReadOnlyInvertedLists{ +constInvertedLists*il0; +constInvertedLists*il1; -idx_tget_single_id(size_tlist_no,size_toffset)constoverride; +MaskedInvertedLists(constInvertedLists*il0,constInvertedLists*il1); -constuint8_t*get_single_code(size_tlist_no,size_toffset) -constoverride; - -voidprefetch_lists(constidx_t*list_nos,intnlist)constoverride; -}; - -/**iftheinvertedlistinilissmallerthanmaxsizethenreturnit, -*otherwisereturnanemptyinvlist*/ -structStopWordsInvertedLists:ReadOnlyInvertedLists{ -constInvertedLists*il0; -size_tmaxsize; +size_tlist_size(size_tlist_no)constoverride; +constuint8_t*get_codes(size_tlist_no)constoverride; +constidx_t*get_ids(size_tlist_no)constoverride; + +voidrelease_codes(size_tlist_no,constuint8_t*codes)constoverride; +voidrelease_ids(size_tlist_no,constidx_t*ids)constoverride; + +idx_tget_single_id(size_tlist_no,size_toffset)constoverride; + +constuint8_t*get_single_code(size_tlist_no,size_toffset) +constoverride; -StopWordsInvertedLists(constInvertedLists*il,size_tmaxsize); - -size_tlist_size(size_tlist_no)constoverride; -constuint8_t*get_codes(size_tlist_no)constoverride; -constidx_t*get_ids(size_tlist_no)constoverride; - -voidrelease_codes(size_tlist_no,constuint8_t*codes)constoverride; -voidrelease_ids(size_tlist_no,constidx_t*ids)constoverride; +voidprefetch_lists(constidx_t*list_nos,intnlist)constoverride; +}; + +/**iftheinvertedlistinilissmallerthanmaxsizethenreturnit, +*otherwisereturnanemptyinvlist*/ +structStopWordsInvertedLists:ReadOnlyInvertedLists{ +constInvertedLists*il0; +size_tmaxsize; -idx_tget_single_id(size_tlist_no,size_toffset)constoverride; +StopWordsInvertedLists(constInvertedLists*il,size_tmaxsize); -constuint8_t*get_single_code(size_tlist_no,size_toffset) -constoverride; - -voidprefetch_lists(constidx_t*list_nos,intnlist)constoverride; -}; - -}//namespacefaiss - -#endif +size_tlist_size(size_tlist_no)constoverride; +constuint8_t*get_codes(size_tlist_no)constoverride; +constidx_t*get_ids(size_tlist_no)constoverride; + +voidrelease_codes(size_tlist_no,constuint8_t*codes)constoverride; +voidrelease_ids(size_tlist_no,constidx_t*ids)constoverride; + +idx_tget_single_id(size_tlist_no,size_toffset)constoverride; + +constuint8_t*get_single_code(size_tlist_no,size_toffset) +constoverride; + +voidprefetch_lists(constidx_t*list_nos,intnlist)constoverride; +}; + +}//namespacefaiss + +#endif diff --git a/xml/index.xml b/xml/index.xml index 5382729587..0e737458fe 100644 --- a/xml/index.xml +++ b/xml/index.xml @@ -156,14 +156,14 @@ update_entries resize permute_invlists + is_empty ~ArrayInvertedLists - is_empty - get_iterator release_codes release_ids get_single_id get_single_code prefetch_lists + get_iterator add_entry update_entry reset @@ -240,13 +240,13 @@ update_entries resize ~BlockInvertedLists - is_empty - get_iterator release_codes release_ids get_single_id get_single_code prefetch_lists + is_empty + get_iterator add_entry update_entry reset @@ -1764,8 +1764,8 @@ add_entries update_entries resize - is_empty - get_iterator + is_empty + get_iterator add_entry update_entry reset @@ -5880,9 +5880,7 @@ INVALID_CODE_SIZE InvertedLists ~InvertedLists - is_empty list_size - get_iterator get_codes get_ids release_codes @@ -5890,6 +5888,8 @@ get_single_id get_single_code prefetch_lists + is_empty + get_iterator add_entry add_entries update_entry @@ -6200,8 +6200,8 @@ add_entries update_entries resize - is_empty - get_iterator + is_empty + get_iterator add_entry update_entry reset @@ -6471,12 +6471,12 @@ free_slot set_all_lists_sizes OnDiskInvertedLists - is_empty - get_iterator release_codes release_ids get_single_id get_single_code + is_empty + get_iterator add_entry update_entry reset @@ -7149,9 +7149,7 @@ add_entries update_entries resize - is_empty list_size - get_iterator get_codes get_ids release_codes @@ -7159,6 +7157,8 @@ get_single_id get_single_code prefetch_lists + is_empty + get_iterator add_entry update_entry reset @@ -8210,8 +8210,8 @@ add_entries update_entries resize - is_empty - get_iterator + is_empty + get_iterator add_entry update_entry reset @@ -8367,8 +8367,8 @@ add_entries update_entries resize - is_empty - get_iterator + is_empty + get_iterator add_entry update_entry reset @@ -8560,8 +8560,8 @@ add_entries update_entries resize - is_empty - get_iterator + is_empty + get_iterator add_entry update_entry reset diff --git a/xml/namespacefaiss.xml b/xml/namespacefaiss.xml index b38be8680f..f39a16004b 100644 --- a/xml/namespacefaiss.xml +++ b/xml/namespacefaiss.xml @@ -484,7 +484,7 @@ - + int64_t diff --git a/xml/structfaiss_1_1ArrayInvertedLists.xml b/xml/structfaiss_1_1ArrayInvertedLists.xml index db31e5104c..80a327c6ea 100644 --- a/xml/structfaiss_1_1ArrayInvertedLists.xml +++ b/xml/structfaiss_1_1ArrayInvertedLists.xml @@ -16,7 +16,7 @@ - + std::vector< std::vector< idx_t > > @@ -30,7 +30,7 @@ - + size_t @@ -65,13 +65,15 @@ bool faiss::InvertedLists::use_iterator use_iterator + = false +request to use iterator rather than get_codes / get_ids - + @@ -94,7 +96,7 @@ - + size_t @@ -113,7 +115,7 @@ - + const uint8_t * @@ -135,7 +137,7 @@ - + const idx_t * @@ -157,7 +159,7 @@ - + size_t @@ -187,7 +189,7 @@ - + void @@ -221,7 +223,7 @@ - + void @@ -243,7 +245,7 @@ - + void @@ -261,26 +263,14 @@ - + - - - faiss::ArrayInvertedLists::~ArrayInvertedLists - () override - ~ArrayInvertedLists - - - - - - - - - + bool - bool faiss::InvertedLists::is_empty - (size_t list_no, void *inverted_list_context) const + bool faiss::ArrayInvertedLists::is_empty + (size_t list_no, void *inverted_list_context=nullptr) const override is_empty + is_empty size_t list_no @@ -288,36 +278,29 @@ void * inverted_list_context + nullptr +check if the list is empty - + - - InvertedListsIterator * - virtual InvertedListsIterator* faiss::InvertedLists::get_iterator - (size_t list_no, void *inverted_list_context) const - get_iterator - - size_t - list_no - - - void * - inverted_list_context - + + + faiss::ArrayInvertedLists::~ArrayInvertedLists + () override + ~ArrayInvertedLists -get iterable for lists that use_iterator - + void @@ -344,7 +327,7 @@ - + void @@ -371,7 +354,7 @@ - + idx_t @@ -400,7 +383,7 @@ - + const uint8_t * @@ -429,7 +412,7 @@ - + void @@ -457,7 +440,30 @@ - + + + + InvertedListsIterator * + virtual InvertedListsIterator* faiss::InvertedLists::get_iterator + (size_t list_no, void *inverted_list_context=nullptr) const + get_iterator + + size_t + list_no + + + void * + inverted_list_context + nullptr + + +get iterable for lists that use_iterator + + + + + + size_t @@ -488,7 +494,7 @@ - + void @@ -517,7 +523,7 @@ - + void @@ -530,7 +536,7 @@ - + void @@ -552,7 +558,7 @@ - + size_t @@ -584,7 +590,7 @@ - + double @@ -598,7 +604,7 @@ - + void @@ -612,7 +618,7 @@ - + size_t @@ -626,7 +632,7 @@ - + @@ -681,7 +687,7 @@ - + @@ -698,7 +704,7 @@ - + @@ -730,7 +736,7 @@ - + faiss::ArrayInvertedListsadd_entries faiss::ArrayInvertedListsadd_entry @@ -741,14 +747,14 @@ faiss::ArrayInvertedListscopy_subset_to faiss::ArrayInvertedListsget_codes faiss::ArrayInvertedListsget_ids - faiss::ArrayInvertedListsget_iterator + faiss::ArrayInvertedListsget_iterator faiss::ArrayInvertedListsget_single_code faiss::ArrayInvertedListsget_single_id faiss::ArrayInvertedListsids faiss::ArrayInvertedListsimbalance_factor faiss::ArrayInvertedListsINVALID_CODE_SIZE faiss::ArrayInvertedListsInvertedLists - faiss::ArrayInvertedListsis_empty + faiss::ArrayInvertedListsis_empty faiss::ArrayInvertedListslist_size faiss::ArrayInvertedListsmerge_from faiss::ArrayInvertedListsnlist diff --git a/xml/structfaiss_1_1BlockInvertedLists.xml b/xml/structfaiss_1_1BlockInvertedLists.xml index c98b8c90aa..b9c1ad1231 100644 --- a/xml/structfaiss_1_1BlockInvertedLists.xml +++ b/xml/structfaiss_1_1BlockInvertedLists.xml @@ -106,13 +106,15 @@ bool faiss::InvertedLists::use_iterator use_iterator + = false +request to use iterator rather than get_codes / get_ids - + @@ -356,49 +358,6 @@ - - bool - bool faiss::InvertedLists::is_empty - (size_t list_no, void *inverted_list_context) const - is_empty - - size_t - list_no - - - void * - inverted_list_context - - - - - - - - - - - InvertedListsIterator * - virtual InvertedListsIterator* faiss::InvertedLists::get_iterator - (size_t list_no, void *inverted_list_context) const - get_iterator - - size_t - list_no - - - void * - inverted_list_context - - -get iterable for lists that use_iterator - - - - - - - void virtual void faiss::InvertedLists::release_codes @@ -424,7 +383,7 @@ - + void @@ -451,7 +410,7 @@ - + idx_t @@ -480,7 +439,7 @@ - + const uint8_t * @@ -509,7 +468,7 @@ - + void @@ -534,11 +493,58 @@ prepare the following lists (default does nothing) a list can be -1 hence the signed long + + + + + + + bool + virtual bool faiss::InvertedLists::is_empty + (size_t list_no, void *inverted_list_context=nullptr) const + is_empty + is_empty + + size_t + list_no + + + void * + inverted_list_context + nullptr + + +check if the list is empty + + + + InvertedListsIterator * + virtual InvertedListsIterator* faiss::InvertedLists::get_iterator + (size_t list_no, void *inverted_list_context=nullptr) const + get_iterator + + size_t + list_no + + + void * + inverted_list_context + nullptr + + +get iterable for lists that use_iterator + + + + + + + size_t virtual size_t faiss::InvertedLists::add_entry @@ -568,7 +574,7 @@ - + void @@ -597,7 +603,7 @@ - + void @@ -610,7 +616,7 @@ - + void @@ -632,7 +638,7 @@ - + size_t @@ -664,7 +670,7 @@ - + double @@ -678,7 +684,7 @@ - + void @@ -692,7 +698,7 @@ - + size_t @@ -706,7 +712,7 @@ - + @@ -761,7 +767,7 @@ - + @@ -778,7 +784,7 @@ - + @@ -834,14 +840,14 @@ faiss::BlockInvertedListscopy_subset_to faiss::BlockInvertedListsget_codes faiss::BlockInvertedListsget_ids - faiss::BlockInvertedListsget_iterator + faiss::BlockInvertedListsget_iterator faiss::BlockInvertedListsget_single_code faiss::BlockInvertedListsget_single_id faiss::BlockInvertedListsids faiss::BlockInvertedListsimbalance_factor faiss::BlockInvertedListsINVALID_CODE_SIZE faiss::BlockInvertedListsInvertedLists - faiss::BlockInvertedListsis_empty + faiss::BlockInvertedListsis_empty faiss::BlockInvertedListslist_size faiss::BlockInvertedListsmerge_from faiss::BlockInvertedListsn_per_block diff --git a/xml/structfaiss_1_1HStackInvertedLists.xml b/xml/structfaiss_1_1HStackInvertedLists.xml index e4507ad2e2..eddef760ad 100644 --- a/xml/structfaiss_1_1HStackInvertedLists.xml +++ b/xml/structfaiss_1_1HStackInvertedLists.xml @@ -16,7 +16,7 @@ - + size_t @@ -51,13 +51,15 @@ bool faiss::InvertedLists::use_iterator use_iterator + = false +request to use iterator rather than get_codes / get_ids - + @@ -81,7 +83,7 @@ - + size_t @@ -100,7 +102,7 @@ - + const uint8_t * @@ -122,7 +124,7 @@ - + const idx_t * @@ -144,7 +146,7 @@ - + void @@ -167,7 +169,7 @@ - + void @@ -190,7 +192,7 @@ - + void @@ -213,7 +215,7 @@ - + idx_t @@ -238,7 +240,7 @@ - + const uint8_t * @@ -263,7 +265,7 @@ - + size_t @@ -293,7 +295,7 @@ - + void @@ -327,7 +329,7 @@ - + void @@ -349,13 +351,14 @@ - + - + bool - bool faiss::InvertedLists::is_empty - (size_t list_no, void *inverted_list_context) const + virtual bool faiss::InvertedLists::is_empty + (size_t list_no, void *inverted_list_context=nullptr) const is_empty + is_empty size_t list_no @@ -363,19 +366,21 @@ void * inverted_list_context + nullptr +check if the list is empty - + - + InvertedListsIterator * virtual InvertedListsIterator* faiss::InvertedLists::get_iterator - (size_t list_no, void *inverted_list_context) const + (size_t list_no, void *inverted_list_context=nullptr) const get_iterator size_t @@ -384,6 +389,7 @@ void * inverted_list_context + nullptr get iterable for lists that use_iterator @@ -392,7 +398,7 @@ - + size_t @@ -423,7 +429,7 @@ - + void @@ -452,7 +458,7 @@ - + void @@ -465,7 +471,7 @@ - + void @@ -487,7 +493,7 @@ - + size_t @@ -519,7 +525,7 @@ - + double @@ -533,7 +539,7 @@ - + void @@ -547,7 +553,7 @@ - + size_t @@ -561,7 +567,7 @@ - + @@ -616,7 +622,7 @@ - + @@ -633,7 +639,7 @@ - + @@ -677,7 +683,7 @@ - + faiss::HStackInvertedListsadd_entries faiss::HStackInvertedListsadd_entry @@ -686,7 +692,7 @@ faiss::HStackInvertedListscopy_subset_to faiss::HStackInvertedListsget_codes faiss::HStackInvertedListsget_ids - faiss::HStackInvertedListsget_iterator + faiss::HStackInvertedListsget_iterator faiss::HStackInvertedListsget_single_code faiss::HStackInvertedListsget_single_id faiss::HStackInvertedListsHStackInvertedLists @@ -694,7 +700,7 @@ faiss::HStackInvertedListsimbalance_factor faiss::HStackInvertedListsINVALID_CODE_SIZE faiss::HStackInvertedListsInvertedLists - faiss::HStackInvertedListsis_empty + faiss::HStackInvertedListsis_empty faiss::HStackInvertedListslist_size faiss::HStackInvertedListsmerge_from faiss::HStackInvertedListsnlist diff --git a/xml/structfaiss_1_1InvertedLists.xml b/xml/structfaiss_1_1InvertedLists.xml index 904cde2215..10a0f0dac6 100644 --- a/xml/structfaiss_1_1InvertedLists.xml +++ b/xml/structfaiss_1_1InvertedLists.xml @@ -61,7 +61,7 @@ - + @@ -98,13 +98,15 @@ bool faiss::InvertedLists::use_iterator use_iterator + = false +request to use iterator rather than get_codes / get_ids - + @@ -121,7 +123,7 @@ - + @@ -144,7 +146,7 @@ - + @@ -157,28 +159,7 @@ - - - - bool - bool faiss::InvertedLists::is_empty - (size_t list_no, void *inverted_list_context) const - is_empty - - size_t - list_no - - - void * - inverted_list_context - - - - - - - - + size_t @@ -204,29 +185,7 @@ - - - - InvertedListsIterator * - virtual InvertedListsIterator* faiss::InvertedLists::get_iterator - (size_t list_no, void *inverted_list_context) const - get_iterator - - size_t - list_no - - - void * - inverted_list_context - - -get iterable for lists that use_iterator - - - - - - + const uint8_t * @@ -255,7 +214,7 @@ - + const idx_t * @@ -284,7 +243,7 @@ - + void @@ -311,7 +270,7 @@ - + void @@ -338,7 +297,7 @@ - + idx_t @@ -367,7 +326,7 @@ - + const uint8_t * @@ -396,7 +355,7 @@ - + void @@ -421,11 +380,58 @@ prepare the following lists (default does nothing) a list can be -1 hence the signed long + + + + + + + bool + virtual bool faiss::InvertedLists::is_empty + (size_t list_no, void *inverted_list_context=nullptr) const + is_empty + is_empty + + size_t + list_no + + + void * + inverted_list_context + nullptr + + +check if the list is empty + + + + InvertedListsIterator * + virtual InvertedListsIterator* faiss::InvertedLists::get_iterator + (size_t list_no, void *inverted_list_context=nullptr) const + get_iterator + + size_t + list_no + + + void * + inverted_list_context + nullptr + + +get iterable for lists that use_iterator + + + + + + + size_t virtual size_t faiss::InvertedLists::add_entry @@ -455,7 +461,7 @@ - + size_t @@ -488,7 +494,7 @@ - + void @@ -517,7 +523,7 @@ - + void @@ -554,7 +560,7 @@ - + void @@ -579,7 +585,7 @@ - + void @@ -592,7 +598,7 @@ - + void @@ -614,7 +620,7 @@ - + size_t @@ -646,7 +652,7 @@ - + double @@ -660,7 +666,7 @@ - + void @@ -674,7 +680,7 @@ - + size_t @@ -688,7 +694,7 @@ - + @@ -761,7 +767,7 @@ - + faiss::InvertedListsadd_entries faiss::InvertedListsadd_entry @@ -770,13 +776,13 @@ faiss::InvertedListscopy_subset_to faiss::InvertedListsget_codes faiss::InvertedListsget_ids - faiss::InvertedListsget_iterator + faiss::InvertedListsget_iterator faiss::InvertedListsget_single_code faiss::InvertedListsget_single_id faiss::InvertedListsimbalance_factor faiss::InvertedListsINVALID_CODE_SIZE faiss::InvertedListsInvertedLists - faiss::InvertedListsis_empty + faiss::InvertedListsis_empty faiss::InvertedListslist_size faiss::InvertedListsmerge_from faiss::InvertedListsnlist diff --git a/xml/structfaiss_1_1InvertedLists_1_1ScopedCodes.xml b/xml/structfaiss_1_1InvertedLists_1_1ScopedCodes.xml index dce7b2487c..c623ad3779 100644 --- a/xml/structfaiss_1_1InvertedLists_1_1ScopedCodes.xml +++ b/xml/structfaiss_1_1InvertedLists_1_1ScopedCodes.xml @@ -14,7 +14,7 @@ - + const uint8_t * @@ -27,7 +27,7 @@ - + size_t @@ -40,7 +40,7 @@ - + @@ -63,7 +63,7 @@ - + @@ -88,7 +88,7 @@ - + const uint8_t * @@ -101,7 +101,7 @@ - + @@ -114,7 +114,7 @@ - + @@ -134,7 +134,7 @@ - + faiss::InvertedLists::ScopedCodescodes faiss::InvertedLists::ScopedCodesget diff --git a/xml/structfaiss_1_1InvertedLists_1_1ScopedIds.xml b/xml/structfaiss_1_1InvertedLists_1_1ScopedIds.xml index ef4bac2e01..d75b19b952 100644 --- a/xml/structfaiss_1_1InvertedLists_1_1ScopedIds.xml +++ b/xml/structfaiss_1_1InvertedLists_1_1ScopedIds.xml @@ -14,7 +14,7 @@ - + const idx_t * @@ -27,7 +27,7 @@ - + size_t @@ -40,7 +40,7 @@ - + @@ -63,7 +63,7 @@ - + const idx_t * @@ -76,7 +76,7 @@ - + idx_t @@ -93,7 +93,7 @@ - + @@ -106,7 +106,7 @@ - + @@ -126,7 +126,7 @@ - + faiss::InvertedLists::ScopedIdsget faiss::InvertedLists::ScopedIdsids diff --git a/xml/structfaiss_1_1MaskedInvertedLists.xml b/xml/structfaiss_1_1MaskedInvertedLists.xml index ce13e2f11c..f33f42e4e0 100644 --- a/xml/structfaiss_1_1MaskedInvertedLists.xml +++ b/xml/structfaiss_1_1MaskedInvertedLists.xml @@ -16,7 +16,7 @@ - + const InvertedLists * @@ -29,7 +29,7 @@ - + size_t @@ -64,13 +64,15 @@ bool faiss::InvertedLists::use_iterator use_iterator + = false +request to use iterator rather than get_codes / get_ids - + @@ -93,7 +95,7 @@ - + size_t @@ -112,7 +114,7 @@ - + const uint8_t * @@ -134,7 +136,7 @@ - + const idx_t * @@ -156,7 +158,7 @@ - + void @@ -179,7 +181,7 @@ - + void @@ -202,7 +204,7 @@ - + idx_t @@ -227,7 +229,7 @@ - + const uint8_t * @@ -252,7 +254,7 @@ - + void @@ -275,7 +277,7 @@ - + size_t @@ -305,7 +307,7 @@ - + void @@ -339,7 +341,7 @@ - + void @@ -361,13 +363,14 @@ - + - + bool - bool faiss::InvertedLists::is_empty - (size_t list_no, void *inverted_list_context) const + virtual bool faiss::InvertedLists::is_empty + (size_t list_no, void *inverted_list_context=nullptr) const is_empty + is_empty size_t list_no @@ -375,19 +378,21 @@ void * inverted_list_context + nullptr +check if the list is empty - + - + InvertedListsIterator * virtual InvertedListsIterator* faiss::InvertedLists::get_iterator - (size_t list_no, void *inverted_list_context) const + (size_t list_no, void *inverted_list_context=nullptr) const get_iterator size_t @@ -396,6 +401,7 @@ void * inverted_list_context + nullptr get iterable for lists that use_iterator @@ -404,7 +410,7 @@ - + size_t @@ -435,7 +441,7 @@ - + void @@ -464,7 +470,7 @@ - + void @@ -477,7 +483,7 @@ - + void @@ -499,7 +505,7 @@ - + size_t @@ -531,7 +537,7 @@ - + double @@ -545,7 +551,7 @@ - + void @@ -559,7 +565,7 @@ - + size_t @@ -573,7 +579,7 @@ - + @@ -628,7 +634,7 @@ - + @@ -645,7 +651,7 @@ - + @@ -694,7 +700,7 @@ - + faiss::MaskedInvertedListsadd_entries faiss::MaskedInvertedListsadd_entry @@ -703,7 +709,7 @@ faiss::MaskedInvertedListscopy_subset_to faiss::MaskedInvertedListsget_codes faiss::MaskedInvertedListsget_ids - faiss::MaskedInvertedListsget_iterator + faiss::MaskedInvertedListsget_iterator faiss::MaskedInvertedListsget_single_code faiss::MaskedInvertedListsget_single_id faiss::MaskedInvertedListsil0 @@ -711,7 +717,7 @@ faiss::MaskedInvertedListsimbalance_factor faiss::MaskedInvertedListsINVALID_CODE_SIZE faiss::MaskedInvertedListsInvertedLists - faiss::MaskedInvertedListsis_empty + faiss::MaskedInvertedListsis_empty faiss::MaskedInvertedListslist_size faiss::MaskedInvertedListsMaskedInvertedLists faiss::MaskedInvertedListsmerge_from diff --git a/xml/structfaiss_1_1OnDiskInvertedLists.xml b/xml/structfaiss_1_1OnDiskInvertedLists.xml index f2c0608652..92b1141c74 100644 --- a/xml/structfaiss_1_1OnDiskInvertedLists.xml +++ b/xml/structfaiss_1_1OnDiskInvertedLists.xml @@ -70,7 +70,7 @@ - + @@ -224,13 +224,15 @@ bool faiss::InvertedLists::use_iterator use_iterator + = false +request to use iterator rather than get_codes / get_ids - + @@ -641,49 +643,6 @@ - - bool - bool faiss::InvertedLists::is_empty - (size_t list_no, void *inverted_list_context) const - is_empty - - size_t - list_no - - - void * - inverted_list_context - - - - - - - - - - - InvertedListsIterator * - virtual InvertedListsIterator* faiss::InvertedLists::get_iterator - (size_t list_no, void *inverted_list_context) const - get_iterator - - size_t - list_no - - - void * - inverted_list_context - - -get iterable for lists that use_iterator - - - - - - - void virtual void faiss::InvertedLists::release_codes @@ -709,7 +668,7 @@ - + void @@ -736,7 +695,7 @@ - + idx_t @@ -765,7 +724,7 @@ - + const uint8_t * @@ -794,7 +753,54 @@ - + + + + bool + virtual bool faiss::InvertedLists::is_empty + (size_t list_no, void *inverted_list_context=nullptr) const + is_empty + is_empty + + size_t + list_no + + + void * + inverted_list_context + nullptr + + +check if the list is empty + + + + + + + + + InvertedListsIterator * + virtual InvertedListsIterator* faiss::InvertedLists::get_iterator + (size_t list_no, void *inverted_list_context=nullptr) const + get_iterator + + size_t + list_no + + + void * + inverted_list_context + nullptr + + +get iterable for lists that use_iterator + + + + + + size_t @@ -825,7 +831,7 @@ - + void @@ -854,7 +860,7 @@ - + void @@ -867,7 +873,7 @@ - + void @@ -889,7 +895,7 @@ - + size_t @@ -921,7 +927,7 @@ - + double @@ -935,7 +941,7 @@ - + void @@ -949,7 +955,7 @@ - + size_t @@ -963,7 +969,7 @@ - + @@ -980,7 +986,7 @@ - + @@ -1042,13 +1048,13 @@ faiss::OnDiskInvertedListsfree_slot faiss::OnDiskInvertedListsget_codes faiss::OnDiskInvertedListsget_ids - faiss::OnDiskInvertedListsget_iterator + faiss::OnDiskInvertedListsget_iterator faiss::OnDiskInvertedListsget_single_code faiss::OnDiskInvertedListsget_single_id faiss::OnDiskInvertedListsimbalance_factor faiss::OnDiskInvertedListsINVALID_CODE_SIZE faiss::OnDiskInvertedListsInvertedLists - faiss::OnDiskInvertedListsis_empty + faiss::OnDiskInvertedListsis_empty faiss::OnDiskInvertedListsList faiss::OnDiskInvertedListslist_size faiss::OnDiskInvertedListslists diff --git a/xml/structfaiss_1_1ReadOnlyInvertedLists.xml b/xml/structfaiss_1_1ReadOnlyInvertedLists.xml index e3a99781f3..e84069175c 100644 --- a/xml/structfaiss_1_1ReadOnlyInvertedLists.xml +++ b/xml/structfaiss_1_1ReadOnlyInvertedLists.xml @@ -29,7 +29,7 @@ - + size_t @@ -59,7 +59,7 @@ - + void @@ -93,7 +93,7 @@ - + void @@ -115,28 +115,7 @@ - - - - bool - bool faiss::InvertedLists::is_empty - (size_t list_no, void *inverted_list_context) const - is_empty - - size_t - list_no - - - void * - inverted_list_context - - - - - - - - + size_t @@ -162,29 +141,7 @@ - - - - InvertedListsIterator * - virtual InvertedListsIterator* faiss::InvertedLists::get_iterator - (size_t list_no, void *inverted_list_context) const - get_iterator - - size_t - list_no - - - void * - inverted_list_context - - -get iterable for lists that use_iterator - - - - - - + const uint8_t * @@ -213,7 +170,7 @@ - + const idx_t * @@ -242,7 +199,7 @@ - + void @@ -269,7 +226,7 @@ - + void @@ -296,7 +253,7 @@ - + idx_t @@ -325,7 +282,7 @@ - + const uint8_t * @@ -354,7 +311,7 @@ - + void @@ -379,11 +336,58 @@ prepare the following lists (default does nothing) a list can be -1 hence the signed long + + + + + + + bool + virtual bool faiss::InvertedLists::is_empty + (size_t list_no, void *inverted_list_context=nullptr) const + is_empty + is_empty + + size_t + list_no + + + void * + inverted_list_context + nullptr + + +check if the list is empty + + + + InvertedListsIterator * + virtual InvertedListsIterator* faiss::InvertedLists::get_iterator + (size_t list_no, void *inverted_list_context=nullptr) const + get_iterator + + size_t + list_no + + + void * + inverted_list_context + nullptr + + +get iterable for lists that use_iterator + + + + + + + size_t virtual size_t faiss::InvertedLists::add_entry @@ -413,7 +417,7 @@ - + void @@ -442,7 +446,7 @@ - + void @@ -455,7 +459,7 @@ - + void @@ -477,7 +481,7 @@ - + size_t @@ -509,7 +513,7 @@ - + double @@ -523,7 +527,7 @@ - + void @@ -537,7 +541,7 @@ - + size_t @@ -551,7 +555,7 @@ - + @@ -606,7 +610,7 @@ - + @@ -643,13 +647,15 @@ bool faiss::InvertedLists::use_iterator use_iterator + = false +request to use iterator rather than get_codes / get_ids - + @@ -666,7 +672,7 @@ - + @@ -728,7 +734,7 @@ - + faiss::ReadOnlyInvertedListsadd_entries faiss::ReadOnlyInvertedListsadd_entry @@ -737,13 +743,13 @@ faiss::ReadOnlyInvertedListscopy_subset_to faiss::ReadOnlyInvertedListsget_codes faiss::ReadOnlyInvertedListsget_ids - faiss::ReadOnlyInvertedListsget_iterator + faiss::ReadOnlyInvertedListsget_iterator faiss::ReadOnlyInvertedListsget_single_code faiss::ReadOnlyInvertedListsget_single_id faiss::ReadOnlyInvertedListsimbalance_factor faiss::ReadOnlyInvertedListsINVALID_CODE_SIZE faiss::ReadOnlyInvertedListsInvertedLists - faiss::ReadOnlyInvertedListsis_empty + faiss::ReadOnlyInvertedListsis_empty faiss::ReadOnlyInvertedListslist_size faiss::ReadOnlyInvertedListsmerge_from faiss::ReadOnlyInvertedListsnlist diff --git a/xml/structfaiss_1_1SliceInvertedLists.xml b/xml/structfaiss_1_1SliceInvertedLists.xml index 845365ec16..07c78b81e9 100644 --- a/xml/structfaiss_1_1SliceInvertedLists.xml +++ b/xml/structfaiss_1_1SliceInvertedLists.xml @@ -16,7 +16,7 @@ - + idx_t @@ -29,7 +29,7 @@ - + idx_t @@ -42,7 +42,7 @@ - + size_t @@ -77,13 +77,15 @@ bool faiss::InvertedLists::use_iterator use_iterator + = false +request to use iterator rather than get_codes / get_ids - + @@ -110,7 +112,7 @@ - + size_t @@ -129,7 +131,7 @@ - + const uint8_t * @@ -151,7 +153,7 @@ - + const idx_t * @@ -173,7 +175,7 @@ - + void @@ -196,7 +198,7 @@ - + void @@ -219,7 +221,7 @@ - + idx_t @@ -244,7 +246,7 @@ - + const uint8_t * @@ -269,7 +271,7 @@ - + void @@ -292,7 +294,7 @@ - + size_t @@ -322,7 +324,7 @@ - + void @@ -356,7 +358,7 @@ - + void @@ -378,13 +380,14 @@ - + - + bool - bool faiss::InvertedLists::is_empty - (size_t list_no, void *inverted_list_context) const + virtual bool faiss::InvertedLists::is_empty + (size_t list_no, void *inverted_list_context=nullptr) const is_empty + is_empty size_t list_no @@ -392,19 +395,21 @@ void * inverted_list_context + nullptr +check if the list is empty - + - + InvertedListsIterator * virtual InvertedListsIterator* faiss::InvertedLists::get_iterator - (size_t list_no, void *inverted_list_context) const + (size_t list_no, void *inverted_list_context=nullptr) const get_iterator size_t @@ -413,6 +418,7 @@ void * inverted_list_context + nullptr get iterable for lists that use_iterator @@ -421,7 +427,7 @@ - + size_t @@ -452,7 +458,7 @@ - + void @@ -481,7 +487,7 @@ - + void @@ -494,7 +500,7 @@ - + void @@ -516,7 +522,7 @@ - + size_t @@ -548,7 +554,7 @@ - + double @@ -562,7 +568,7 @@ - + void @@ -576,7 +582,7 @@ - + size_t @@ -590,7 +596,7 @@ - + @@ -645,7 +651,7 @@ - + @@ -662,7 +668,7 @@ - + @@ -709,7 +715,7 @@ - + faiss::SliceInvertedListsadd_entries faiss::SliceInvertedListsadd_entry @@ -718,7 +724,7 @@ faiss::SliceInvertedListscopy_subset_to faiss::SliceInvertedListsget_codes faiss::SliceInvertedListsget_ids - faiss::SliceInvertedListsget_iterator + faiss::SliceInvertedListsget_iterator faiss::SliceInvertedListsget_single_code faiss::SliceInvertedListsget_single_id faiss::SliceInvertedListsi0 @@ -727,7 +733,7 @@ faiss::SliceInvertedListsimbalance_factor faiss::SliceInvertedListsINVALID_CODE_SIZE faiss::SliceInvertedListsInvertedLists - faiss::SliceInvertedListsis_empty + faiss::SliceInvertedListsis_empty faiss::SliceInvertedListslist_size faiss::SliceInvertedListsmerge_from faiss::SliceInvertedListsnlist diff --git a/xml/structfaiss_1_1StopWordsInvertedLists.xml b/xml/structfaiss_1_1StopWordsInvertedLists.xml index 75ec880a63..ecd3527993 100644 --- a/xml/structfaiss_1_1StopWordsInvertedLists.xml +++ b/xml/structfaiss_1_1StopWordsInvertedLists.xml @@ -16,7 +16,7 @@ - + size_t @@ -29,7 +29,7 @@ - + size_t @@ -64,13 +64,15 @@ bool faiss::InvertedLists::use_iterator use_iterator + = false +request to use iterator rather than get_codes / get_ids - + @@ -93,7 +95,7 @@ - + size_t @@ -112,7 +114,7 @@ - + const uint8_t * @@ -134,7 +136,7 @@ - + const idx_t * @@ -156,7 +158,7 @@ - + void @@ -179,7 +181,7 @@ - + void @@ -202,7 +204,7 @@ - + idx_t @@ -227,7 +229,7 @@ - + const uint8_t * @@ -252,7 +254,7 @@ - + void @@ -275,7 +277,7 @@ - + size_t @@ -305,7 +307,7 @@ - + void @@ -339,7 +341,7 @@ - + void @@ -361,13 +363,14 @@ - + - + bool - bool faiss::InvertedLists::is_empty - (size_t list_no, void *inverted_list_context) const + virtual bool faiss::InvertedLists::is_empty + (size_t list_no, void *inverted_list_context=nullptr) const is_empty + is_empty size_t list_no @@ -375,19 +378,21 @@ void * inverted_list_context + nullptr +check if the list is empty - + - + InvertedListsIterator * virtual InvertedListsIterator* faiss::InvertedLists::get_iterator - (size_t list_no, void *inverted_list_context) const + (size_t list_no, void *inverted_list_context=nullptr) const get_iterator size_t @@ -396,6 +401,7 @@ void * inverted_list_context + nullptr get iterable for lists that use_iterator @@ -404,7 +410,7 @@ - + size_t @@ -435,7 +441,7 @@ - + void @@ -464,7 +470,7 @@ - + void @@ -477,7 +483,7 @@ - + void @@ -499,7 +505,7 @@ - + size_t @@ -531,7 +537,7 @@ - + double @@ -545,7 +551,7 @@ - + void @@ -559,7 +565,7 @@ - + size_t @@ -573,7 +579,7 @@ - + @@ -628,7 +634,7 @@ - + @@ -645,7 +651,7 @@ - + @@ -692,7 +698,7 @@ - + faiss::StopWordsInvertedListsadd_entries faiss::StopWordsInvertedListsadd_entry @@ -701,14 +707,14 @@ faiss::StopWordsInvertedListscopy_subset_to faiss::StopWordsInvertedListsget_codes faiss::StopWordsInvertedListsget_ids - faiss::StopWordsInvertedListsget_iterator + faiss::StopWordsInvertedListsget_iterator faiss::StopWordsInvertedListsget_single_code faiss::StopWordsInvertedListsget_single_id faiss::StopWordsInvertedListsil0 faiss::StopWordsInvertedListsimbalance_factor faiss::StopWordsInvertedListsINVALID_CODE_SIZE faiss::StopWordsInvertedListsInvertedLists - faiss::StopWordsInvertedListsis_empty + faiss::StopWordsInvertedListsis_empty faiss::StopWordsInvertedListslist_size faiss::StopWordsInvertedListsmaxsize faiss::StopWordsInvertedListsmerge_from diff --git a/xml/structfaiss_1_1VStackInvertedLists.xml b/xml/structfaiss_1_1VStackInvertedLists.xml index 91d735746c..f4468dfda8 100644 --- a/xml/structfaiss_1_1VStackInvertedLists.xml +++ b/xml/structfaiss_1_1VStackInvertedLists.xml @@ -15,7 +15,7 @@ - + std::vector< idx_t > @@ -28,7 +28,7 @@ - + size_t @@ -63,13 +63,15 @@ bool faiss::InvertedLists::use_iterator use_iterator + = false +request to use iterator rather than get_codes / get_ids - + @@ -93,7 +95,7 @@ - + size_t @@ -112,7 +114,7 @@ - + const uint8_t * @@ -134,7 +136,7 @@ - + const idx_t * @@ -156,7 +158,7 @@ - + void @@ -179,7 +181,7 @@ - + void @@ -202,7 +204,7 @@ - + idx_t @@ -227,7 +229,7 @@ - + const uint8_t * @@ -252,7 +254,7 @@ - + void @@ -275,7 +277,7 @@ - + size_t @@ -305,7 +307,7 @@ - + void @@ -339,7 +341,7 @@ - + void @@ -361,13 +363,14 @@ - + - + bool - bool faiss::InvertedLists::is_empty - (size_t list_no, void *inverted_list_context) const + virtual bool faiss::InvertedLists::is_empty + (size_t list_no, void *inverted_list_context=nullptr) const is_empty + is_empty size_t list_no @@ -375,19 +378,21 @@ void * inverted_list_context + nullptr +check if the list is empty - + - + InvertedListsIterator * virtual InvertedListsIterator* faiss::InvertedLists::get_iterator - (size_t list_no, void *inverted_list_context) const + (size_t list_no, void *inverted_list_context=nullptr) const get_iterator size_t @@ -396,6 +401,7 @@ void * inverted_list_context + nullptr get iterable for lists that use_iterator @@ -404,7 +410,7 @@ - + size_t @@ -435,7 +441,7 @@ - + void @@ -464,7 +470,7 @@ - + void @@ -477,7 +483,7 @@ - + void @@ -499,7 +505,7 @@ - + size_t @@ -531,7 +537,7 @@ - + double @@ -545,7 +551,7 @@ - + void @@ -559,7 +565,7 @@ - + size_t @@ -573,7 +579,7 @@ - + @@ -628,7 +634,7 @@ - + @@ -645,7 +651,7 @@ - + @@ -688,7 +694,7 @@ - + faiss::VStackInvertedListsadd_entries faiss::VStackInvertedListsadd_entry @@ -698,14 +704,14 @@ faiss::VStackInvertedListscumsz faiss::VStackInvertedListsget_codes faiss::VStackInvertedListsget_ids - faiss::VStackInvertedListsget_iterator + faiss::VStackInvertedListsget_iterator faiss::VStackInvertedListsget_single_code faiss::VStackInvertedListsget_single_id faiss::VStackInvertedListsils faiss::VStackInvertedListsimbalance_factor faiss::VStackInvertedListsINVALID_CODE_SIZE faiss::VStackInvertedListsInvertedLists - faiss::VStackInvertedListsis_empty + faiss::VStackInvertedListsis_empty faiss::VStackInvertedListslist_size faiss::VStackInvertedListsmerge_from faiss::VStackInvertedListsnlist