GENIE
genie::Config Class Reference

Config class holds all user configurable settings of GENIE. More...

#include <config.h>

Public Member Functions

uint32_t GetK () const
 Return K. More...
 
uint32_t GetQueryRange () const
 Return the range used in range-based search. More...
 
uint32_t GetNumOfQueries () const
 Return the number of query to search. More...
 
bool GetSaveToGpu () const
 Return whether table should be saved to GPU after search. More...
 
uint8_t GetGpuId () const
 Return the ID of the GPU used. More...
 
ConfigSetK (const uint32_t k)
 Set k. More...
 
ConfigSetQueryRange (const uint32_t query_range)
 Set the range used in range-based search. More...
 
ConfigSetNumOfQueries (const uint32_t num_of_queries)
 Set the number of query to search. More...
 
ConfigSetSaveToGpu (const bool save_to_gpu)
 Set whether table should be saved to GPU after search. More...
 
ConfigSetGpuId (const uint8_t gpu_id)
 Set the ID of the GPU used. More...
 
ConfigLoadFromFile (const std::string &filename)
 Load configuration from a file. More...
 
bool IsKSet () const
 Return whether K has been set. More...
 
bool IsQueryRangeSet () const
 Return whether the query range has been set. More...
 
bool IsNumOfQueriesSet () const
 Return whether the number of query has been set. More...
 
void Validate () const
 Validate that all required options are set. More...
 
void DisplayConfiguration ()
 Display enabled configuration options. More...
 

Detailed Description

Config class holds all user configurable settings of GENIE.

The required options are:

  • K
  • Number of query

The following options have default values:

  • Save to gpu = false
  • GPU ID = 0

Definition at line 20 of file config.h.

Member Function Documentation

◆ DisplayConfiguration()

void genie::Config::DisplayConfiguration ( )

Display enabled configuration options.

Definition at line 96 of file config.cc.

◆ GetGpuId()

uint8_t genie::Config::GetGpuId ( ) const

Return the ID of the GPU used.

Definition at line 30 of file config.cc.

◆ GetK()

uint32_t genie::Config::GetK ( ) const

Return K.

Definition at line 10 of file config.cc.

◆ GetNumOfQueries()

uint32_t genie::Config::GetNumOfQueries ( ) const

Return the number of query to search.

Definition at line 20 of file config.cc.

◆ GetQueryRange()

uint32_t genie::Config::GetQueryRange ( ) const

Return the range used in range-based search.

Definition at line 15 of file config.cc.

◆ GetSaveToGpu()

bool genie::Config::GetSaveToGpu ( ) const

Return whether table should be saved to GPU after search.

Definition at line 25 of file config.cc.

◆ IsKSet()

bool genie::Config::IsKSet ( ) const

Return whether K has been set.

Definition at line 73 of file config.cc.

◆ IsNumOfQueriesSet()

bool genie::Config::IsNumOfQueriesSet ( ) const

Return whether the number of query has been set.

Definition at line 83 of file config.cc.

◆ IsQueryRangeSet()

bool genie::Config::IsQueryRangeSet ( ) const

Return whether the query range has been set.

Definition at line 78 of file config.cc.

◆ LoadFromFile()

Config & genie::Config::LoadFromFile ( const std::string &  filename)

Load configuration from a file.

Definition at line 68 of file config.cc.

◆ SetGpuId()

Config & genie::Config::SetGpuId ( const uint8_t  gpu_id)

Set the ID of the GPU used.

Definition at line 62 of file config.cc.

◆ SetK()

Config & genie::Config::SetK ( const uint32_t  k)

Set k.

Definition at line 35 of file config.cc.

◆ SetNumOfQueries()

Config & genie::Config::SetNumOfQueries ( const uint32_t  num_of_queries)

Set the number of query to search.

Definition at line 49 of file config.cc.

◆ SetQueryRange()

Config & genie::Config::SetQueryRange ( const uint32_t  query_range)

Set the range used in range-based search.

Definition at line 42 of file config.cc.

◆ SetSaveToGpu()

Config & genie::Config::SetSaveToGpu ( const bool  save_to_gpu)

Set whether table should be saved to GPU after search.

Definition at line 56 of file config.cc.

◆ Validate()

void genie::Config::Validate ( ) const

Validate that all required options are set.

Definition at line 88 of file config.cc.


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