struct PyCallbackIOWriter : public faiss::IOWriter
Copyright (c) Facebook, Inc. and its affiliates.
This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree.
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
virtual int fileno()
- explicit PyCallbackIOWriter(PyObject *callback, size_t bs = 1024 * 1024)