Cagra

View as Markdown

Source header: cuvs/neighbors/cagra.h

cuvsCagraGraphBuildAlgo

Enum to denote which ANN algorithm is used to build CAGRA graph

1enum cuvsCagraGraphBuildAlgo { ... };

Values

NameValue
AUTO_SELECT0
IVF_PQ1

cuvsCagraHnswHeuristicType

A strategy for selecting the graph build parameters based on similar HNSW index

parameters.

Define how cuvsCagraIndexParamsFromHnswParams should construct a graph to construct a graph that is to be converted to (used by) a CPU HNSW index.

1enum cuvsCagraHnswHeuristicType { ... };

cuvsCagraCompressionParams

Parameters for VPQ compression.

1struct cuvsCagraCompressionParams { ... };

Fields

NameTypeDescription
pq_bitsuint32_tThe bit length of the vector element after compression by PQ. Possible values: [4, 5, 6, 7, 8]. Hint: the smaller the ‘pq_bits’, the smaller the index size and the better the search performance, but the lower the recall.
pq_dimuint32_tThe dimensionality of the vector after compression by PQ. When zero, an optimal value is selected using a heuristic. TODO: at the moment dim must be a multiple pq_dim.
vq_n_centersuint32_tVector Quantization (VQ) codebook size - number of “coarse cluster centers”. When zero, an optimal value is selected using a heuristic.
kmeans_n_itersuint32_tThe number of iterations searching for kmeans centers (both VQ & PQ phases).
vq_kmeans_trainset_fractiondoubleThe fraction of data to use during iterative kmeans building (VQ phase). When zero, an optimal value is selected using a heuristic.
pq_kmeans_trainset_fractiondoubleThe fraction of data to use during iterative kmeans building (PQ phase). When zero, an optimal value is selected using a heuristic.

cuvsAceParams

Parameters for ACE (Augmented Core Extraction) graph build.

ACE enables building indexes for datasets too large to fit in GPU memory by:

  1. Partitioning the dataset in core (closest) and augmented (second-closest) partitions using balanced k-means.
  2. Building sub-indexes for each partition independently
  3. Concatenating sub-graphs into a final unified index
1struct cuvsAceParams { ... };

Fields

NameTypeDescription
npartitionssize_tNumber of partitions for ACE (Augmented Core Extraction) partitioned build. When set to 0 (default), the number of partitions is automatically derived based on available host and GPU memory to maximize partition size while ensuring the build fits in memory. Small values might improve recall but potentially degrade performance and increase memory usage. Partitions should not be too small to prevent issues in KNN graph construction. The partition size is on average 2 * (n_rows / npartitions) * dim * sizeof(T). 2 is because of the core and augmented vectors. Please account for imbalance in the partition sizes (up to 3x in our tests). If the specified number of partitions results in partitions that exceed available memory, the value will be automatically increased to fit memory constraints and a warning will be issued.
ef_constructionsize_tThe index quality for the ACE build. Bigger values increase the index quality. At some point, increasing this will no longer improve the quality.
build_dirconst char*Directory to store ACE build artifacts (e.g., KNN graph, optimized graph). Used when use_disk is true or when the graph does not fit in host and GPU memory. This should be the fastest disk in the system and hold enough space for twice the dataset, final graph, and label mapping.
use_diskboolWhether to use disk-based storage for ACE build. When true, enables disk-based operations for memory-efficient graph construction.
max_host_memory_gbdoubleMaximum host memory to use for ACE build in GiB. When set to 0 (default), uses available host memory. When set to a positive value, limits host memory usage to the specified amount. Useful for testing or when running alongside other memory-intensive processes.
max_gpu_memory_gbdoubleMaximum GPU memory to use for ACE build in GiB. When set to 0 (default), uses available GPU memory. When set to a positive value, limits GPU memory usage to the specified amount. Useful for testing or when running alongside other memory-intensive processes.

cuvsCagraIndexParams

Supplemental parameters to build CAGRA Index

1struct cuvsCagraIndexParams { ... };

Fields

