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
op-hunter 2020-10-15 20:43:25 +08:00 committed by GitHub
parent 3596d07e74
commit e2f63c9bd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -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;
}
}