MCPcopy Create free account
hub / github.com/chen3feng/toft / DoFindFirst

Method DoFindFirst

container/bitmap.cpp:200–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200bool BitmapBase::DoFindFirst(WordType* words, size_t word_size, size_t* result)
201{
202 for (size_t i = 0; i < word_size; i++)
203 {
204 WordType thisword = words[i];
205 if (thisword != static_cast<WordType>(0))
206 {
207 *result = (i * kBitsPerWord
208 + __builtin_ctzl(thisword));
209 return true;
210 }
211 }
212 return false;
213}
214
215bool BitmapBase::DoFindNext(WordType* words, size_t word_size, size_t prev, size_t* result)
216{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected