PhoenixMicroBenchmark  1.3.0
Toolset for function micro-benchmarking
Loading...
Searching...
No Matches
PFunctionTimer.cpp File Reference
#include <iostream>
#include <algorithm>
#include <fstream>
#include "PFunctionTimer.h"
Include dependency graph for PFunctionTimer.cpp:

Go to the source code of this file.

Functions

void phoenix_vectorToToml (std::ofstream &fs, const std::vector< double > &vecValue, const std::string &tableName, double nbElement)
 Save a vector of values into a toml stream.

Function Documentation

◆ phoenix_vectorToToml()

void phoenix_vectorToToml ( std::ofstream & fs,
const std::vector< double > & vecValue,
const std::string & tableName,
double nbElement )

Save a vector of values into a toml stream.

Parameters
[out]fs: file stream to be updated
vecValue: vector of values to be saved
tableName: name of the attribute
nbElement: number of commputed elements for ns/el and cy/el (otherwise 1)

Definition at line 64 of file PFunctionTimer.cpp.

64 {
65 std::string comma("");
66 fs << tableName << " = [" << std::endl;
67 for(double value : vecValue){
68 fs << comma << "\t" << value/nbElement;
69 comma = ",\n";
70 }
71 fs << "\n]" << std::endl;
72}

Referenced by PFunctionTimer::savePerf().

Here is the caller graph for this function: