Skip to content

Commit 6218111

Browse files
chasingeggfacebook-github-bot
authored andcommitted
Fix some typos (facebookresearch#3056)
Summary: Pull Request resolved: facebookresearch#3056 Reviewed By: pemazare Differential Revision: D49617607 Pulled By: mlomeli1 fbshipit-source-id: b2d5df67e88e029882e697597af9f3fc8fe1e64c
1 parent d85601d commit 6218111

12 files changed

+13
-13
lines changed

benchs/bench_6bit_codec.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ static void bench(benchmark::State& state) {
7676
}
7777
}
7878
// I think maybe n and d should be input arguments
79-
// for thigns to really make sense, idk.
79+
// for things to really make sense, idk.
8080
BENCHMARK(bench)->Iterations(20);
8181
BENCHMARK_MAIN();

c_api/Index_c.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ int faiss_Index_search(
115115
idx_t* labels);
116116

117117
/**
118-
* query n vectors of dimension d with seach parameters to the index.
118+
* query n vectors of dimension d with search parameters to the index.
119119
*
120120
* return at most k vectors. If there are not enough results for a query,
121121
* the result is padded with -1s.

demos/demo_imi_flat.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ int main() {
4343
//
4444
// We here assume that its lifespan of this coarse quantizer will cover the
4545
// lifespan of the inverted-file quantizer IndexIVFFlat below
46-
// With dynamic allocation, one may give the responsability to free the
46+
// With dynamic allocation, one may give the responsibility to free the
4747
// quantizer to the inverted-file index (with attribute do_delete_quantizer)
4848
//
4949
// Note: a regular clustering algorithm would be defined as:

demos/demo_imi_pq.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ int main() {
4444
//
4545
// We here assume that its lifespan of this coarse quantizer will cover the
4646
// lifespan of the inverted-file quantizer IndexIVFFlat below
47-
// With dynamic allocation, one may give the responsability to free the
47+
// With dynamic allocation, one may give the responsibility to free the
4848
// quantizer to the inverted-file index (with attribute do_delete_quantizer)
4949
//
5050
// Note: a regular clustering algorithm would be defined as:

faiss/IndexIVF.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ void IndexIVF::search(
376376
indexIVF_stats.add(stats[slice]);
377377
}
378378
} else {
379-
// handle paralellization at level below (or don't run in parallel at
379+
// handle parallelization at level below (or don't run in parallel at
380380
// all)
381381
sub_search_func(n, x, distances, labels, &indexIVF_stats);
382382
}

faiss/IndexShards.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ void IndexShardsTemplate<IndexT>::add_with_ids(
147147
"request them to be shifted");
148148
FAISS_THROW_IF_NOT_MSG(
149149
this->ntotal == 0,
150-
"when adding to IndexShards with sucessive_ids, "
150+
"when adding to IndexShards with successive_ids, "
151151
"only add() in a single pass is supported");
152152
}
153153

faiss/IndexShardsIVF.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void IndexShardsIVF::add_with_ids(
111111
"request them to be shifted");
112112
FAISS_THROW_IF_NOT_MSG(
113113
this->ntotal == 0,
114-
"when adding to IndexShards with sucessive_ids, "
114+
"when adding to IndexShards with successive_ids, "
115115
"only add() in a single pass is supported");
116116
}
117117

faiss/impl/ProductQuantizer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ void ProductQuantizer::compute_codes(const float* x, uint8_t* codes, size_t n)
405405
for (int64_t i = 0; i < n; i++)
406406
compute_code(x + i * d, codes + i * code_size);
407407

408-
} else { // worthwile to use BLAS
408+
} else { // worthwhile to use BLAS
409409
float* dis_tables = new float[n * ksub * M];
410410
ScopeDeleter<float> del(dis_tables);
411411
compute_distance_tables(n, x, dis_tables);

faiss/impl/ProductQuantizer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ struct ProductQuantizer : Quantizer {
3535
enum train_type_t {
3636
Train_default,
3737
Train_hot_start, ///< the centroids are already initialized
38-
Train_shared, ///< share dictionary accross PQ segments
38+
Train_shared, ///< share dictionary across PQ segments
3939
Train_hypercube, ///< initialize centroids with nbits-D hypercube
4040
Train_hypercube_pca, ///< initialize centroids with nbits-D hypercube
4141
};

faiss/utils/partitioning.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ static const simd32uint8 shifts = simd32uint8::create<
882882
// 2-bit accumulator: we can add only up to 3 elements
883883
// on output we return 2*4-bit results
884884
// preproc returns either an index in 0..7 or 0xffff
885-
// that yeilds a 0 when used in the table look-up
885+
// that yields a 0 when used in the table look-up
886886
template <int N, class Preproc>
887887
void compute_accu2(
888888
const uint16_t*& data,

faiss/utils/utils.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@ void bincode_hist(size_t n, size_t nbits, const uint8_t* codes, int* hist) {
430430
}
431431
}
432432

433-
uint64_t ivec_checksum(size_t n, const int32_t* asigned) {
434-
const uint32_t* a = reinterpret_cast<const uint32_t*>(asigned);
433+
uint64_t ivec_checksum(size_t n, const int32_t* assigned) {
434+
const uint32_t* a = reinterpret_cast<const uint32_t*>(assigned);
435435
uint64_t cs = 112909;
436436
while (n--) {
437437
cs = cs * 65713 + a[n] * 1686049;

tests/test_io.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def do_write_callback(self, bsz):
8080
faiss.vector_to_array(index2.codes)
8181
)
8282

83-
# This is not a callable function: shoudl raise an exception
83+
# This is not a callable function: should raise an exception
8484
writer = faiss.PyCallbackIOWriter("blabla")
8585
self.assertRaises(
8686
Exception,

0 commit comments

Comments
 (0)