FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

compare functions should always return false when equal · arrayfire/arrayfire@f834cad · GitHub

Repository navigation

Commit f834cad

Browse files
committed
compare functions should always return false when equal
1 parent a770a6b commit f834cad

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎test/gloh.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static bool feat_cmp(feat_desc_t i, feat_desc_t j) {
4646
if (round(i.f[k] * 1e1f) != round(j.f[k] * 1e1f))
4747
return (round(i.f[k] * 1e1f) < round(j.f[k] * 1e1f));
4848

49-
return true;
49+
return false;
5050
}
5151

5252
static void array_to_feat_desc(vector<feat_desc_t>& feat, float* x, float* y,

‎test/orb.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static bool feat_cmp(feat_desc_t i, feat_desc_t j) {
4545
for (int k = 0; k < 5; k++)
4646
if (i.f[k] != j.f[k]) return (i.f[k] < j.f[k]);
4747

48-
return true;
48+
return false;
4949
}
5050

5151
static void array_to_feat_desc(vector<feat_desc_t>& feat, float* x, float* y,

‎test/sift.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static bool feat_cmp(feat_desc_t i, feat_desc_t j) {
4646
if (round(i.f[k] * 1e1f) != round(j.f[k] * 1e1f))
4747
return (round(i.f[k] * 1e1f) < round(j.f[k] * 1e1f));
4848

49-
return true;
49+
return false;
5050
}
5151

5252
static void array_to_feat_desc(vector<feat_desc_t>& feat, float* x, float* y,

‎test/topk.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void topkTest(const int ndims, const dim_t* dims, const unsigned k,
121121
} else {
122122
stable_sort(kvPairs.begin(), kvPairs.end(),
123123
[](const KeyValuePair& lhs, const KeyValuePair& rhs) {
124-
return lhs.first >= rhs.first;
124+
return lhs.first > rhs.first;
125125
});
126126
}
127127

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL