mirror of
https://github.com/facebookresearch/faiss.git
synced 2025-06-03 21:54:02 +08:00
Fix a placeholder for 'unimplemented' in mapped_io.cpp (#4268)
Summary: This should fix a problem on macos compilation (just compilation), as discussed in https://github.com/facebookresearch/faiss/pull/4250#issuecomment-2767317033 mnorris11 please verify Pull Request resolved: https://github.com/facebookresearch/faiss/pull/4268 Reviewed By: junjieqi Differential Revision: D72215145 Pulled By: mnorris11 fbshipit-source-id: ccac8aedacaef330dbdc18888d16f870d008df0f
This commit is contained in:
parent
0d3aff9066
commit
df9e2c48d6
@ -227,12 +227,15 @@ struct MmappedFileMappingOwner::PImpl {
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
struct MmappedFileMappingOwner::PImpl {
|
struct MmappedFileMappingOwner::PImpl {
|
||||||
PImpl(FILE* f) {
|
void* ptr = nullptr;
|
||||||
FAISS_THROW_FMT("Not implemented");
|
size_t ptr_size = 0;
|
||||||
|
|
||||||
|
PImpl(const std::string& filename) {
|
||||||
|
FAISS_THROW_MSG("Not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
~PImpl() {
|
PImpl(FILE* f) {
|
||||||
FAISS_THROW_FMT("Not implemented");
|
FAISS_THROW_MSG("Not implemented");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ import os
|
|||||||
import io
|
import io
|
||||||
import sys
|
import sys
|
||||||
import pickle
|
import pickle
|
||||||
|
import platform
|
||||||
from multiprocessing.pool import ThreadPool
|
from multiprocessing.pool import ThreadPool
|
||||||
from common_faiss_tests import get_dataset_2
|
from common_faiss_tests import get_dataset_2
|
||||||
|
|
||||||
@ -485,6 +486,10 @@ class TestIVFPQRead(unittest.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
class TestIOFlatMMap(unittest.TestCase):
|
class TestIOFlatMMap(unittest.TestCase):
|
||||||
|
@unittest.skipIf(
|
||||||
|
platform.system() not in ["Windows", "Linux"],
|
||||||
|
"supported OSes only"
|
||||||
|
)
|
||||||
def test_mmap(self):
|
def test_mmap(self):
|
||||||
xt, xb, xq = get_dataset_2(32, 0, 100, 50)
|
xt, xb, xq = get_dataset_2(32, 0, 100, 50)
|
||||||
index = faiss.index_factory(32, "SQfp16", faiss.METRIC_L2)
|
index = faiss.index_factory(32, "SQfp16", faiss.METRIC_L2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user