IVF Flat
Source header: cuvs/neighbors/ivf_flat.h
IVF-Flat index build parameters
cuvsIvfFlatIndexParams
Supplemental parameters to build IVF-Flat Index
Fields
cuvsIvfFlatIndexParamsCreate
Allocate IVF-Flat Index params, and populate with default values
Parameters
Returns
cuvsIvfFlatIndexParamsDestroy
De-allocate IVF-Flat Index params
Parameters
Returns
IVF-Flat index search parameters
cuvsIvfFlatSearchParams
Supplemental parameters to search IVF-Flat index
Fields
cuvsIvfFlatSearchParamsCreate
Allocate IVF-Flat search params, and populate with default values
Parameters
Returns
cuvsIvfFlatSearchParamsDestroy
De-allocate IVF-Flat search params
Parameters
Returns
IVF-Flat index
cuvsIvfFlatIndex
Struct to hold address of cuvs::neighbors::ivf_flat::index and its active trained dtype
Fields
cuvsIvfFlatIndexCreate
Allocate IVF-Flat index
Parameters
Returns
cuvsIvfFlatIndexDestroy
De-allocate IVF-Flat index
Parameters
Returns
cuvsIvfFlatIndexGetNLists
Get the number of clusters/inverted lists in the index
Parameters
Returns
cuvsIvfFlatIndexGetDim
Get the dimensionality of the indexed data
Parameters
Returns
cuvsIvfFlatIndexGetCenters
Get the cluster centers corresponding to the lists [n_lists, dim]
Parameters
Returns
IVF-Flat index build
cuvsIvfFlatBuild
Build a IVF-Flat index with a DLManagedTensor which has underlying
DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged, or kDLCPU. Also, acceptable underlying types are:
kDLDataType.code == kDLFloatandkDLDataType.bits = 32kDLDataType.code == kDLIntandkDLDataType.bits = 8kDLDataType.code == kDLUIntandkDLDataType.bits = 8
Parameters
Returns
IVF-Flat index search
cuvsIvfFlatSearch
Search a IVF-Flat index with a DLManagedTensor which has underlying
DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged. It is also important to note that the IVF-Flat Index must have been built with the same type of queries, such that index.dtype.code == queries.dl_tensor.dtype.code Types for input are:
queries:kDLDataType.code == kDLFloatandkDLDataType.bits = 32neighbors:kDLDataType.code == kDLUIntandkDLDataType.bits = 32distances:kDLDataType.code == kDLFloatandkDLDataType.bits = 32
Parameters
Returns
IVF-Flat C-API serialize functions
cuvsIvfFlatSerialize
Save the index to file.
Experimental, both the API and the serialization format are subject to change.
Parameters
Returns
cuvsIvfFlatDeserialize
Load index from file.
Experimental, both the API and the serialization format are subject to change.
Parameters
Returns
IVF-Flat index extend
cuvsIvfFlatExtend
Extend the index with the new data.
Parameters
Returns