corelib/include/ebcl/inline/HashIndex.hh

30 lines
684 B
C++
Raw Normal View History

/******************************************************************************/
/* HASH INDEX - INLINE CODE ***************************************************/
/******************************************************************************/
#pragma once
#include <lw/lib/HashIndex.hh>
namespace lw {
/*= T_HashIndex ==============================================================*/
inline T_HashIndex::~T_HashIndex( )
{
free( );
}
inline uint32_t T_HashIndex::first( uint32_t key ) const
{
return hash_[ key & hashMask_ & lookupMask_ ];
}
inline uint32_t T_HashIndex::next( uint32_t index ) const
{
assert( index < indexSize_ );
return index_[ index & lookupMask_ ];
}
}