OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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.

Referenced by ColumnarResults::compactAndCopyEntriesWithTargetSkipping().

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:303
std::vector< std::vector< bool > > bitmaps_

+ Here is the caller graph for this function:

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.

Referenced by ColumnarResults::locateAndCountEntries().

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:303
std::vector< std::vector< bool > > bitmaps_

+ Here is the caller graph for this function:

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: