Template the vector type in RangeTable
This commit is contained in:
parent
66af3d260c
commit
c3756f6b58
@ -33,10 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "shared_memory_vector_wrapper.hpp"
|
#include "shared_memory_vector_wrapper.hpp"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <vector>
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <stxxl/vector>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These pre-declarations are needed because parsing C++ is hard
|
* These pre-declarations are needed because parsing C++ is hard
|
||||||
* and otherwise the compiler gets confused.
|
* and otherwise the compiler gets confused.
|
||||||
@ -83,7 +80,8 @@ template <unsigned BLOCK_SIZE, bool USE_SHARED_MEMORY> class RangeTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// construct table from length vector
|
// construct table from length vector
|
||||||
explicit RangeTable(const stxxl::vector<unsigned> &lengths)
|
template<typename VectorT>
|
||||||
|
explicit RangeTable(const VectorT &lengths)
|
||||||
{
|
{
|
||||||
const unsigned number_of_blocks = [&lengths]()
|
const unsigned number_of_blocks = [&lengths]()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user