Brute Force
Source header: cuvs/neighbors/brute_force.h
Bruteforce index
cuvsBruteForceIndex
Struct to hold address of cuvs::neighbors::brute_force::index and its active trained dtype
Fields
cuvsBruteForceIndexCreate
Allocate BRUTEFORCE index
Parameters
Returns
cuvsBruteForceIndexDestroy
De-allocate BRUTEFORCE index
Parameters
Returns
Bruteforce index build
cuvsBruteForceBuild
Build a BRUTEFORCE 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 == kDLFloatandkDLDataType.bits = 16
Parameters
Returns
Bruteforce index search
cuvsBruteForceSearch
Search a BRUTEFORCE index with a DLManagedTensor which has underlying
DLDeviceType equal to kDLCUDA, kDLCUDAHost, kDLCUDAManaged. It is also important to note that the BRUTEFORCE 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 = 32orkDLDataType.bits = 16neighbors:kDLDataType.code == kDLUIntandkDLDataType.bits = 32distances:kDLDataType.code == kDLFloatandkDLDataType.bits = 32
Parameters
Returns
BRUTEFORCE C-API serialize functions
cuvsBruteForceSerialize
Save the index to file.
The serialization format can be subject to changes, therefore loading an index saved with a previous version of cuvs is not guaranteed to work.
Parameters
Returns
cuvsBruteForceDeserialize
Load index from file.
The serialization format can be subject to changes, therefore loading an index saved with a previous version of cuvs is not guaranteed to work.
Parameters
Returns