mirror of https://github.com/milvus-io/milvus.git
withdraw pr 2467, which is a failure optimization of k-selection (#3999)
Signed-off-by: cmli <chengming.li@zilliz.com> Co-authored-by: cmli <chengming.li@zilliz.com>pull/4011/head
parent
3596d07e74
commit
e2f63c9bd1
|
@ -124,8 +124,16 @@ struct BlockSelect {
|
|||
|
||||
__device__ inline void addThreadQ(K k, V v) {
|
||||
if (Dir ? Comp::gt(k, warpKTop) : Comp::lt(k, warpKTop)) {
|
||||
threadK[numVals] = k;
|
||||
threadV[numVals ++] = v;
|
||||
// Rotate right
|
||||
#pragma unroll
|
||||
for (int i = NumThreadQ - 1; i > 0; --i) {
|
||||
threadK[i] = threadK[i - 1];
|
||||
threadV[i] = threadV[i - 1];
|
||||
}
|
||||
|
||||
threadK[0] = k;
|
||||
threadV[0] = v;
|
||||
++numVals;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue