Skip to content

Commit

Permalink
Add manifest.in to include c files in the source.
Browse files Browse the repository at this point in the history
  • Loading branch information
datitran committed Nov 3, 2019
1 parent 153fae0 commit c399cce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include imagededup/handlers/search/builtin/builtin.h
include imagededup/handlers/search/builtin/README.md
include imagededup/handlers/search/brute_force_cython_ext.pyx
include LICENSE
include requirements.txt
4 changes: 2 additions & 2 deletions imagededup/handlers/search/brute_force_cython_ext.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ from libcpp.string cimport string

ctypedef unsigned long long ull

cdef extern from "builtin/builtin.h":
cdef extern from 'builtin/builtin.h':
int psnip_builtin_popcountll(unsigned long long) nogil

cdef vector[string] all_filenames
Expand All @@ -31,7 +31,7 @@ def query(ull query_hash_val, unsigned int maxdist):
dist = psnip_builtin_popcountll(hash_val ^ query_hash_val) # requires hash_val and query_hash_val to be integers
if dist <= maxdist:
filename = all_filenames[i]
matches.append((filename.decode("utf-8"), dist))
matches.append((filename.decode('utf-8'), dist))

return matches

Expand Down

0 comments on commit c399cce

Please sign in to comment.