NameTypeDescription
metriccuvsDistanceTypeDistance type.
intermediate_graph_degreesize_tDegree of input graph for pruning.
graph_degreesize_tDegree of output graph.
build_algoenum cuvsCagraGraphBuildAlgoANN algorithm to build knn graph.
nn_descent_nitersize_tNumber of Iterations to run if building with NN_DESCENT
compressioncuvsCagraCompressionParams_tOptional: specify compression parameters if compression is desired. NOTE: this is experimental new API, consider it unsafe.
graph_build_paramsvoid*Optional: specify graph build params based on build_algo
- IVF_PQ: cuvsIvfPqParams_t
- ACE: cuvsAceParams_t
- Others: nullptr

cuvsCagraIndexParamsCreate

Allocate CAGRA Index params, and populate with default values

1CUVS_EXPORT cuvsError_t cuvsCagraIndexParamsCreate(cuvsCagraIndexParams_t* params);

Parameters

NameDirectionTypeDescription
paramsincuvsCagraIndexParams_t*cuvsCagraIndexParams_t to allocate

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraIndexParamsDestroy

De-allocate CAGRA Index params

1CUVS_EXPORT cuvsError_t cuvsCagraIndexParamsDestroy(cuvsCagraIndexParams_t params);

Parameters

NameDirectionTypeDescription
paramsincuvsCagraIndexParams_t

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraCompressionParamsCreate

Allocate CAGRA Compression params, and populate with default values

1CUVS_EXPORT cuvsError_t cuvsCagraCompressionParamsCreate(cuvsCagraCompressionParams_t* params);

Parameters

NameDirectionTypeDescription
paramsincuvsCagraCompressionParams_t*cuvsCagraCompressionParams_t to allocate

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraCompressionParamsDestroy

De-allocate CAGRA Compression params

1CUVS_EXPORT cuvsError_t cuvsCagraCompressionParamsDestroy(cuvsCagraCompressionParams_t params);

Parameters

NameDirectionTypeDescription
paramsincuvsCagraCompressionParams_t

Returns

CUVS_EXPORT cuvsError_t

cuvsAceParamsCreate

Allocate ACE params, and populate with default values

1CUVS_EXPORT cuvsError_t cuvsAceParamsCreate(cuvsAceParams_t* params);

Parameters

NameDirectionTypeDescription
paramsincuvsAceParams_t*cuvsAceParams_t to allocate

Returns

CUVS_EXPORT cuvsError_t

cuvsAceParamsDestroy

De-allocate ACE params

1CUVS_EXPORT cuvsError_t cuvsAceParamsDestroy(cuvsAceParams_t params);

Parameters

NameDirectionTypeDescription
paramsincuvsAceParams_t

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraIndexParamsFromHnswParams

Create CAGRA index parameters similar to an HNSW index

1CUVS_EXPORT cuvsError_t cuvsCagraIndexParamsFromHnswParams(cuvsCagraIndexParams_t params,
2int64_t n_rows,
3int64_t dim,
4int M,
5int ef_construction,
6enum cuvsCagraHnswHeuristicType heuristic,
7cuvsDistanceType metric);

This factory function creates CAGRA parameters that yield a graph compatible with an HNSW graph with the given parameters.

Parameters

NameDirectionTypeDescription
paramsoutcuvsCagraIndexParams_tThe CAGRA index params to populate
n_rowsinint64_tNumber of rows in the dataset
diminint64_tNumber of dimensions in the dataset
MinintHNSW index parameter M
ef_constructioninintHNSW index parameter ef_construction
heuristicinenum cuvsCagraHnswHeuristicTypeStrategy for parameter selection
metricincuvsDistanceTypeDistance metric to use

Returns

CUVS_EXPORT cuvsError_t

C API for CUDA ANN Graph-based nearest neighbor search

cuvsCagraExtendParams

Supplemental parameters to extend CAGRA Index

1struct cuvsCagraExtendParams { ... };

Fields

NameTypeDescription
max_chunk_sizeuint32_tThe additional dataset is divided into chunks and added to the graph. This is the knob to adjust the tradeoff between the recall and operation throughput. Large chunk sizes can result in high throughput, but use more working memory (O(max_chunk_size*degree^2)). This can also degrade recall because no edges are added between the nodes in the same chunk. Auto select when 0.

