8 #ifndef GPUGenie_inv_compr_table_h 9 #define GPUGenie_inv_compr_table_h 16 #include <boost/serialization/export.hpp> 49 m_isCompressed(false),
51 m_d_compr_inv_p(nullptr),
52 m_uncompressedInvListsMaxLength(0)
54 assert(
sizeof(
int) ==
sizeof(uint32_t));
82 virtual std::vector<int>*
inv();
97 virtual std::vector<int>*
inv_pos();
136 virtual void build(
size_t max_length,
bool use_load_balance);
155 template <
class Archive>
156 void load(Archive &ar,
const unsigned int version);
158 template <
class Archive>
159 void save(Archive &ar,
const unsigned int version)
const;
161 BOOST_SERIALIZATION_SPLIT_MEMBER()
This is the top-level namespace of the project.
const COMPRESSION_TYPE DEFAULT_COMPRESSION_TYPE
std::vector< int > * compressedInvPos()
uint32_t * m_d_compr_inv_p
void setCompression(genie::compression::COMPRESSION_TYPE compression)
The declaration for class inv_table.
virtual std::vector< int > * inv()
std::vector< uint32_t > * compressedInv()
genie::compression::COMPRESSION_TYPE getCompression() const
virtual void build(size_t max_length, bool use_load_balance)
Build the inv_table.
friend class boost::serialization::access
double getCompressionRatio()
virtual std::vector< int > * inv_pos()
void load(Archive &ar, const unsigned int version)
std::vector< int > * uncompressedInvPos()
bool cpy_data_to_gpu()
Copy vector _inv to gpu memory which is referenced by d_inv_p.
virtual ~inv_compr_table()
inv_compr_table()
Default constructor of the inv_compr_table.
size_t getUncompressedPostingListMaxLength() const
void save(Archive &ar, const unsigned int version) const
void clear_gpu_mem()
clear the corresponding gpu memory referenced by d_inv_p
std::vector< uint32_t > m_comprInv
genie::compression::COMPRESSION_TYPE m_compression
size_t m_uncompressedInvListsMaxLength
std::vector< int > * uncompressedInv()
void setUncompressedPostingListMaxLength(size_t length)
std::vector< int > m_comprInvPos
uint32_t * deviceCompressedInv() const