Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rw0x0 committed Jan 14, 2025
1 parent 611f058 commit 599d06f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions iris-mpc-gpu/src/threshold_ring/cuda/kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,11 @@ extern "C" __global__ void collapse_u64_helper(U64 *inout_a, U64 *in_b,
extern "C" __global__ void collapse_sum_assign(U32 *inout_a, U32 *inout_b,
size_t n) {
size_t i = blockIdx.x * blockDim.x + threadIdx.x;
if (i == 1) {
if (i == 0) {
for (size_t j = 1; j < n; j++) {
inout_a[0] += inout_a[j];
}
} else if (i == 2) {
} else if (i == 1) {
for (size_t j = 1; j < n; j++) {
inout_b[0] += inout_b[j];
}
Expand All @@ -571,11 +571,11 @@ extern "C" __global__ void collapse_sum(U32 *inout_a, U32 *inout_b,
U32 *input_a, U32 *input_b,
size_t inout_index, size_t n) {
size_t i = blockIdx.x * blockDim.x + threadIdx.x;
if (i == 1) {
if (i == 0) {
for (size_t j = 0; j < n; j++) {
inout_a[inout_index] += input_a[j];
}
} else if (i == 2) {
} else if (i == 1) {
for (size_t j = 0; j < n; j++) {
inout_b[inout_index] += input_b[j];
}
Expand Down

0 comments on commit 599d06f

Please sign in to comment.