Skip to content

Commit

Permalink
[Janitor mode] Fix tabs
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17467 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Oct 1, 2013
1 parent c473808 commit d7a4b3c
Show file tree
Hide file tree
Showing 4 changed files with 589 additions and 589 deletions.
40 changes: 20 additions & 20 deletions Compiler/runtime/HpcOmSchedulerExt.cpp
Expand Up @@ -2,31 +2,31 @@

void* HpcOmSchedulerExtImpl__readScheduleFromGraphMl(const char *filename)
{
void *res = mk_nil();
std::string errorMsg = std::string("");
Graph g;
void *res = mk_nil();
std::string errorMsg = std::string("");
Graph g;

if (!GraphMLParser::CheckIfFileExists(filename))
{
std::cerr << "File " << filename << " not found" << std::endl;
errorMsg = "File '";
errorMsg += std::string(filename);
errorMsg += "' does not exist";
res = mk_cons(mk_scon(errorMsg.c_str()), mk_nil());
return res;
}
if (!GraphMLParser::CheckIfFileExists(filename))
{
std::cerr << "File " << filename << " not found" << std::endl;
errorMsg = "File '";
errorMsg += std::string(filename);
errorMsg += "' does not exist";
res = mk_cons(mk_scon(errorMsg.c_str()), mk_nil());
return res;
}

GraphMLParser::ParseGraph(&g, filename,GraphComparator::CompareNodeNamesBool, &errorMsg);
GraphMLParser::ParseGraph(&g, filename,GraphComparator::CompareNodeNamesBool, &errorMsg);

std::list<Node*> sortedNodeList = std::list<Node*>(g.nodes.begin(), g.nodes.end());
sortedNodeList.sort(GraphComparator::CompareNodeTaskIdsBool);
std::list<Node*> sortedNodeList = std::list<Node*>(g.nodes.begin(), g.nodes.end());
sortedNodeList.sort(GraphComparator::CompareNodeTaskIdsBool);

for (std::list<Node*>::iterator iter = sortedNodeList.begin(); iter != sortedNodeList.end(); iter++) {
//std::cerr << "Node " << (*iter)->taskId << " th " << atoi((*iter)->threadId.substr(3).c_str()) << std::endl;
//std::cerr << "Node " << (*iter)->taskId << " th " << atoi((*iter)->threadId.substr(3).c_str()) << std::endl;

if((*iter)->threadId.size() < 3)
continue;
res = mk_cons(mk_icon(atoi((*iter)->threadId.substr(3).c_str())), res);
if((*iter)->threadId.size() < 3)
continue;
res = mk_cons(mk_icon(atoi((*iter)->threadId.substr(3).c_str())), res);
}
return res;
return res;
}
2 changes: 1 addition & 1 deletion Compiler/runtime/HpcOmSchedulerExt_omc.cpp
Expand Up @@ -8,6 +8,6 @@ extern "C" {

extern void* HpcOmSchedulerExt_readScheduleFromGraphMl(const char *filename)
{
return HpcOmSchedulerExtImpl__readScheduleFromGraphMl(filename);
return HpcOmSchedulerExtImpl__readScheduleFromGraphMl(filename);
}
}

0 comments on commit d7a4b3c

Please sign in to comment.