mirror of
https://github.com/facebookresearch/faiss.git
synced 2026-10-11 22:50:00 +00:00
Linter auto-fix.
Summary: `arc lint faiss/**/*` Reviewed By: LowikC Differential Revision: D22891305 fbshipit-source-id: 45bab7294ccccf70898b4967b03683894b6ae4c4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e1985c3005
commit
b539a73e58
@@ -209,7 +209,7 @@ void compute_centroids (size_t d, size_t k, size_t n,
|
||||
/** Handle empty clusters by splitting larger ones.
|
||||
*
|
||||
* It works by slightly changing the centroids to make 2 clusters from
|
||||
* a single one. Takes the same arguements as compute_centroids.
|
||||
* a single one. Takes the same arguments as compute_centroids.
|
||||
*
|
||||
* @return nb of spliting operations (larger is worse)
|
||||
*/
|
||||
|
||||
@@ -33,7 +33,7 @@ struct BinaryInvertedListScanner;
|
||||
* Otherwise the object is similar to the IndexIVF
|
||||
*/
|
||||
struct IndexBinaryIVF : IndexBinary {
|
||||
/// Acess to the actual data
|
||||
/// Access to the actual data
|
||||
InvertedLists *invlists;
|
||||
bool own_invlists;
|
||||
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ struct InvertedListScanner;
|
||||
* the distance estimation from the query to databse vectors.
|
||||
*/
|
||||
struct IndexIVF: Index, Level1Quantizer {
|
||||
/// Acess to the actual data
|
||||
/// Access to the actual data
|
||||
InvertedLists *invlists;
|
||||
bool own_invlists;
|
||||
|
||||
|
||||
+1
-1
@@ -835,7 +835,7 @@ struct MinSumK {
|
||||
x += ldx;
|
||||
}
|
||||
|
||||
{ // intial result: take min for all elements
|
||||
{ // initial result: take min for all elements
|
||||
T sum = 0;
|
||||
terms[0] = 0;
|
||||
mark_seen (0);
|
||||
|
||||
@@ -59,7 +59,7 @@ void runDistance(bool computeL2,
|
||||
|
||||
auto defaultStream = res->getDefaultStreamCurrentDevice();
|
||||
|
||||
// If we're quering against a 0 sized set, just return empty results
|
||||
// If we're querying against a 0 sized set, just return empty results
|
||||
if (centroids.numElements() == 0) {
|
||||
thrust::fill(thrust::cuda::par.on(defaultStream),
|
||||
outDistances.data(), outDistances.end(),
|
||||
|
||||
@@ -101,7 +101,7 @@ struct RandomGenerator;
|
||||
const SimulatedAnnealingParameters &p);
|
||||
RandomGenerator *rnd;
|
||||
|
||||
/// remember intial cost of optimization
|
||||
/// remember initial cost of optimization
|
||||
double init_cost;
|
||||
|
||||
// main entry point. Perform the optimization loop, starting from
|
||||
|
||||
@@ -182,7 +182,7 @@ class TestClustering(unittest.TestCase):
|
||||
km2 = faiss.Kmeans(d, k, niter=4)
|
||||
km2.train(xt, init_centroids=km.centroids)
|
||||
|
||||
# check that the intial objective is better for km2 than km
|
||||
# check that the initial objective is better for km2 than km
|
||||
self.assertGreater(km.obj[0], km2.obj[0] * 1.01)
|
||||
|
||||
def test_stats(self):
|
||||
|
||||
@@ -39,7 +39,7 @@ int main() {
|
||||
int m = 8; // bytes per vector
|
||||
faiss::IndexFlatL2 quantizer(d); // the other index
|
||||
faiss::IndexIVFPQ index(&quantizer, d, nlist, m, 8);
|
||||
|
||||
|
||||
index.train(nb, xb);
|
||||
index.add(nb, xb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user