File python_callbacks.h
-
struct PyCallbackIOWriter : public faiss::IOWriter
Public Functions
-
explicit PyCallbackIOWriter(PyObject *callback, size_t bs = 1024 * 1024)
Callback: Python function that takes a bytes object and returns the number of bytes successfully written.
-
virtual size_t operator()(const void *ptrv, size_t size, size_t nitems) override
-
~PyCallbackIOWriter() override
-
explicit PyCallbackIOWriter(PyObject *callback, size_t bs = 1024 * 1024)