Crate faiss_sys

Crate faiss_sys 

Source

Structs§

CUstream_st
FaissBuffer
List of temporary buffers used to store results before they are copied to the RangeSearchResult object.
FaissBufferList_H
FaissClusteringIterationStats_H
FaissClusteringParameters
Class for the clustering parameters. Can be passed to the constructor of the Clustering object.
FaissClustering_H
FaissCustomIOReader_H
FaissCustomIOWriter_H
FaissDistanceComputer_H
FaissGpuClonerOptions_H
FaissGpuIndexConfig_H
FaissGpuResourcesProvider_H
FaissGpuResources_H
FaissIDSelectorAnd_H
FaissIDSelectorBatch_H
FaissIDSelectorBitmap_H
FaissIDSelectorNot_H
FaissIDSelectorOr_H
FaissIDSelectorRange_H
FaissIDSelectorXOr_H
FaissIDSelector_H
FaissIOReader_H
FaissIOWriter_H
FaissIndexBinary_H
FaissIndexIVFStats
FaissIndex_H
FaissParameterRange_H
FaissParameterSpace_H
FaissRangeQueryResult_H
FaissRangeSearchPartialResult_H
FaissRangeSearchResult_H
FaissSearchParameters_H
FaissVectorTransform_H
__BindgenOpaqueArray
If Bindgen could only determine the size and alignment of a type, it is represented like this.
cublasContext

Constants§

FaissErrorCode_FAISS_EXCEPT
Faiss library exception
FaissErrorCode_OK
No error
FaissErrorCode_STD_EXCEPT
Standard C++ library exception
FaissErrorCode_UNKNOWN_EXCEPT
Any exception other than Faiss or standard C++ library exceptions
FaissIndicesOptions_INDICES_32_BIT
Indices are stored as 32 bit integers on the GPU, but returned as 64 bit integers
FaissIndicesOptions_INDICES_64_BIT
Indices are stored as 64 bit integers on the GPU
FaissIndicesOptions_INDICES_CPU
The user indices are only stored on the CPU; the GPU returns (inverted list, offset) to the CPU which is then translated to the real user index.
FaissIndicesOptions_INDICES_IVF
The indices are not stored at all, on either the CPU or GPU. Only (inverted list, offset) is returned to the user as the index.
FaissMetricType_METRIC_BrayCurtis
some additional metrics defined in scipy.spatial.distance
FaissMetricType_METRIC_Canberra
some additional metrics defined in scipy.spatial.distance
FaissMetricType_METRIC_INNER_PRODUCT
< maximum inner product search
FaissMetricType_METRIC_JensenShannon
some additional metrics defined in scipy.spatial.distance
FaissMetricType_METRIC_L1
< L1 (aka cityblock)
FaissMetricType_METRIC_L2
< squared L2 search
FaissMetricType_METRIC_Linf
< infinity distance
FaissMetricType_METRIC_Lp
< L_p distance, p is given by metric_arg
FaissQuantizerType_QT_4bit
< 4 bits per component
FaissQuantizerType_QT_4bit_uniform
FaissQuantizerType_QT_6bit
< 6 bits per component
FaissQuantizerType_QT_8bit
< 8 bits per component
FaissQuantizerType_QT_8bit_direct
< fast indexing of uint8s
FaissQuantizerType_QT_8bit_direct_signed
< fast indexing of signed int8s ranging from [-128 < to 127]
FaissQuantizerType_QT_8bit_uniform
< same, shared range for all dimensions
FaissQuantizerType_QT_bf16
FaissQuantizerType_QT_fp16

Functions§

