Skip to content

Commit

Permalink
Tentative fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
beauby committed Jun 13, 2019
1 parent 911dfbb commit 2f6339b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Index.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct DistanceComputer;
* database-to-database queries are not implemented.
*/
struct Index {
using idx_t = long; ///< all indices are this type
using idx_t = int64_t; ///< all indices are this type
using component_t = float;
using distance_t = float;

Expand Down
4 changes: 2 additions & 2 deletions utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1227,8 +1227,8 @@ size_t merge_result_table_with (size_t n, size_t k,



size_t ranklist_intersection_size (size_t k1, const Index::idx_t *v1,
size_t k2, const Index::idx_t *v2_in)
size_t ranklist_intersection_size (size_t k1, const int64_t *v1,
size_t k2, const int64_t *v2_in)
{
if (k2 > k1) return ranklist_intersection_size (k2, v2_in, k1, v1);
int64_t *v2 = new int64_t [k2];
Expand Down
5 changes: 2 additions & 3 deletions utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include <random>
#include <stdint.h>

#include "Index.h"
#include "Heap.h"


Expand Down Expand Up @@ -335,8 +334,8 @@ void ranklist_handle_ties (int k, int64_t *idx, const float *dis);
/** count the number of comon elements between v1 and v2
* algorithm = sorting + bissection to avoid double-counting duplicates
*/
size_t ranklist_intersection_size (size_t k1, const Index::idx_t *v1,
size_t k2, const Index::idx_t *v2);
size_t ranklist_intersection_size (size_t k1, const int64_t *v1,
size_t k2, const int64_t *v2);

/** merge a result table into another one
*
Expand Down

1 comment on commit 2f6339b

@mdouze
Copy link
Contributor

@mdouze mdouze commented on 2f6339b Jun 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Please sign in to comment.