From f6b00bdb32708f9c96ef3244ff764e3b6e65223d Mon Sep 17 00:00:00 2001 From: philsippl Date: Mon, 19 Aug 2024 12:03:12 +0000 Subject: [PATCH] use same matching policy in batch --- iris-mpc-gpu/src/dot/kernel.cu | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/iris-mpc-gpu/src/dot/kernel.cu b/iris-mpc-gpu/src/dot/kernel.cu index 201959cd7..e11e648c1 100644 --- a/iris-mpc-gpu/src/dot/kernel.cu +++ b/iris-mpc-gpu/src/dot/kernel.cu @@ -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); } @@ -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); - } } } }