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
2 changes: 1 addition & 1 deletion demos/demo_sift1M.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*****************************************************/

float* fvecs_read(const char* fname, size_t* d_out, size_t* n_out) {
FILE* f = fopen(fname, "r");
FILE* f = fopen(fname, "rb");
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review: The demo treats .fvecs/.ivecs files as fixed-width binary records, so rb avoids platform text-mode translation before the size and fread assertions run.

if (!f) {
fprintf(stderr, "could not open %s\n", fname);
perror("");
Expand Down
Loading