cuvsCagraExtendParamsCreate

Allocate CAGRA Extend params, and populate with default values

1CUVS_EXPORT cuvsError_t cuvsCagraExtendParamsCreate(cuvsCagraExtendParams_t* params);

Parameters

NameDirectionTypeDescription
paramsincuvsCagraExtendParams_t*cuvsCagraExtendParams_t to allocate

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraExtendParamsDestroy

De-allocate CAGRA Extend params

1CUVS_EXPORT cuvsError_t cuvsCagraExtendParamsDestroy(cuvsCagraExtendParams_t params);

Parameters

NameDirectionTypeDescription
paramsincuvsCagraExtendParams_t

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraExtend

Extend a CAGRA index with a DLManagedTensor which has underlying

1CUVS_EXPORT cuvsError_t cuvsCagraExtend(cuvsResources_t res,
2cuvsCagraExtendParams_t params,
3DLManagedTensor* additional_dataset,
4cuvsCagraIndex_t index);

DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged, or kDLCPU. Also, acceptable underlying types are:

  1. kDLDataType.code == kDLFloat and kDLDataType.bits = 32
  2. kDLDataType.code == kDLFloat and kDLDataType.bits = 16
  3. kDLDataType.code == kDLInt and kDLDataType.bits = 8
  4. kDLDataType.code == kDLUInt and kDLDataType.bits = 8

Parameters

NameDirectionTypeDescription
resincuvsResources_tcuvsResources_t opaque C handle
paramsincuvsCagraExtendParams_tcuvsCagraExtendParams_t used to extend CAGRA index
additional_datasetinDLManagedTensor*DLManagedTensor* additional dataset
indexin,outcuvsCagraIndex_tcuvsCagraIndex_t CAGRA index

Returns

CUVS_EXPORT cuvsError_t

C API for CUDA ANN Graph-based nearest neighbor search

cuvsCagraSearchAlgo

Enum to denote algorithm used to search CAGRA Index

1enum cuvsCagraSearchAlgo { ... };

Values

NameValue
SINGLE_CTA0
MULTI_CTA1
MULTI_KERNEL2
AUTO100

cuvsCagraHashMode

Enum to denote Hash Mode used while searching CAGRA index

1enum cuvsCagraHashMode { ... };

Values

NameValue
HASH0
SMALL1
AUTO_HASH100

cuvsCagraSearchParams

Supplemental parameters to search CAGRA index

1struct cuvsCagraSearchParams { ... };

Fields

NameTypeDescription
max_queriessize_tMaximum number of queries to search at the same time (batch size). Auto select when 0.
itopk_sizesize_tNumber of intermediate search results retained during the search. This is the main knob to adjust trade off between accuracy and search speed. Higher values improve the search accuracy.
max_iterationssize_tUpper limit of search iterations. Auto select when 0.
algoenum cuvsCagraSearchAlgoWhich search implementation to use.
team_sizesize_tNumber of threads used to calculate a single distance. 4, 8, 16, or 32.
search_widthsize_tNumber of graph nodes to select as the starting point for the search in each iteration. aka search width?
min_iterationssize_tLower limit of search iterations.
thread_block_sizesize_tThread block size. 0, 64, 128, 256, 512, 1024. Auto selection when 0.
hashmap_modeenum cuvsCagraHashModeHashmap type. Auto selection when AUTO.
hashmap_min_bitlensize_tLower limit of hashmap bit length. More than 8.
hashmap_max_fill_ratefloatUpper limit of hashmap fill rate. More than 0.1, less than 0.9.
num_random_samplingsuint32_tNumber of iterations of initial random seed node selection. 1 or more.
rand_xor_maskuint64_tBit mask used for initial random seed node selection.
persistentboolWhether to use the persistent version of the kernel (only SINGLE_CTA is supported a.t.m.)
persistent_lifetimefloatPersistent kernel: time in seconds before the kernel stops if no requests received.
persistent_device_usagefloatSet the fraction of maximum grid size used by persistent kernel. Value 1.0 means the kernel grid size is maximum possible for the selected device. The value must be greater than 0.0 and not greater than 1.0. One may need to run other kernels alongside this persistent kernel. This parameter can be used to reduce the grid size of the persistent kernel to leave a few SMs idle. Note: running any other work on GPU alongside with the persistent kernel makes the setup fragile.
- Running another kernel in another thread usually works, but no progress guaranteed
- Any CUDA allocations block the context (this issue may be obscured by using pools)
- Memory copies to not-pinned host memory may block the context Even when we know there are no other kernels working at the same time, setting kDeviceUsage to 1.0 surprisingly sometimes hurts performance. Proceed with care. If you suspect this is an issue, you can reduce this number to ~0.9 without a significant impact on the throughput.

