OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ColumnBitmap Class Reference

#include <ColumnarResults.h>

Public Member Functions

 ColumnBitmap (const size_t num_elements_per_bank, size_t num_banks)
 
bool get (const size_t index, const size_t bank_index) const
 
void set (const size_t index, const size_t bank_index, const bool val)
 

Private Attributes

std::vector< std::vector< bool > > bitmaps_
 

Detailed Description

A helper data structure to track non-empty entries in the input buffer Currently only used for direct columnarization with columnar outputs. Each bank is assigned to a thread so that concurrent updates of the data structure is non-blocking.

Definition at line 40 of file ColumnarResults.h.

Constructor & Destructor Documentation

ColumnBitmap::ColumnBitmap ( const size_t  num_elements_per_bank,
size_t  num_banks 
)
inline

Definition at line 42 of file ColumnarResults.h.

43  : bitmaps_(num_banks, std::vector<bool>(num_elements_per_bank, false)) {}
std::vector< std::vector< bool > > bitmaps_

Member Function Documentation

bool ColumnBitmap::get ( const size_t  index,
const size_t  bank_index 
) const
inline

Definition at line 45 of file ColumnarResults.h.

References bitmaps_, and CHECK_LT.

45  {
46  CHECK_LT(bank_index, bitmaps_.size());
47  CHECK_LT(index, bitmaps_[bank_index].size());
48  return bitmaps_[bank_index][index];
49  }
#define CHECK_LT(x, y)
Definition: Logger.h:200
std::vector< std::vector< bool > > bitmaps_
void ColumnBitmap::set ( const size_t  index,
const size_t  bank_index,
const bool  val 
)
inline

Definition at line 51 of file ColumnarResults.h.

References bitmaps_, and CHECK_LT.

51  {
52  CHECK_LT(bank_index, bitmaps_.size());
53  CHECK_LT(index, bitmaps_[bank_index].size());
54  bitmaps_[bank_index][index] = val;
55  }
#define CHECK_LT(x, y)
Definition: Logger.h:200
std::vector< std::vector< bool > > bitmaps_

Member Data Documentation

std::vector<std::vector<bool> > ColumnBitmap::bitmaps_
private

Definition at line 58 of file ColumnarResults.h.

Referenced by get(), and set().


The documentation for this class was generated from the following file: