Skip to content

Commit

Permalink
[Janitor mode] Fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20371 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed May 6, 2014
1 parent a4a8708 commit d9f313c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 35 deletions.
8 changes: 4 additions & 4 deletions Compiler/BackEnd/HpcOmBenchmark.mo
Expand Up @@ -67,7 +67,7 @@ algorithm
end benchSystem;

public function readCalcTimesFromFile "author: marcusw
Tries to find a file named <%iFileNamePrefix%>.xml or <%iFileNamePrefix%>.json. If such a file exists, the
Tries to find a file named <%iFileNamePrefix%>.xml or <%iFileNamePrefix%>.json. If such a file exists, the
calculation times are read out. If not, the function will fail."
input String iFileNamePrefix;
output list<tuple<Integer,Integer,Real>> calcTimes; //<simEqIdx,numberOfCalcs,calcTimeSum>
Expand Down Expand Up @@ -95,11 +95,11 @@ algorithm
equation
print("readCalcTimesFromFile: No valid profiling-file found.\n");
then fail();
end matchcontinue;
end matchcontinue;
end readCalcTimesFromFile;

public function readCalcTimesFromXml "author: marcusw
Reads the calculation times of the different simCode-equations out of the given xml-file (fileName). Make sure that the file exists before invoking this
Reads the calculation times of the different simCode-equations out of the given xml-file (fileName). Make sure that the file exists before invoking this
method, otherwise it will return an misleading error-message.
Deprecated since commit r20267. Use the generated *.json-file instead."
input String fileName;
Expand All @@ -112,7 +112,7 @@ algorithm
end readCalcTimesFromXml;

public function readCalcTimesFromJson "author: marcusw
Reads the calculation times of the different simCode-equations out of the given json-file (fileName). Make sure that the file exists before invoking this
Reads the calculation times of the different simCode-equations out of the given json-file (fileName). Make sure that the file exists before invoking this
method, otherwise it will return an misleading error-message."
input String fileName;
output list<tuple<Integer,Integer,Real>> calcTimes; //<simEqIdx,numberOfCalcs,calcTimeSum>
Expand Down
38 changes: 19 additions & 19 deletions Compiler/runtime/HpcOmBenchmarkExt.cpp
Expand Up @@ -335,35 +335,35 @@ class XmlBenchReader {

std::list<std::list<double> > ReadJsonBenchFileEquations(std::string filePath)
{
std::list<std::list<double> > resultList = std::list<std::list<double> >();
std::list<std::list<double> > resultList = std::list<std::list<double> >();
// boost::property_tree::ptree pt;
//
// std::ifstream fileStream(filePath.c_str());
//
// if(fileStream)
// {
// std::stringstream stringStream;
// stringStream << fileStream.rdbuf();
// boost::property_tree::read_json(stringStream, pt);
// std::stringstream stringStream;
// stringStream << fileStream.rdbuf();
// boost::property_tree::read_json(stringStream, pt);
//
// BOOST_FOREACH(boost::property_tree::ptree::value_type &v, pt.get_child("profileBlocks"))
// {
// std::list<double> tmpLst = std::list<double>();
// assert(v.first.empty());
// double id = v.second.get<double>("id");
// double ncall = v.second.get<double>("ncall");
// double time = v.second.get<double>("time");
// //std::cerr << "id: " << id << " ncall: " << ncall << " time: " << time << std::endl;
// tmpLst.push_back(id);
// tmpLst.push_back(time);
// tmpLst.push_back(ncall);
// resultList.push_back(tmpLst);
// }
// BOOST_FOREACH(boost::property_tree::ptree::value_type &v, pt.get_child("profileBlocks"))
// {
// std::list<double> tmpLst = std::list<double>();
// assert(v.first.empty());
// double id = v.second.get<double>("id");
// double ncall = v.second.get<double>("ncall");
// double time = v.second.get<double>("time");
// //std::cerr << "id: " << id << " ncall: " << ncall << " time: " << time << std::endl;
// tmpLst.push_back(id);
// tmpLst.push_back(time);
// tmpLst.push_back(ncall);
// resultList.push_back(tmpLst);
// }
//
// fileStream.close();
// fileStream.close();
// }

return resultList;
return resultList;
}

void* HpcOmBenchmarkExtImpl__readCalcTimesFromXml(const char *filename)
Expand Down
24 changes: 12 additions & 12 deletions SimulationRuntime/c/util/rtclock.c
Expand Up @@ -49,8 +49,8 @@ typedef uint64_t rtclock_t;
#else
#include <time.h>
typedef union rtclock_t {
struct timespec time;
unsigned long long cycles;
struct timespec time;
unsigned long long cycles;
} rtclock_t;
//typedef struct timespec ;
#endif
Expand Down Expand Up @@ -441,21 +441,21 @@ void rt_clear_total(int ix)
{
if(omc_clock == OMC_CPU_CYCLES)
{
total_tp[ix].cycles = 0;
rt_clock_ncall_total[ix] = 0;
total_tp[ix].cycles = 0;
rt_clock_ncall_total[ix] = 0;

acc_tp[ix].cycles = 0;
rt_clock_ncall[ix] = 0;
acc_tp[ix].cycles = 0;
rt_clock_ncall[ix] = 0;
}
else
{
total_tp[ix].time.tv_sec = 0;
total_tp[ix].time.tv_nsec = 0;
rt_clock_ncall_total[ix] = 0;
total_tp[ix].time.tv_sec = 0;
total_tp[ix].time.tv_nsec = 0;
rt_clock_ncall_total[ix] = 0;

acc_tp[ix].time.tv_sec = 0;
acc_tp[ix].time.tv_nsec = 0;
rt_clock_ncall[ix] = 0;
acc_tp[ix].time.tv_sec = 0;
acc_tp[ix].time.tv_nsec = 0;
rt_clock_ncall[ix] = 0;
}
}

Expand Down

0 comments on commit d9f313c

Please sign in to comment.