cuvsCagraSearchParamsCreate

Allocate CAGRA search params, and populate with default values

1CUVS_EXPORT cuvsError_t cuvsCagraSearchParamsCreate(cuvsCagraSearchParams_t* params);

Parameters

NameDirectionTypeDescription
paramsincuvsCagraSearchParams_t*cuvsCagraSearchParams_t to allocate

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraSearchParamsDestroy

De-allocate CAGRA search params

1CUVS_EXPORT cuvsError_t cuvsCagraSearchParamsDestroy(cuvsCagraSearchParams_t params);

Parameters

NameDirectionTypeDescription
paramsincuvsCagraSearchParams_t

Returns

CUVS_EXPORT cuvsError_t

C API for CUDA ANN Graph-based nearest neighbor search

cuvsCagraIndex

Struct to hold address of cuvs::neighbors::cagra::index and its active trained dtype

1typedef struct { ... } cuvsCagraIndex;

Fields

NameTypeDescription
addruintptr_t
dtypeDLDataType

cuvsCagraIndexCreate

Allocate CAGRA index

1CUVS_EXPORT cuvsError_t cuvsCagraIndexCreate(cuvsCagraIndex_t* index);

Parameters

NameDirectionTypeDescription
indexincuvsCagraIndex_t*cuvsCagraIndex_t to allocate

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraIndexDestroy

De-allocate CAGRA index

1CUVS_EXPORT cuvsError_t cuvsCagraIndexDestroy(cuvsCagraIndex_t index);

Parameters

NameDirectionTypeDescription
indexincuvsCagraIndex_tcuvsCagraIndex_t to de-allocate

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraIndexGetDims

Get dimension of the CAGRA index

1CUVS_EXPORT cuvsError_t cuvsCagraIndexGetDims(cuvsCagraIndex_t index, int64_t* dim);

Parameters

NameDirectionTypeDescription
indexincuvsCagraIndex_tCAGRA index
dimoutint64_t*return dimension of the index

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraIndexGetSize

Get size of the CAGRA index

1CUVS_EXPORT cuvsError_t cuvsCagraIndexGetSize(cuvsCagraIndex_t index, int64_t* size);

Parameters

NameDirectionTypeDescription
indexincuvsCagraIndex_tCAGRA index
sizeoutint64_t*return number of vectors in the index

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraIndexGetGraphDegree

Get graph degree of the CAGRA index

1CUVS_EXPORT cuvsError_t cuvsCagraIndexGetGraphDegree(cuvsCagraIndex_t index, int64_t* graph_degree);

Parameters

NameDirectionTypeDescription
indexincuvsCagraIndex_tCAGRA index
graph_degreeoutint64_t*return graph degree

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraIndexGetDataset

Returns a view of the CAGRA dataset

1CUVS_EXPORT cuvsError_t cuvsCagraIndexGetDataset(cuvsCagraIndex_t index, DLManagedTensor* dataset);

This function returns a non-owning view of the CAGRA dataset. The output will be referencing device memory that is directly used in CAGRA, without copying the dataset at all. This means that the output is only valid as long as the CAGRA index is alive, and once cuvsCagraIndexDestroy is called on the cagra index - the returned dataset view will be invalid.

Note that the DLManagedTensor dataset returned will have an associated ‘deleter’ function that must be called when the dataset is no longer needed. This will free up host memory that stores the shape of the dataset view.

Parameters

NameDirectionTypeDescription
indexincuvsCagraIndex_tCAGRA index
datasetoutDLManagedTensor*the dataset used in cagra

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraIndexGetGraph

