|
Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
|
#include <iostream>#include <string>#include <string_view>#include <fstream>#include <iomanip>#include <sstream>#include <universal/utility/generateClosurePlots.hpp>Classes | |
| struct | operationResults |
| struct | storeResults |
Functions | |
| void | printResults (const storeResults &results) |
| helper function for processASystem() formats and prints the results | |
| std::string | toPercentageString (float value, float totalOps) |
| helper function for getDataFromBufferStream() coverts calculated from buildClosurePlot() to a percentage wrt the totalOps | |
| int | getDataFromBufferStream (storeResults &results, std::ostringstream &bufferStream, std::streambuf *oldBuf) |
| helper function for processASystem() processes the data from buildClosurePlot() line by line | |
| template<typename NumberType> | |
| int | processASystem (std::string sys_name) |
| int getDataFromBufferStream | ( | storeResults & | results, |
| std::ostringstream & | bufferStream, | ||
| std::streambuf * | oldBuf ) |
helper function for processASystem() processes the data from buildClosurePlot() line by line
| results | a struct that stores all of the statistics of the closure plot for a number system |
| bufferStream | the stream that holds the data from stdout from buildClosurePlot() |
| oldBuf | the old stdout stream buffer |
| void printResults | ( | const storeResults & | results | ) |
helper function for processASystem() formats and prints the results
| results | a struct that stores all of the statistics of the closure plot for a number system |
| int processASystem | ( | std::string | sys_name | ) |
| NumberType | a generic number system compatible with this libray |
| sys_name | the string represntation of the Number System |
| std::string toPercentageString | ( | float | value, |
| float | totalOps ) |
helper function for getDataFromBufferStream() coverts calculated from buildClosurePlot() to a percentage wrt the totalOps
| value | the current value to be converted to a percentage |
| totalOps | the total amount of operations performed for the current arithmetic operation |