Brute Force Package
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 useDataset- A row-major matrix on either the host or device to indexmetric- Distance type to use for building the indexmetric_arg- Value ofpfor 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 usequeries- Tensor in device memory to query forneighbors- Tensor in device memory that receives the indices of the nearest neighborsdistances- 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