mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-17 09:45:28 +03:00
multibit, fatbit: make _size build-time only
This commit makes mmbit_size() and fatbit_size compile-time only, and adds a resource limit for very large multibits.
This commit is contained in:
committed by
Matthew Barr
parent
8b7b06d2a4
commit
e271781d95
@@ -50,6 +50,15 @@ size_t hash_value(const mmbit_sparse_iter &iter) {
|
||||
|
||||
namespace ue2 {
|
||||
|
||||
/**
|
||||
* \brief Return the size in bytes of a multibit that can store the given
|
||||
* number of bits.
|
||||
*
|
||||
* This will throw a resource limit assertion if the requested mmbit is too
|
||||
* large.
|
||||
*/
|
||||
u32 mmbit_size(u32 total_bits);
|
||||
|
||||
/** \brief Construct a sparse iterator over the values in \a bits for a
|
||||
* multibit of size \a total_bits. */
|
||||
void mmbBuildSparseIterator(std::vector<mmbit_sparse_iter> &out,
|
||||
|
||||
Reference in New Issue
Block a user