Go package: brute_force
Sources: go/brute_force
Types
BruteForceIndex
Brute Force KNN Index
Source: go/brute_force/brute_force.go:14
Functions
BuildIndex
Builds a new Brute Force KNN Index from the dataset for efficient search.
Arguments
- Resources - Resources to use
- Dataset - A row-major matrix on either the host or device to index
- metric - Distance type to use for building the index
- metric_arg - Value of p for Minkowski distances - set to 2.0 if not applicable
Source: go/brute_force/brute_force.go:48
CreateIndex
Creates a new empty Brute Force KNN Index
Source: go/brute_force/brute_force.go:20
SearchIndex
Perform a Nearest Neighbors search on the Index
Arguments
- Resources - Resources to use
- queries - Tensor in device memory to query for
- neighbors - Tensor in device memory that receives the indices of the nearest neighbors
- distances - Tensor in device memory that receives the distances of the nearest neighbors
Source: go/brute_force/brute_force.go:72
Methods
BruteForceIndex.Close
Destroys the Brute Force KNN Index
Source: go/brute_force/brute_force.go:32