Replace finite() with std::isfinite(). (#1341)

Summary: Pull Request resolved: https://github.com/facebookresearch/faiss/pull/1341

Test Plan: Imported from OSS

Reviewed By: mdouze

Differential Revision: D23234968

Pulled By: beauby

fbshipit-source-id: f7ba7bd473e05f2ba4d0ca555bc78965f5aa3fd1
This commit is contained in:
Lucas Hosseini
2020-08-20 10:45:27 -07:00
committed by Facebook GitHub Bot
parent 7b615ed5d9
commit 7cc320e438
+1 -1
View File
@@ -289,7 +289,7 @@ void Clustering::train_encoded (idx_t nx, const uint8_t *x_in,
// reports.
const float *x = reinterpret_cast<const float *>(x_in);
for (size_t i = 0; i < nx * d; i++) {
FAISS_THROW_IF_NOT_MSG (finite (x[i]),
FAISS_THROW_IF_NOT_MSG (std::isfinite (x[i]),
"input contains NaN's or Inf's");
}
}