faiss_BufferList_add
faiss_BufferList_append_buffer
faiss_BufferList_buffer_size
List of temporary buffers used to store results before they are copied to the RangeSearchResult object.
faiss_BufferList_copy_range
copy elemnts ofs:ofs+n-1 seen as linear data in the buffers to tables dest_ids, dest_dis
faiss_BufferList_free
List of temporary buffers used to store results before they are copied to the RangeSearchResult object.
faiss_BufferList_new
faiss_BufferList_wp
List of temporary buffers used to store results before they are copied to the RangeSearchResult object.
faiss_CenteringTransform_free
faiss_CenteringTransform_new_with
faiss_ClusteringIterationStats_imbalance_factor
getter for k
faiss_ClusteringIterationStats_nsplit
getter for k
faiss_ClusteringIterationStats_obj
getter for k
faiss_ClusteringIterationStats_time
getter for k
faiss_ClusteringIterationStats_time_search
getter for k
faiss_ClusteringParameters_init
Sets the ClusteringParameters object with reasonable defaults
faiss_Clustering_centroids
getter for centroids (size = k * d)
faiss_Clustering_d
getter for d
faiss_Clustering_decode_block_size
clustering based on assignment - centroid update iterations
faiss_Clustering_free
faiss_Clustering_frozen_centroids
clustering based on assignment - centroid update iterations
faiss_Clustering_int_centroids
clustering based on assignment - centroid update iterations
faiss_Clustering_iteration_stats
getter for iteration stats
faiss_Clustering_k
getter for k
faiss_Clustering_max_points_per_centroid
clustering based on assignment - centroid update iterations
faiss_Clustering_min_points_per_centroid
clustering based on assignment - centroid update iterations
faiss_Clustering_new
the only mandatory parameters are k and d
faiss_Clustering_new_with_params
faiss_Clustering_niter
clustering based on assignment - centroid update iterations
faiss_Clustering_nredo
clustering based on assignment - centroid update iterations
faiss_Clustering_seed
clustering based on assignment - centroid update iterations
faiss_Clustering_spherical
clustering based on assignment - centroid update iterations
faiss_Clustering_train
faiss_Clustering_update_index
clustering based on assignment - centroid update iterations
faiss_Clustering_verbose
clustering based on assignment - centroid update iterations
faiss_CustomIOReader_free
Custom reader + writer
faiss_CustomIOReader_new
Custom reader + writer
faiss_CustomIOWriter_free
faiss_CustomIOWriter_new
faiss_DistanceComputer_free
faiss_DistanceComputer_set_query
called before computing distances
faiss_DistanceComputer_symmetric_dis
compute distance between two stored vectors
faiss_DistanceComputer_vector_to_query_dis
Compute distance of vector i to current query. This function corresponds to the function call operator: DistanceComputer::operator()
faiss_GpuClonerOptions_free
faiss_GpuClonerOptions_indicesOptions
how should indices be stored on index types that support indices (anything but GpuIndexFlat*)?
faiss_GpuClonerOptions_new
Default constructor for GpuClonerOptions
faiss_GpuClonerOptions_reserveVecs
reserve vectors in the invfiles?
faiss_GpuClonerOptions_set_indicesOptions
how should indices be stored on index types that support indices (anything but GpuIndexFlat*)?
faiss_GpuClonerOptions_set_reserveVecs
reserve vectors in the invfiles?
faiss_GpuClonerOptions_set_storeTransposed
(boolean) For GpuIndexFlat, store data in transposed layout?
faiss_GpuClonerOptions_set_useFloat16
(boolean) for GpuIndexIVFFlat, is storage in float16? for GpuIndexIVFPQ, are intermediate calculations in float16?
faiss_GpuClonerOptions_set_useFloat16CoarseQuantizer
(boolean) is the coarse quantizer in float16?
faiss_GpuClonerOptions_set_usePrecomputed
(boolean) use precomputed tables?
faiss_GpuClonerOptions_set_verbose
(boolean) Set verbose options on the index
faiss_GpuClonerOptions_storeTransposed
(boolean) For GpuIndexFlat, store data in transposed layout?
faiss_GpuClonerOptions_useFloat16
(boolean) for GpuIndexIVFFlat, is storage in float16? for GpuIndexIVFPQ, are intermediate calculations in float16?
faiss_GpuClonerOptions_useFloat16CoarseQuantizer
(boolean) is the coarse quantizer in float16?
faiss_GpuClonerOptions_usePrecomputed
(boolean) use precomputed tables?
faiss_GpuClonerOptions_verbose
(boolean) Set verbose options on the index
faiss_GpuIndexConfig_device
faiss_GpuMultipleClonerOptions_free
(boolean) Set verbose options on the index
faiss_GpuMultipleClonerOptions_new
Default constructor for GpuMultipleClonerOptions
faiss_GpuMultipleClonerOptions_set_shard
(boolean) Whether to shard the index across GPUs, versus replication across GPUs
faiss_GpuMultipleClonerOptions_set_shard_type
IndexIVF::copy_subset_to subset type
faiss_GpuMultipleClonerOptions_shard
(boolean) Whether to shard the index across GPUs, versus replication across GPUs
faiss_GpuMultipleClonerOptions_shard_type
IndexIVF::copy_subset_to subset type
faiss_GpuResourcesProvider_free
faiss_GpuResourcesProvider_getResources
faiss_GpuResources_free
Base class of GPU-side resource provider; hides provision of cuBLAS handles, CUDA streams and a temporary memory manager
faiss_GpuResources_getAsyncCopyStream
Returns the stream on which we perform async CPU <-> GPU copies
faiss_GpuResources_getAsyncCopyStreamCurrentDevice
Calls getAsyncCopyStream for the current device
faiss_GpuResources_getBlasHandle
Returns the cuBLAS handle that we use for the given device
faiss_GpuResources_getBlasHandleCurrentDevice
Calls getBlasHandle with the current device
faiss_GpuResources_getDefaultStream
Returns the stream that we order all computation on for the given device
faiss_GpuResources_getDefaultStreamCurrentDevice
Calls getDefaultStream with the current device
faiss_GpuResources_getPinnedMemory
Returns the available CPU pinned memory buffer
faiss_GpuResources_initializeForDevice
Call to pre-allocate resources for a particular device. If this is not called, then resources will be allocated at the first time of demand
faiss_GpuResources_syncDefaultStream
Synchronizes the CPU with respect to the default stream for the given device
faiss_GpuResources_syncDefaultStreamCurrentDevice
Calls syncDefaultStream for the current device
faiss_IDSelectorAnd_new
faiss_IDSelectorBatch_mask
Remove ids from a set. Repetitions of ids in the indices set passed to the constructor does not hurt performance. The hash function used for the bloom filter and GCC’s implementation of unordered_set are just the least significant bits of the id. This works fine for random ids or ids in sequences but will produce many hash collisions if lsb’s are always the same
faiss_IDSelectorBatch_nbits
Remove ids from a set. Repetitions of ids in the indices set passed to the constructor does not hurt performance. The hash function used for the bloom filter and GCC’s implementation of unordered_set are just the least significant bits of the id. This works fine for random ids or ids in sequences but will produce many hash collisions if lsb’s are always the same
faiss_IDSelectorBatch_new
Remove ids from a set. Repetitions of ids in the indices set passed to the constructor does not hurt performance. The hash function used for the bloom filter and GCC’s implementation of unordered_set are just the least significant bits of the id. This works fine for random ids or ids in sequences but will produce many hash collisions if lsb’s are always the same
faiss_IDSelectorBitmap_bitmap
faiss_IDSelectorBitmap_free
faiss_IDSelectorBitmap_n
faiss_IDSelectorBitmap_new
faiss_IDSelectorNot_new
faiss_IDSelectorOr_new
faiss_IDSelectorRange_free
remove ids between [imni, imax)
faiss_IDSelectorRange_imax
remove ids between [imni, imax)
faiss_IDSelectorRange_imin
remove ids between [imni, imax)
faiss_IDSelectorRange_new
remove ids between [imni, imax)
faiss_IDSelectorXOr_new
faiss_IDSelector_free
Encapsulates a set of ids to remove.
faiss_IDSelector_is_member
Encapsulates a set of ids to remove.
faiss_IOReader_free
faiss_IOWriter_free
faiss_ITQMatrix_free
Getter for random_rotation
faiss_ITQMatrix_new_with
Getter for random_rotation
faiss_ITQTransform_do_pca
Getter for do_pca
faiss_ITQTransform_free
faiss_ITQTransform_new_with
faiss_IndexBinaryIVF_cast
Index based on a inverted file (IVF)
faiss_IndexBinaryIVF_free
Index based on a inverted file (IVF)
faiss_IndexBinaryIVF_get_list_size
faiss_IndexBinaryIVF_imbalance_factor
Check the inverted lists’ imbalance factor.
faiss_IndexBinaryIVF_make_direct_map
initialize a direct map
faiss_IndexBinaryIVF_max_codes
max nb of codes to visit to do a query
faiss_IndexBinaryIVF_merge_from
moves the entries from another dataset to self. On output, other is empty. add_id is added to all moved ids (for sequential ids, this would be this->ntotal
faiss_IndexBinaryIVF_nlist
number of possible key values
faiss_IndexBinaryIVF_nprobe
number of probes at query time
faiss_IndexBinaryIVF_own_fields
whether object owns the quantizer
faiss_IndexBinaryIVF_per_invlist_search
collect computations per batch
faiss_IndexBinaryIVF_print_stats
display some stats about the inverted lists of the index
faiss_IndexBinaryIVF_quantizer
quantizer that maps vectors to inverted lists
faiss_IndexBinaryIVF_search_preassigned
Search a set of vectors, that are pre-quantized by the IVF quantizer. Fill in the corresponding heaps with the query results. search() calls this.
faiss_IndexBinaryIVF_set_max_codes
max nb of codes to visit to do a query
faiss_IndexBinaryIVF_set_nprobe
number of probes at query time
faiss_IndexBinaryIVF_set_own_fields
whether object owns the quantizer
faiss_IndexBinaryIVF_set_per_invlist_search
collect computations per batch
faiss_IndexBinaryIVF_set_use_heap
Select between using a heap or counting to select the k smallest values when scanning inverted lists.
faiss_IndexBinaryIVF_use_heap
Select between using a heap or counting to select the k smallest values when scanning inverted lists.
faiss_IndexBinary_add
Add n vectors of dimension d to the index.
faiss_IndexBinary_add_with_ids
Same as add, but stores xids instead of sequential ids.
faiss_IndexBinary_assign
return the indexes of the k vectors closest to the query x.
faiss_IndexBinary_d
Getter for d
faiss_IndexBinary_free
Opaque type for referencing to a binary index object
faiss_IndexBinary_is_trained
Getter for is_trained
faiss_IndexBinary_metric_type
Getter for metric_type
faiss_IndexBinary_ntotal
Getter for ntotal
faiss_IndexBinary_range_search
query n vectors of dimension d to the index.
faiss_IndexBinary_reconstruct
Reconstruct a stored vector (or an approximation if lossy coding)
faiss_IndexBinary_reconstruct_n
Reconstruct vectors i0 to i0 + ni - 1
faiss_IndexBinary_remove_ids
removes IDs from the index. Not supported by all indexes @param index opaque pointer to index object @param nremove output for the number of IDs removed
faiss_IndexBinary_reset
removes all elements from the database. @param index opaque pointer to index object
faiss_IndexBinary_search
query n vectors of dimension d to the index.
faiss_IndexBinary_set_verbose
Getter for metric_type
faiss_IndexBinary_train
Perform training on a representative set of vectors
faiss_IndexBinary_verbose
Getter for metric_type
faiss_IndexFlat1D_cast
Opaque type for IndexFlat1D
faiss_IndexFlat1D_free
Opaque type for IndexFlat1D
faiss_IndexFlat1D_new
Opaque type for IndexFlat1D
faiss_IndexFlat1D_new_with
faiss_IndexFlat1D_update_permutation
faiss_IndexFlatIP_cast
Opaque type for IndexFlatIP
faiss_IndexFlatIP_free
Opaque type for IndexFlatIP
faiss_IndexFlatIP_new
Opaque type for IndexFlatIP
faiss_IndexFlatIP_new_with
faiss_IndexFlatL2_cast
Opaque type for IndexFlatL2
faiss_IndexFlatL2_free
Opaque type for IndexFlatL2
faiss_IndexFlatL2_new
Opaque type for IndexFlatL2
faiss_IndexFlatL2_new_with
faiss_IndexFlat_cast
attempt a dynamic cast to a flat index, thus checking check whether the underlying index type is IndexFlat.
faiss_IndexFlat_compute_distance_subset
compute distance with a subset of vectors
faiss_IndexFlat_free
attempt a dynamic cast to a flat index, thus checking check whether the underlying index type is IndexFlat.
faiss_IndexFlat_new
Opaque type for IndexFlat
faiss_IndexFlat_new_with
faiss_IndexFlat_xb
get a pointer to the index’s internal data (the xb field). The outputs become invalid after any data addition or removal operation.
faiss_IndexIDMap2_cast
attempt a dynamic cast to a IDMap2, thus checking check whether the underlying index type is IndexIDMap.
faiss_IndexIDMap2_construct_rev_map
make the rev_map from scratch
faiss_IndexIDMap2_id_map
get a pointer to the index map’s internal ID vector (the id_map field). The outputs of this function become invalid after any operation that can modify the index.
faiss_IndexIDMap2_new
same as IndexIDMap but also provides an efficient reconstruction implementation via a 2-way index
faiss_IndexIDMap2_own_fields
same as IndexIDMap but also provides an efficient reconstruction implementation via a 2-way index
faiss_IndexIDMap2_set_own_fields
same as IndexIDMap but also provides an efficient reconstruction implementation via a 2-way index
faiss_IndexIDMap2_sub_index
get a pointer to the sub-index (the index field). The outputs of this function become invalid after any operation that can modify the index.
faiss_IndexIDMap_cast
attempt a dynamic cast to a IDMap, thus checking check whether the underlying index type is IndexIDMap.
faiss_IndexIDMap_id_map
get a pointer to the index map’s internal ID vector (the id_map field). The outputs of this function become invalid after any operation that can modify the index.
faiss_IndexIDMap_new
Index that translates search results to ids
faiss_IndexIDMap_own_fields
Index that translates search results to ids
faiss_IndexIDMap_set_own_fields
Index that translates search results to ids
faiss_IndexIDMap_sub_index
get a pointer to the sub-index (the index field). The outputs of this function become invalid after any operation that can modify the index.
faiss_IndexIVFFlat_add_core
faiss_IndexIVFFlat_cast
Inverted file with stored vectors. Here the inverted file pre-selects the vectors to be searched, but they are not otherwise encoded, the code array just contains the raw float entries.
faiss_IndexIVFFlat_free
Inverted file with stored vectors. Here the inverted file pre-selects the vectors to be searched, but they are not otherwise encoded, the code array just contains the raw float entries.
faiss_IndexIVFFlat_new
whether object owns the quantizer
faiss_IndexIVFFlat_new_with
faiss_IndexIVFFlat_new_with_metric
faiss_IndexIVFFlat_nlist
number of possible key values
faiss_IndexIVFFlat_nprobe
number of probes at query time
faiss_IndexIVFFlat_own_fields
whether object owns the quantizer
faiss_IndexIVFFlat_quantizer
quantizer that maps vectors to inverted lists
faiss_IndexIVFFlat_quantizer_trains_alone
= 0: use the quantizer as index in a kmeans training = 1: just pass on the training set to the train() of the quantizer = 2: kmeans training on a flat index + add the centroids to the quantizer
faiss_IndexIVFFlat_set_nprobe
number of probes at query time
faiss_IndexIVFFlat_set_own_fields
whether object owns the quantizer
faiss_IndexIVFFlat_update_vectors
Update a subset of vectors.
faiss_IndexIVFScalarQuantizer_add_core
whether object owns the quantizer
faiss_IndexIVFScalarQuantizer_cast
Opaque type for IndexIVFScalarQuantizer
faiss_IndexIVFScalarQuantizer_free
Opaque type for IndexIVFScalarQuantizer
faiss_IndexIVFScalarQuantizer_new
Opaque type for IndexIVFScalarQuantizer
faiss_IndexIVFScalarQuantizer_new_with
faiss_IndexIVFScalarQuantizer_new_with_metric
faiss_IndexIVFScalarQuantizer_nlist
number of possible key values
faiss_IndexIVFScalarQuantizer_nprobe
number of probes at query time
faiss_IndexIVFScalarQuantizer_own_fields
whether object owns the quantizer
faiss_IndexIVFScalarQuantizer_quantizer
quantizer that maps vectors to inverted lists
faiss_IndexIVFScalarQuantizer_set_nprobe
number of probes at query time
faiss_IndexIVFScalarQuantizer_set_own_fields
whether object owns the quantizer
faiss_IndexIVFStats_reset
faiss_IndexIVF_cast
Index based on a inverted file (IVF)
faiss_IndexIVF_copy_subset_to
copy a subset of the entries index to the other index
faiss_IndexIVF_free
Index based on a inverted file (IVF)
faiss_IndexIVF_get_list_size
faiss_IndexIVF_imbalance_factor
Check the inverted lists’ imbalance factor.
faiss_IndexIVF_invlists_get_ids
Get the IDs in an inverted list. IDs are written to invlist, which must be large enough to accommodate the full list.
faiss_IndexIVF_make_direct_map
initialize a direct map
faiss_IndexIVF_merge_from
moves the entries from another dataset to self. On output, other is empty. add_id is added to all moved ids (for sequential ids, this would be this->ntotal
faiss_IndexIVF_nlist
number of possible key values
faiss_IndexIVF_nprobe
number of probes at query time
faiss_IndexIVF_own_fields
whether object owns the quantizer
faiss_IndexIVF_print_stats
display some stats about the inverted lists of the index
faiss_IndexIVF_quantizer
quantizer that maps vectors to inverted lists
faiss_IndexIVF_quantizer_trains_alone
= 0: use the quantizer as index in a kmeans training = 1: just pass on the training set to the train() of the quantizer = 2: kmeans training on a flat index + add the centroids to the quantizer
faiss_IndexIVF_search_preassigned
search a set of vectors, that are pre-quantized by the IVF quantizer. Fill in the corresponding heaps with the query results. search() calls this.
faiss_IndexIVF_set_nprobe
number of probes at query time
faiss_IndexIVF_set_own_fields
whether object owns the quantizer
faiss_IndexIVF_train_encoder
faiss_IndexLSH_cast
The sign of each vector component is put in a binary signature
faiss_IndexLSH_code_size
The sign of each vector component is put in a binary signature
faiss_IndexLSH_free
The sign of each vector component is put in a binary signature
faiss_IndexLSH_nbits
The sign of each vector component is put in a binary signature
faiss_IndexLSH_new
The sign of each vector component is put in a binary signature
faiss_IndexLSH_new_with_options
faiss_IndexLSH_rotate_data
The sign of each vector component is put in a binary signature
faiss_IndexLSH_train_thresholds
The sign of each vector component is put in a binary signature
faiss_IndexPreTransform_cast
Index that applies a LinearTransform transform on vectors before handing them over to a sub-index
faiss_IndexPreTransform_free
Index that applies a LinearTransform transform on vectors before handing them over to a sub-index
faiss_IndexPreTransform_index
Index that applies a LinearTransform transform on vectors before handing them over to a sub-index
faiss_IndexPreTransform_new
Index that applies a LinearTransform transform on vectors before handing them over to a sub-index
faiss_IndexPreTransform_new_with
faiss_IndexPreTransform_new_with_transform
faiss_IndexPreTransform_own_fields
Index that applies a LinearTransform transform on vectors before handing them over to a sub-index
faiss_IndexPreTransform_prepend_transform
faiss_IndexPreTransform_set_own_fields
Index that applies a LinearTransform transform on vectors before handing them over to a sub-index
faiss_IndexRefineFlat_cast
faiss_IndexRefineFlat_free
faiss_IndexRefineFlat_k_factor
factor between k requested in search and the k requested from the base_index (should be >= 1)
faiss_IndexRefineFlat_new
Opaque type for IndexRefineFlat
faiss_IndexRefineFlat_own_fields
faiss_IndexRefineFlat_set_k_factor
factor between k requested in search and the k requested from the base_index (should be >= 1)
faiss_IndexRefineFlat_set_own_fields
faiss_IndexReplicas_add_replica
faiss_IndexReplicas_at
faiss_IndexReplicas_free
Index that concatenates the results from several sub-indexes
faiss_IndexReplicas_new
Index that concatenates the results from several sub-indexes
faiss_IndexReplicas_new_with_options
faiss_IndexReplicas_own_fields
Index that concatenates the results from several sub-indexes
faiss_IndexReplicas_remove_replica
faiss_IndexReplicas_set_own_fields
Index that concatenates the results from several sub-indexes
faiss_IndexScalarQuantizer_cast
faiss_IndexScalarQuantizer_free
faiss_IndexScalarQuantizer_new
Opaque type for IndexScalarQuantizer
faiss_IndexScalarQuantizer_new_with
faiss_IndexShards_add_shard
faiss_IndexShards_at
faiss_IndexShards_free
Index that concatenates the results from several sub-indexes
faiss_IndexShards_new
Index that concatenates the results from several sub-indexes
faiss_IndexShards_new_with_options
faiss_IndexShards_own_fields
Index that concatenates the results from several sub-indexes
faiss_IndexShards_remove_shard
faiss_IndexShards_set_own_fields
Index that concatenates the results from several sub-indexes
faiss_IndexShards_set_successive_ids
Index that concatenates the results from several sub-indexes
faiss_IndexShards_successive_ids
Index that concatenates the results from several sub-indexes
faiss_Index_add
Add n vectors of dimension d to the index.
faiss_Index_add_with_ids
Same as add, but stores xids instead of sequential ids.
faiss_Index_assign
return the indexes of the k vectors closest to the query x.
faiss_Index_compute_residual
Computes a residual vector after indexing encoding.
faiss_Index_compute_residual_n
Computes a residual vector after indexing encoding.
faiss_Index_d
Getter for d
faiss_Index_free
Opaque type for referencing to an index object
faiss_Index_is_trained
Getter for is_trained
faiss_Index_metric_type
Getter for metric_type
faiss_Index_ntotal
Getter for ntotal
faiss_Index_range_search
query n vectors of dimension d to the index.
faiss_Index_reconstruct
Reconstruct a stored vector (or an approximation if lossy coding)
faiss_Index_reconstruct_n
Reconstruct vectors i0 to i0 + ni - 1
faiss_Index_remove_ids
removes IDs from the index. Not supported by all indexes @param index opaque pointer to index object @param nremove output for the number of IDs removed
faiss_Index_reset
removes all elements from the database. @param index opaque pointer to index object
faiss_Index_sa_code_size
The size of the produced codes in bytes.
faiss_Index_sa_decode
decode a set of vectors
faiss_Index_sa_encode
encode a set of vectors
faiss_Index_search
query n vectors of dimension d to the index.
faiss_Index_search_with_params
query n vectors of dimension d with search parameters to the index.
faiss_Index_set_verbose
Getter for metric_type
faiss_Index_train
Perform training on a representative set of vectors
faiss_Index_verbose
Getter for metric_type
faiss_LinearTransform_free
Opaque type for referencing to a LinearTransform object
faiss_LinearTransform_have_bias
Getter for have_bias
faiss_LinearTransform_is_orthonormal
Getter for is_orthonormal
faiss_LinearTransform_set_is_orthonormal
compute A^T * A to set the is_orthonormal flag
faiss_LinearTransform_transform_transpose
compute x = A^T * (x - b) is reverse transform if A has orthonormal lines
faiss_NormalizationTransform_free
faiss_NormalizationTransform_new_with
faiss_NormalizationTransform_norm
faiss_OPQMatrix_free
Getter for do_pca
faiss_OPQMatrix_new_with
Getter for do_pca
faiss_OPQMatrix_niter
faiss_OPQMatrix_niter_pq
faiss_OPQMatrix_set_niter
faiss_OPQMatrix_set_niter_pq
faiss_OPQMatrix_set_verbose
faiss_OPQMatrix_verbose
faiss_PCAMatrix_eigen_power
Getter for eigen_power
faiss_PCAMatrix_free
faiss_PCAMatrix_new_with
faiss_PCAMatrix_random_rotation
Getter for random_rotation
faiss_ParameterRange_name
possible values of a parameter, sorted from least to most expensive/accurate
faiss_ParameterRange_values
Getter for the values in the range. The output values are invalidated upon any other modification of the range.
faiss_ParameterSpace_add_range
add a new parameter (or return it if it exists)
faiss_ParameterSpace_combination_name
get string representation of the combination by writing it to the given character buffer. A buffer size of 1000 ensures that the full name is collected.
faiss_ParameterSpace_display
print a description on stdout
faiss_ParameterSpace_free
Uses a-priori knowledge on the Faiss indexes to extract tunable parameters.
faiss_ParameterSpace_n_combinations
nb of combinations, = product of values sizes
faiss_ParameterSpace_new
Parameter space default constructor
faiss_ParameterSpace_set_index_parameter
set one of the parameters
faiss_ParameterSpace_set_index_parameters
set a combination of parameters described by a string
faiss_ParameterSpace_set_index_parameters_cno
set a combination of parameters on an index
faiss_RandomRotationMatrix_free
Getter for is_orthonormal
faiss_RandomRotationMatrix_new_with
Getter for is_orthonormal
faiss_RangeQueryResult_add
result structure for a single query
faiss_RangeQueryResult_nres
result structure for a single query
faiss_RangeQueryResult_pres
result structure for a single query
faiss_RangeQueryResult_qno
result structure for a single query
faiss_RangeSearchPartialResult_finalize
faiss_RangeSearchPartialResult_new
faiss_RangeSearchPartialResult_new_result
faiss_RangeSearchPartialResult_res
faiss_RangeSearchPartialResult_set_lims
called by range_search before do_allocation
faiss_RangeSearchResult_buffer_size
getter for buffer_size
faiss_RangeSearchResult_do_allocation
called when lims contains the nb of elements result entries for each query
faiss_RangeSearchResult_free
faiss_RangeSearchResult_labels
getter for labels and respective distances (not sorted): result for query i is labels[lims[i]:lims[i+1]]
faiss_RangeSearchResult_lims
getter for lims: size (nq + 1)
faiss_RangeSearchResult_new
faiss_RangeSearchResult_new_with
faiss_RangeSearchResult_nq
faiss_RemapDimensionsTransform_free
faiss_RemapDimensionsTransform_new_with
faiss_SearchParametersIVF_cast
faiss_SearchParametersIVF_free
faiss_SearchParametersIVF_max_codes
faiss_SearchParametersIVF_new
faiss_SearchParametersIVF_new_with
faiss_SearchParametersIVF_nprobe
faiss_SearchParametersIVF_sel
faiss_SearchParametersIVF_set_max_codes
faiss_SearchParametersIVF_set_nprobe
faiss_SearchParameters_free
faiss_SearchParameters_new
faiss_StandardGpuResources_free
Default implementation of GpuResourcesProvider that allocates a cuBLAS stream and 2 streams for use, as well as temporary memory
faiss_StandardGpuResources_new
Default constructor for StandardGpuResources
faiss_StandardGpuResources_noTempMemory
Disable allocation of temporary memory; all temporary memory requests will call cudaMalloc / cudaFree at the point of use
faiss_StandardGpuResources_setDefaultNullStreamAllDevices
Called to change the work ordering streams to the null stream for all devices
faiss_StandardGpuResources_setDefaultStream
Called to change the stream for work ordering
faiss_StandardGpuResources_setPinnedMemory
Set amount of pinned memory to allocate, for async GPU <-> CPU transfers
faiss_StandardGpuResources_setTempMemory
Specify that we wish to use a certain fixed size of memory on all devices as temporary memory
faiss_VectorTransform_apply
apply the random rotation, return new allocated matrix @param x size n * d_in @return size n * d_out
faiss_VectorTransform_apply_noalloc
apply transformation and result is pre-allocated @param x size n * d_in @param xt size n * d_out
faiss_VectorTransform_d_in
Getter for input dimension
faiss_VectorTransform_d_out
Getter for output dimension
faiss_VectorTransform_free
Opaque type for referencing to a VectorTransform object
faiss_VectorTransform_is_trained
Getter for is_trained
faiss_VectorTransform_reverse_transform
reverse transformation. May not be implemented or may return approximate result
faiss_VectorTransform_train
Perform training on a representative set of vectors
faiss_clone_index
Clone an index. This is equivalent to faiss::clone_index
faiss_clone_index_binary
Clone a binary index. This is equivalent to faiss::clone_index_binary
faiss_fvec_L2sqr_ny
compute ny square L2 distance between x and a set of contiguous y vectors
faiss_fvec_inner_products_ny
compute the inner product between nx vectors x and one y
faiss_fvec_norm_L2sqr
squared norm of a vector
faiss_fvec_norms_L2
compute the L2 norms for a set of vectors
faiss_fvec_norms_L2sqr
same as fvec_norms_L2, but computes squared norms
faiss_fvec_renorm_L2
L2-renormalize a set of vector. Nothing done if the vector is 0-normed
faiss_get_distance_compute_blas_database_bs
Getter of block sizes value for BLAS distance computations
faiss_get_distance_compute_blas_query_bs
Getter of block sizes value for BLAS distance computations
faiss_get_distance_compute_blas_threshold
Getter of threshold value on nx above which we switch to BLAS to compute distances
faiss_get_distance_compute_min_k_reservoir
Getter of number of results we switch to a reservoir to collect results rather than a heap
faiss_get_indexIVF_stats
global var that collects all statists
faiss_get_last_error
Get the error message of the last failed operation performed by Faiss. The given pointer is only invalid until another Faiss function is called.
faiss_get_num_gpus
Returns the number of available GPU devices
faiss_get_version
faiss_gpu_profiler_start
Starts the CUDA profiler (exposed via SWIG)
faiss_gpu_profiler_stop
Stops the CUDA profiler (exposed via SWIG)
faiss_gpu_sync_all_devices
Synchronizes the CPU against all devices (equivalent to cudaDeviceSynchronize for each device)
faiss_index_binary_factory
Build a binary index with the sequence of processing steps described in the string.
faiss_index_cpu_to_gpu
converts any CPU index that can be converted to GPU
faiss_index_cpu_to_gpu_multiple
converts any CPU index that can be converted to GPU
faiss_index_cpu_to_gpu_multiple_with_options
converts any CPU index that can be converted to GPU
faiss_index_cpu_to_gpu_with_options
converts any CPU index that can be converted to GPU
faiss_index_factory
Build an index with the sequence of processing steps described in the string.
faiss_index_gpu_to_cpu
converts any GPU index inside gpu_index to a CPU index
faiss_kmeans_clustering
simplified interface
faiss_pairwise_L2sqr
Compute pairwise distances between sets of vectors
faiss_pairwise_L2sqr_with_defaults
Compute pairwise distances between sets of vectors arguments from “faiss_pairwise_L2sqr” ldq equal -1 by default ldb equal -1 by default ldd equal -1 by default
faiss_read_VectorTransform_fname
Read vector transform from a file. This is equivalent to faiss:read_VectorTransform when a file path is given.
faiss_read_index
Read index from a file. This is equivalent to faiss:read_index when a file descriptor is given.
faiss_read_index_binary
Read index from a file. This is equivalent to faiss:read_index_binary when a file descriptor is given.
faiss_read_index_binary_custom
Read binary index from a custom reader.
faiss_read_index_binary_fname
Read index from a file. This is equivalent to faiss:read_index_binary when a file path is given.
faiss_read_index_custom
Read index from a custom reader.
faiss_read_index_fname
Read index from a file. This is equivalent to faiss:read_index when a file path is given.
faiss_set_distance_compute_blas_database_bs
Setter of block sizes value for BLAS distance computations
faiss_set_distance_compute_blas_query_bs
Setter of block sizes value for BLAS distance computations
faiss_set_distance_compute_blas_threshold
Setter of threshold value on nx above which we switch to BLAS to compute distances
faiss_set_distance_compute_min_k_reservoir
Setter of number of results we switch to a reservoir to collect results rather than a heap
faiss_write_index
Write index to a file. This is equivalent to faiss::write_index when a file descriptor is provided.
faiss_write_index_binary
Write index to a file. This is equivalent to faiss::write_index_binary when a file descriptor is provided.
faiss_write_index_binary_custom
Write binary index to a custom writer.
faiss_write_index_binary_fname
Write index to a file. This is equivalent to faiss::write_index_binary when a file path is provided.
faiss_write_index_custom
Write index to a custom writer.
faiss_write_index_fname
Write index to a file. This is equivalent to faiss::write_index when a file path is provided.

Type Aliases§

FILE
FaissBufferList
List of temporary buffers used to store results before they are copied to the RangeSearchResult object.
FaissCenteringTransform
FaissClustering
clustering based on assignment - centroid update iterations
FaissClusteringIterationStats
getter for k
FaissCustomIOReader
Custom reader + writer
FaissCustomIOWriter
FaissDistanceComputer
FaissErrorCode
An error code which depends on the exception thrown from the previous operation. See faiss_get_last_error to retrieve the error message.
FaissGpuClonerOptions
FaissGpuIndex
FaissGpuIndexConfig
FaissGpuMultipleClonerOptions
(boolean) Set verbose options on the index
FaissGpuParameterSpace
parameter space and setters for GPU indexes
FaissGpuResources
Base class of GPU-side resource provider; hides provision of cuBLAS handles, CUDA streams and a temporary memory manager
FaissGpuResourcesProvider
FaissIDSelector
Encapsulates a set of ids to remove.
FaissIDSelectorAnd
FaissIDSelectorBatch
Remove ids from a set. Repetitions of ids in the indices set passed to the constructor does not hurt performance. The hash function used for the bloom filter and GCC’s implementation of unordered_set are just the least significant bits of the id. This works fine for random ids or ids in sequences but will produce many hash collisions if lsb’s are always the same
FaissIDSelectorBitmap
FaissIDSelectorNot
FaissIDSelectorOr
FaissIDSelectorRange
remove ids between [imni, imax)
FaissIDSelectorXOr
FaissIOReader
FaissIOWriter
FaissITQMatrix
Getter for random_rotation
FaissITQTransform
FaissIndex
Opaque type for referencing to an index object
FaissIndexBinary
Opaque type for referencing to a binary index object
FaissIndexBinaryIVF
Index based on a inverted file (IVF)
FaissIndexFlat
Opaque type for IndexFlat
FaissIndexFlat1D
Opaque type for IndexFlat1D
FaissIndexFlatIP
Opaque type for IndexFlatIP
FaissIndexFlatL2
Opaque type for IndexFlatL2
FaissIndexIDMap
Index that translates search results to ids
FaissIndexIDMap2
same as IndexIDMap but also provides an efficient reconstruction implementation via a 2-way index
FaissIndexIVF
Index based on a inverted file (IVF)
FaissIndexIVFFlat
Inverted file with stored vectors. Here the inverted file pre-selects the vectors to be searched, but they are not otherwise encoded, the code array just contains the raw float entries.
FaissIndexIVFScalarQuantizer
Opaque type for IndexIVFScalarQuantizer
FaissIndexLSH
The sign of each vector component is put in a binary signature
FaissIndexPreTransform
Index that applies a LinearTransform transform on vectors before handing them over to a sub-index
FaissIndexRefineFlat
Opaque type for IndexRefineFlat
FaissIndexReplicas
Index that concatenates the results from several sub-indexes
FaissIndexScalarQuantizer
Opaque type for IndexScalarQuantizer
FaissIndexShards
Index that concatenates the results from several sub-indexes
FaissIndicesOptions
How user vector index data is stored on the GPU
FaissLinearTransform
Opaque type for referencing to a LinearTransform object
FaissMetricType
Some algorithms support both an inner product version and a L2 search version.
FaissNormalizationTransform
FaissOPQMatrix
Getter for do_pca
FaissPCAMatrix
FaissParameterRange
possible values of a parameter, sorted from least to most expensive/accurate
FaissParameterSpace
Uses a-priori knowledge on the Faiss indexes to extract tunable parameters.
FaissQuantizerType
FaissRandomRotationMatrix
Getter for is_orthonormal
FaissRangeQueryResult
result structure for a single query
FaissRangeSearchPartialResult
the entries in the buffers are split per query
FaissRangeSearchResult
FaissRemapDimensionsTransform
FaissSearchParameters
FaissSearchParametersIVF
FaissStandardGpuResources
Default implementation of GpuResourcesProvider that allocates a cuBLAS stream and 2 streams for use, as well as temporary memory
FaissVectorTransform
Opaque type for referencing to a VectorTransform object
cublasHandle_t
cudaStream_t
CUDA stream
faiss_idx_t
idx_t