Returns a view of the CAGRA graph

1CUVS_EXPORT cuvsError_t cuvsCagraIndexGetGraph(cuvsCagraIndex_t index, DLManagedTensor* graph);

This function returns a non-owning view of the CAGRA graph. The output will be referencing device memory that is directly used in CAGRA, without copying the graph at all. This means that the output is only valid as long as the CAGRA index is alive, and once cuvsCagraIndexDestroy is called on the cagra index - the returned graph view will be invalid.

Note that the DLManagedTensor graph returned will have an associated ‘deleter’ function that must be called when the graph is no longer needed. This will free up host memory that stores the metadata for the graph view.

Parameters

NameDirectionTypeDescription
indexincuvsCagraIndex_tCAGRA index
graphoutDLManagedTensor*the output knn graph.

Returns

CUVS_EXPORT cuvsError_t

C API for CUDA ANN Graph-based nearest neighbor search

cuvsCagraBuild

Build a CAGRA index with a DLManagedTensor which has underlying

1CUVS_EXPORT cuvsError_t cuvsCagraBuild(cuvsResources_t res,
2cuvsCagraIndexParams_t params,
3DLManagedTensor* dataset,
4cuvsCagraIndex_t index);

DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged, or kDLCPU. Also, acceptable underlying types are:

  1. kDLDataType.code == kDLFloat and kDLDataType.bits = 32
  2. kDLDataType.code == kDLFloat and kDLDataType.bits = 16
  3. kDLDataType.code == kDLInt and kDLDataType.bits = 8
  4. kDLDataType.code == kDLUInt and kDLDataType.bits = 8

Parameters

NameDirectionTypeDescription
resincuvsResources_tcuvsResources_t opaque C handle
paramsincuvsCagraIndexParams_tcuvsCagraIndexParams_t used to build CAGRA index
datasetinDLManagedTensor*DLManagedTensor* training dataset
indexinoutcuvsCagraIndex_tcuvsCagraIndex_t Newly built CAGRA index. This index needs to be already created with cuvsCagraIndexCreate.

Returns

CUVS_EXPORT cuvsError_t

C API for CUDA ANN Graph-based nearest neighbor search

cuvsCagraSearch

Search a CAGRA index with a DLManagedTensor which has underlying

1CUVS_EXPORT cuvsError_t cuvsCagraSearch(cuvsResources_t res,
2cuvsCagraSearchParams_t params,
3cuvsCagraIndex_t index,
4DLManagedTensor* queries,
5DLManagedTensor* neighbors,
6DLManagedTensor* distances,
7cuvsFilter filter);

DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged. It is also important to note that the CAGRA 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:

  1. queries: a. kDLDataType.code == kDLFloat and kDLDataType.bits = 32 b. kDLDataType.code == kDLFloat and kDLDataType.bits = 16 c. kDLDataType.code == kDLInt and kDLDataType.bits = 8 d. kDLDataType.code == kDLUInt and kDLDataType.bits = 8
  2. neighbors: kDLDataType.code == kDLUInt and kDLDataType.bits = 32 or kDLDataType.code == kDLInt and kDLDataType.bits = 64
  3. distances: kDLDataType.code == kDLFloat and kDLDataType.bits = 32

Parameters

NameDirectionTypeDescription
resincuvsResources_tcuvsResources_t opaque C handle
paramsincuvsCagraSearchParams_tcuvsCagraSearchParams_t used to search CAGRA index
indexincuvsCagraIndex_tcuvsCagraIndex which has been returned by cuvsCagraBuild
queriesinDLManagedTensor*DLManagedTensor* queries dataset to search
neighborsoutDLManagedTensor*DLManagedTensor* output k neighbors for queries
distancesoutDLManagedTensor*DLManagedTensor* output k distances for queries
filterincuvsFiltercuvsFilter input filter that can be used to filter queries and neighbors based on the given bitset.

Returns

CUVS_EXPORT cuvsError_t

CAGRA C-API serialize functions

cuvsCagraSerialize

Save the index to file.

