Skip to content
Closed
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
10 changes: 3 additions & 7 deletions faiss/utils/simdlib_neon.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,10 @@ static inline std::string elements_to_string(const char* fmt, const S& simd) {
for (size_t i = 0; i < N; ++i) {
int bytesWritten =
snprintf(ptr, sizeof(res) - (ptr - res), fmt, bytes[i]);
if (bytesWritten >= 0) {
ptr += bytesWritten;
} else {
break;
}
ptr += bytesWritten;
}
// strip last ,

// The format usually contains a ',' separator so this is to remove the last
// separator.
ptr[-1] = 0;
return std::string(res);
}
Expand Down