Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix several typos in code detected by lintian #3861

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion faiss/AutoTune.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ struct OperatingPoint {
double perf; ///< performance measure (output of a Criterion)
double t; ///< corresponding execution time (ms)
std::string key; ///< key that identifies this op pt
int64_t cno; ///< integer identifer
int64_t cno; ///< integer identifier
};

struct OperatingPoints {
Expand Down
2 changes: 1 addition & 1 deletion faiss/IndexBinaryHNSW.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace faiss {
struct IndexBinaryHNSW : IndexBinary {
typedef HNSW::storage_idx_t storage_idx_t;

// the link strcuture
// the link structure
HNSW hnsw;

// the sequential storage
Expand Down
2 changes: 1 addition & 1 deletion faiss/IndexIVF.h
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ struct InvertedListScanner {
virtual float distance_to_code(const uint8_t* code) const = 0;

/** scan a set of codes, compute distances to current query and
* update heap of results if necessary. Default implemetation
* update heap of results if necessary. Default implementation
* calls distance_to_code.
*
* @param n number of codes to scan
Expand Down
2 changes: 1 addition & 1 deletion faiss/IndexIVFFastScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ void IndexIVFFastScan::range_search_dispatch_implem(
search_implem_10(
n, x, *handler.get(), cq, &ndis, &nlist_visited, scaler);
} else {
FAISS_THROW_FMT("Range search implem %d not impemented", impl);
FAISS_THROW_FMT("Range search implem %d not implemented", impl);
}
} else {
// explicitly slice over threads
Expand Down
2 changes: 1 addition & 1 deletion faiss/IndexNNDescent.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct IndexNNDescent : Index {

/// Faiss results are 64-bit

// the link strcuture
// the link structure
NNDescent nndescent;

// the sequential storage
Expand Down
2 changes: 1 addition & 1 deletion faiss/IndexNSG.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace faiss {
* link structure built on top */

struct IndexNSG : Index {
/// the link strcuture
/// the link structure
NSG nsg;

/// the sequential storage
Expand Down
2 changes: 1 addition & 1 deletion faiss/IndexPreTransform.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct SearchParametersPreTransform : SearchParameters {
/** Index that applies a LinearTransform transform on vectors before
* handing them over to a sub-index */
struct IndexPreTransform : Index {
std::vector<VectorTransform*> chain; ///! chain of tranforms
std::vector<VectorTransform*> chain; ///! chain of transforms
Index* index; ///! the sub-index

bool own_fields; ///! whether pointers are deleted in destructor
Expand Down
2 changes: 1 addition & 1 deletion faiss/impl/AuxIndexStructures.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ struct RangeSearchPartialResult : BufferList {
void copy_result(bool incremental = false);

/// merge a set of PartialResult's into one RangeSearchResult
/// on ouptut the partialresults are empty!
/// on output the partialresults are empty!
static void merge(
std::vector<RangeSearchPartialResult*>& partial_results,
bool do_delete = true);
Expand Down
2 changes: 1 addition & 1 deletion faiss/impl/pq4_fast_scan_search_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void pq4_accumulate_loop(
SIMDResultHandler& res,
const NormTableScaler* scaler) {
Run_pq4_accumulate_loop consumer;
dispatch_SIMDResultHanlder(
dispatch_SIMDResultHandler(
res, consumer, nq, nb, bbs, nsq, codes, LUT, scaler);
}

Expand Down
2 changes: 1 addition & 1 deletion faiss/impl/pq4_fast_scan_search_qbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ void pq4_accumulate_loop_qbs(
SIMDResultHandler& res,
const NormTableScaler* scaler) {
Run_pq4_accumulate_loop_qbs consumer;
dispatch_SIMDResultHanlder(res, consumer, qbs, nb, nsq, codes, LUT, scaler);
dispatch_SIMDResultHandler(res, consumer, qbs, nb, nsq, codes, LUT, scaler);
}

/***************************************************************
Expand Down
2 changes: 1 addition & 1 deletion faiss/impl/residual_quantizer_encode_steps.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace faiss {
* It allows low-level access to the encoding function, exposed mainly for unit
* tests.
*
* @param n number of vectors to hanlde
* @param n number of vectors to handle
* @param residuals vectors to encode, size (n, beam_size, d)
* @param cent centroids, size (K, d)
* @param beam_size input beam size
Expand Down
20 changes: 10 additions & 10 deletions faiss/impl/simd_result_handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ struct ReservoirHandler : ResultHandlerCompare<C, with_id_map> {
}
};

/** Result hanlder for range search. The difficulty is that the range distances
/** Result handler for range search. The difficulty is that the range distances
* have to be scaled using the scaler.
*/

Expand Down Expand Up @@ -713,7 +713,7 @@ struct PartialRangeHandler : RangeHandler<C, with_id_map> {
*/

template <class C, bool W, class Consumer, class... Types>
void dispatch_SIMDResultHanlder_fixedCW(
void dispatch_SIMDResultHandler_fixedCW(
SIMDResultHandler& res,
Consumer& consumer,
Types... args) {
Expand All @@ -733,19 +733,19 @@ void dispatch_SIMDResultHanlder_fixedCW(
}

template <class C, class Consumer, class... Types>
void dispatch_SIMDResultHanlder_fixedC(
void dispatch_SIMDResultHandler_fixedC(
SIMDResultHandler& res,
Consumer& consumer,
Types... args) {
if (res.with_fields) {
dispatch_SIMDResultHanlder_fixedCW<C, true>(res, consumer, args...);
dispatch_SIMDResultHandler_fixedCW<C, true>(res, consumer, args...);
} else {
dispatch_SIMDResultHanlder_fixedCW<C, false>(res, consumer, args...);
dispatch_SIMDResultHandler_fixedCW<C, false>(res, consumer, args...);
}
}

template <class Consumer, class... Types>
void dispatch_SIMDResultHanlder(
void dispatch_SIMDResultHandler(
SIMDResultHandler& res,
Consumer& consumer,
Types... args) {
Expand All @@ -763,18 +763,18 @@ void dispatch_SIMDResultHanlder(
}
} else if (res.sizeof_ids == sizeof(int)) {
if (res.is_CMax) {
dispatch_SIMDResultHanlder_fixedC<CMax<uint16_t, int>>(
dispatch_SIMDResultHandler_fixedC<CMax<uint16_t, int>>(
res, consumer, args...);
} else {
dispatch_SIMDResultHanlder_fixedC<CMin<uint16_t, int>>(
dispatch_SIMDResultHandler_fixedC<CMin<uint16_t, int>>(
res, consumer, args...);
}
} else if (res.sizeof_ids == sizeof(int64_t)) {
if (res.is_CMax) {
dispatch_SIMDResultHanlder_fixedC<CMax<uint16_t, int64_t>>(
dispatch_SIMDResultHandler_fixedC<CMax<uint16_t, int64_t>>(
res, consumer, args...);
} else {
dispatch_SIMDResultHanlder_fixedC<CMin<uint16_t, int64_t>>(
dispatch_SIMDResultHandler_fixedC<CMin<uint16_t, int64_t>>(
res, consumer, args...);
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion faiss/invlists/BlockInvertedLists.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ void BlockInvertedLists::update_entries(
size_t,
const idx_t*,
const uint8_t*) {
FAISS_THROW_MSG("not impemented");
FAISS_THROW_MSG("not implemented");
}

BlockInvertedLists::~BlockInvertedLists() {
Expand Down
10 changes: 5 additions & 5 deletions faiss/utils/distances.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ FAISS_API extern int distance_compute_blas_database_bs;
// rather than a heap
FAISS_API extern int distance_compute_min_k_reservoir;

/** Return the k nearest neighors of each of the nx vectors x among the ny
/** Return the k nearest neighbors of each of the nx vectors x among the ny
* vector y, w.r.t to max inner product.
*
* @param x query vectors, size nx * d
Expand All @@ -301,7 +301,7 @@ void knn_inner_product(
float_minheap_array_t* res,
const IDSelector* sel = nullptr);

/** Return the k nearest neighors of each of the nx vectors x among the ny
/** Return the k nearest neighbors of each of the nx vectors x among the ny
* vector y, for the inner product metric.
*
* @param x query vectors, size nx * d
Expand All @@ -320,7 +320,7 @@ void knn_inner_product(
int64_t* indexes,
const IDSelector* sel = nullptr);

/** Return the k nearest neighors of each of the nx vectors x among the ny
/** Return the k nearest neighbors of each of the nx vectors x among the ny
* vector y, for the L2 distance
* @param x query vectors, size nx * d
* @param y database vectors, size ny * d
Expand All @@ -338,7 +338,7 @@ void knn_L2sqr(
const float* y_norm2 = nullptr,
const IDSelector* sel = nullptr);

/** Return the k nearest neighors of each of the nx vectors x among the ny
/** Return the k nearest neighbors of each of the nx vectors x among the ny
* vector y, for the L2 distance
*
* @param x query vectors, size nx * d
Expand Down Expand Up @@ -413,7 +413,7 @@ void knn_L2sqr_by_idx(
/// Forward declaration, see AuxIndexStructures.h
struct RangeSearchResult;

/** Return the k nearest neighors of each of the nx vectors x among the ny
/** Return the k nearest neighbors of each of the nx vectors x among the ny
* vector y, w.r.t to max inner product
*
* @param x query vectors, size nx * d
Expand Down
2 changes: 1 addition & 1 deletion faiss/utils/hamming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ void fvec2bitvec(const float* __restrict x, uint8_t* __restrict b, size_t d) {
}

/* Same but for n vectors.
Ensure that the ouptut b is byte-aligned (pad with 0s). */
Ensure that the output b is byte-aligned (pad with 0s). */
void fvecs2bitvecs(
const float* __restrict x,
uint8_t* __restrict b,
Expand Down
Loading