Skip to content

Commit

Permalink
update kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
Intron7 committed Nov 4, 2024
1 parent b3b8b5d commit f2a6920
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/rapids_singlecell/preprocessing/_kernels/_bbknn.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,15 @@
top_k[min_index] = data[idx];
// Find the new smallest value in top_k and set min_index
for (int i = 1; i < trim; ++i) {
for (int i = 0; i < trim; ++i) {
if (top_k[i] < top_k[min_index]) {
min_index = i;
}
}
}
// After processing, find the smallest value in top_k, which is the kth largest
float kth_largest = top_k[0];
for (int i = 1; i < trim; ++i) {
if (top_k[i] < kth_largest) {
kth_largest = top_k[i];
}
}
float kth_largest = top_k[min_index];
vals[row] = kth_largest;
}
"""
Expand Down

0 comments on commit f2a6920

Please sign in to comment.