Skip to content

Commit

Permalink
use same matching policy in batch
Browse files Browse the repository at this point in the history
  • Loading branch information
philsippl committed Aug 19, 2024
1 parent 5c46395 commit f6b00bd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions iris-mpc-gpu/src/dot/kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ extern "C" __global__ void mergeDbResults(unsigned long long *matchResultsLeft,
if (queryIdx >= queryLength || dbIdx >= dbLength)
continue;

// Current *AND* policy: only match, if both eyes match
// Current *AND* policy: only match if both eyes match
if (matchLeft && matchRight)
atomicMin(&finalResults[queryIdx], dbIdx);
}
Expand Down Expand Up @@ -98,10 +98,9 @@ extern "C" __global__ void mergeBatchResults(unsigned long long *matchResultsSel
bool matchLeft = (matchResultsSelfLeft[idx] & (1ULL << i));
bool matchRight = (matchResultsSelfRight[idx] & (1ULL << i));

if (matchLeft || matchRight)
{
// Current *AND* policy: only match if both eyes match
if (matchLeft && matchRight)
atomicMin(&finalResults[queryIdx], UINT_MAX - 1);
}
}
}
}

0 comments on commit f6b00bd

Please sign in to comment.