Closed FluorineDog closed 5 years ago
To speed up the sorting of seeds, aux->heaps
is used to split them into many small intervals. Seeds are fetched and added into aux->heaps for further use in push_kmer_match_kbm
. So, here the break
is correct.
As a matter of fact, the above code is equivalent to:
for(i=0;i<aux->refs->size;i++){
ref = ref_kbmrefv(aux->refs, i);
if(ref->boff < ref->bend){
hidx = ref->bidx / aux->bmcnt;
if(hidx - aux->bmoff < aux->nheap){
push_u4v(aux->heaps[hidx - aux->bmoff], i);
}
}
}
Is this transformation still correct?
Yes, the same.
Thank you for your kind clarification. Issus closed.
i am working on optimization of
map_kbm
, the largest hotspot in wtdbg2. but when analyzing the code, I found a strangebreak
:https://github.com/ruanjue/wtdbg2/blob/8908a3162362df842e540658a45222f764e629a7/kbm.h#L2156-L2165 is this
break
a bug, or just intended?