1CUVS_EXPORT cuvsError_t cuvsCagraSerialize(cuvsResources_t res,
2const char* filename,
3cuvsCagraIndex_t index,
4bool include_dataset);

Experimental, both the API and the serialization format are subject to change.

Parameters

NameDirectionTypeDescription
resincuvsResources_tcuvsResources_t opaque C handle
filenameinconst char*the file name for saving the index
indexincuvsCagraIndex_tCAGRA index
include_datasetinboolWhether or not to write out the dataset to the file.

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraSerializeToHnswlib

Save the CAGRA index to file in hnswlib format.

1CUVS_EXPORT cuvsError_t cuvsCagraSerializeToHnswlib(cuvsResources_t res,
2const char* filename,
3cuvsCagraIndex_t index);

NOTE: The saved index can only be read by the hnswlib wrapper in cuVS, as the serialization format is not compatible with the original hnswlib.

Experimental, both the API and the serialization format are subject to change.

Parameters

NameDirectionTypeDescription
resincuvsResources_tcuvsResources_t opaque C handle
filenameinconst char*the file name for saving the index
indexincuvsCagraIndex_tCAGRA index

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraDeserialize

Load index from file.

1CUVS_EXPORT cuvsError_t cuvsCagraDeserialize(cuvsResources_t res, const char* filename, cuvsCagraIndex_t index);

Experimental, both the API and the serialization format are subject to change.

Parameters

NameDirectionTypeDescription
resincuvsResources_tcuvsResources_t opaque C handle
filenameinconst char*the name of the file that stores the index
indexinoutcuvsCagraIndex_tcuvsCagraIndex_t CAGRA index loaded from disk. This index needs to be already created with cuvsCagraIndexCreate.

Returns

CUVS_EXPORT cuvsError_t

cuvsCagraIndexFromArgs

Load index from a dataset and graph

1CUVS_EXPORT cuvsError_t cuvsCagraIndexFromArgs(cuvsResources_t res,
2cuvsDistanceType metric,
3DLManagedTensor* graph,
4DLManagedTensor* dataset,
5cuvsCagraIndex_t index);

Parameters

NameDirectionTypeDescription
resincuvsResources_tcuvsResources_t opaque C handle
metricincuvsDistanceTypecuvsDistanceType to use in the index
graphinDLManagedTensor*the knn graph to use, shape (size, graph_degree)
datasetinDLManagedTensor*the dataset to use, shape (size, dim)
indexinoutcuvsCagraIndex_tcuvsCagraIndex_t CAGRA index populated with the graph and dataset. This index needs to be already created with cuvsCagraIndexCreate.

Returns

CUVS_EXPORT cuvsError_t

CAGRA C-API merge functions

cuvsCagraMerge

Merge multiple CAGRA indices into a single CAGRA index.

1CUVS_EXPORT cuvsError_t cuvsCagraMerge(cuvsResources_t res,
2cuvsCagraIndexParams_t params,
3cuvsCagraIndex_t* indices,
4size_t num_indices,
5cuvsFilter filter,
6cuvsCagraIndex_t output_index);

All input indices must have been built with the same data type (index.dtype) and have the same dimensionality (index.dims). The merged index uses the output parameters specified in cuvsCagraIndexParams.

Input indices must have:

  • index.dtype.code and index.dtype.bits matching across all indices.
  • Supported data types for indices: a. kDLFloat with bits = 32 b. kDLFloat with bits = 16 c. kDLInt with bits = 8 d. kDLUInt with bits = 8

The resulting output index will have the same data type as the input indices.

Example:

Parameters

NameDirectionTypeDescription
resincuvsResources_tcuvsResources_t opaque C handle
paramsincuvsCagraIndexParams_tcuvsCagraIndexParams_t parameters controlling merge behavior
indicesincuvsCagraIndex_t*Array of input cuvsCagraIndex_t handles to merge
num_indicesinsize_tNumber of input indices
filterincuvsFilterFilter that can be used to filter out vectors from the merged index
output_indexoutcuvsCagraIndex_tOutput handle that will store the merged index. Must be initialized using cuvsCagraIndexCreate before use.

Returns

CUVS_EXPORT cuvsError_t