Skip to content
Permalink
Browse files

release GIL

  • Loading branch information...
aaalgo committed Jul 11, 2016
1 parent 9dc036d commit 562efa678c3ce008dd94bc835a27072713b56e12
Showing with 2 additions and 0 deletions.
  1. +2 −0 python/pykgraph.cpp
@@ -290,6 +290,7 @@ namespace {
npy_intp dims[] = {qmatrix.size(), params.K};
PyObject *result = PyArray_SimpleNew(2, dims, NPY_UINT32);
PyObject *distance = PyArray_SimpleNew(2, dims, NPY_FLOAT);
Py_BEGIN_ALLOW_THREADS
kgraph::MatrixProxy<unsigned, 1> rmatrix(reinterpret_cast<PyArrayObject *>(result));
kgraph::MatrixProxy<float, 1> distmatrix(reinterpret_cast<PyArrayObject *>(distance));
#ifdef _OPENMP
@@ -328,6 +329,7 @@ namespace {
}
}
}
Py_END_ALLOW_THREADS

if (params.withDistance) {
PyObject* tup = PyTuple_New(2);

0 comments on commit 562efa6

Please sign in to comment.
You can’t perform that action at this time.