Skip to content
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
11 changes: 7 additions & 4 deletions faiss/impl/mapped_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,15 @@ struct MmappedFileMappingOwner::PImpl {
#else

struct MmappedFileMappingOwner::PImpl {
PImpl(FILE* f) {
FAISS_THROW_FMT("Not implemented");
void* ptr = nullptr;
size_t ptr_size = 0;

PImpl(const std::string& filename) {
FAISS_THROW_MSG("Not implemented");
}

~PImpl() {
FAISS_THROW_FMT("Not implemented");
PImpl(FILE* f) {
FAISS_THROW_MSG("Not implemented");
}
};

Expand Down
5 changes: 5 additions & 0 deletions tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import io
import sys
import pickle
import platform
from multiprocessing.pool import ThreadPool
from common_faiss_tests import get_dataset_2

Expand Down Expand Up @@ -485,6 +486,10 @@ def test_reader(self):


class TestIOFlatMMap(unittest.TestCase):
@unittest.skipIf(
platform.system() not in ["Windows", "Linux"],
"supported OSes only"
)
def test_mmap(self):
xt, xb, xq = get_dataset_2(32, 0, 100, 50)
index = faiss.index_factory(32, "SQfp16", faiss.METRIC_L2)
Expand Down
Loading