Skip to content

Commit

Permalink
Remove remnants of memory-exploding bincount.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpwe committed Jul 29, 2017
1 parent 1b585d6 commit e64d933
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions audfprint_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,17 +252,12 @@ def _approx_match_counts(self, hits, ids, rawcounts):
mintime = np.amin(alltimes)
alltimes -= mintime
nresults = 0
# Hash IDs and times together, so only a single bincount
timebits = max(1, encpowerof2(np.amax(alltimes)))
#allbincounts = np.bincount((allids << timebits) + alltimes)
#log("len(allbincounts)=%d" % len(allbincounts))
min_time = 0
max_time = 0
for urank, (id, rawcount) in enumerate(zip(ids, rawcounts)):
# Make sure id is an int64 before shifting it up.
id = int(id)
# Select the subrange of bincounts corresponding to this id
#bincounts = allbincounts[(id << timebits):(((id+1)<<timebits)-1)]
bincounts = np.bincount(alltimes[allids==id])
still_looking = True
# Only consider legit local maxima in bincounts.
Expand Down

0 comments on commit e64d933

Please sign in to comment.