DisCostiC v2.0.0
Distributed Cost in Cluster: a cross-architecture simulator for massively parallel MPI programs
Loading...
Searching...
No Matches
UserInterface::YAMLParser Class Reference

end class YAMLParser More...

#include <YAMLParser.hpp>

Public Member Functions

void removeComment (std::string &line) const
 a function that removes everything from the semicolon (including it) to the end of the line.
 
bool whitespace (const std::string &line) const
 a function that returns false if a non-space character was found, true otherwise. The function is "const" because it does not alter any class member variables.
 
void parseLine (const std::string &line, size_t const lineNum)
 a function that extracts the key from the pair of key = value
 
 YAMLParser (const std::string &fileName)
 a class to set the name of the configuration file and extracts and parses the data
 

Public Attributes

std::map< std::string, std::string > data
 which will hold pairs of key-value
 
std::string fileName
 As member variables, we will only have a std::string, which will hold the name of the configuration file.
 
std::string micro_architecture
 
DisCosTiC_Datatype FP_instructions_per_cycle
 
DisCosTiC_Datatype FP_ops_per_instruction_SP
 
DisCosTiC_Datatype FP_ops_per_instruction_DP
 
real_t clk_freq_in_GHz
 
DisCosTiC_Datatype cores_per_chip
 
DisCosTiC_Datatype chips_per_node
 
DisCosTiC_Datatype cores_per_numa_domain
 
DisCosTiC_Datatype cachelinesize
 
std::vector< real_t > MEM_bandwidth
 
bool flag
 

Detailed Description

end class YAMLParser

Definition at line 27 of file YAMLParser.hpp.

Constructor & Destructor Documentation

◆ YAMLParser()

UserInterface::YAMLParser::YAMLParser ( const std::string & fileName)
inline

a class to set the name of the configuration file and extracts and parses the data

Definition at line 107 of file YAMLParser.hpp.

References fileclose, fileName, fileopen, flag, micro_architecture, parseLine(), removeComment(), and whitespace().

+ Here is the call graph for this function:

Member Function Documentation

◆ parseLine()

void UserInterface::YAMLParser::parseLine ( const std::string & line,
size_t const lineNum )
inline

a function that extracts the key from the pair of key = value

a function that parse the line by calling above mentioed functions

Definition at line 65 of file YAMLParser.hpp.

References cachelinesize, chips_per_node, clk_freq_in_GHz, cores_per_chip, cores_per_numa_domain, flag, FP_ops_per_instruction_DP, FP_ops_per_instruction_SP, and MEM_bandwidth.

Referenced by YAMLParser().

+ Here is the caller graph for this function:

◆ removeComment()

void UserInterface::YAMLParser::removeComment ( std::string & line) const
inline

a function that removes everything from the semicolon (including it) to the end of the line.

Definition at line 44 of file YAMLParser.hpp.

Referenced by YAMLParser().

+ Here is the caller graph for this function:

◆ whitespace()

bool UserInterface::YAMLParser::whitespace ( const std::string & line) const
inline

a function that returns false if a non-space character was found, true otherwise. The function is "const" because it does not alter any class member variables.

Definition at line 53 of file YAMLParser.hpp.

Referenced by YAMLParser().

+ Here is the caller graph for this function:

Member Data Documentation

◆ cachelinesize

DisCosTiC_Datatype UserInterface::YAMLParser::cachelinesize

Definition at line 37 of file YAMLParser.hpp.

Referenced by NodeModel::NodeModel(), NodeModel::NodeModel(), and parseLine().

◆ chips_per_node

DisCosTiC_Datatype UserInterface::YAMLParser::chips_per_node

◆ clk_freq_in_GHz

real_t UserInterface::YAMLParser::clk_freq_in_GHz

◆ cores_per_chip

◆ cores_per_numa_domain

DisCosTiC_Datatype UserInterface::YAMLParser::cores_per_numa_domain

Definition at line 37 of file YAMLParser.hpp.

Referenced by main(), NodeModel::NodeModel(), NodeModel::NodeModel(), and parseLine().

◆ data

std::map<std::string, std::string> UserInterface::YAMLParser::data

which will hold pairs of key-value

Definition at line 30 of file YAMLParser.hpp.

◆ fileName

std::string UserInterface::YAMLParser::fileName

As member variables, we will only have a std::string, which will hold the name of the configuration file.

Definition at line 31 of file YAMLParser.hpp.

Referenced by YAMLParser().

◆ flag

bool UserInterface::YAMLParser::flag

Definition at line 39 of file YAMLParser.hpp.

Referenced by parseLine(), and YAMLParser().

◆ FP_instructions_per_cycle

DisCosTiC_Datatype UserInterface::YAMLParser::FP_instructions_per_cycle

Definition at line 33 of file YAMLParser.hpp.

◆ FP_ops_per_instruction_DP

DisCosTiC_Datatype UserInterface::YAMLParser::FP_ops_per_instruction_DP

Definition at line 35 of file YAMLParser.hpp.

Referenced by DisCosTiC::CompModel::CompModel(), and parseLine().

◆ FP_ops_per_instruction_SP

DisCosTiC_Datatype UserInterface::YAMLParser::FP_ops_per_instruction_SP

Definition at line 34 of file YAMLParser.hpp.

Referenced by DisCosTiC::CompModel::CompModel(), and parseLine().

◆ MEM_bandwidth

std::vector<real_t> UserInterface::YAMLParser::MEM_bandwidth

Definition at line 38 of file YAMLParser.hpp.

Referenced by DisCosTiC::CompModel::CompModel(), and parseLine().

◆ micro_architecture

std::string UserInterface::YAMLParser::micro_architecture

Definition at line 32 of file YAMLParser.hpp.

Referenced by YAMLParser().


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