Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does pyflann support multithreads? #9

Open
mathmax12 opened this issue Aug 9, 2018 · 2 comments
Open

Does pyflann support multithreads? #9

mathmax12 opened this issue Aug 9, 2018 · 2 comments

Comments

@mathmax12
Copy link

Does pyflann support multithreads?
If yes how?

Thanks.

@tim-hilt
Copy link

I installed it and ran the following:

from pyflann import *
import numpy as np

dataset = np.random.rand(100000, 128)  # Changed to 1million elements
testset = np.random.rand(1000, 128)

flann = FLANN()
result, dists = flann.nn(
    dataset, testset, 5, algorithm="kmeans", branching=32, iterations=7, checks=16)
print result
print dists

I only saw a single active thread when running the query.

FLANN is capable of multithreading as per the user manual.

Is there some way i can get multithreading to run from within python?

@abst0603
Copy link

According to documentation of flann, you sould set "cores" variable in "searchparams" to run it on multiple cores.
"searchparams" is not accepted in any python function as an input. Thus I suppose that python does not support multiprocessing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants