added template_info
This commit is contained in:
@@ -2536,8 +2536,23 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
||||
}
|
||||
}
|
||||
|
||||
FILE* templatesInfo = NULL;
|
||||
if (consoleMode) {
|
||||
string file = (folderName) ? (folderName + string("/")) : "";
|
||||
file += "templates_info_";
|
||||
file += to_string(i);
|
||||
file += ".txt";
|
||||
|
||||
templatesInfo = fopen(file.c_str(), "w");
|
||||
if (templatesInfo == NULL)
|
||||
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
||||
}
|
||||
|
||||
for (int z = 0; z < parallelRegions.size(); ++z)
|
||||
{
|
||||
if (consoleMode)
|
||||
fprintf(templatesInfo, "FOR region %s\n", parallelRegions[z]->GetName().c_str());
|
||||
|
||||
const DataDirective& dataDirectives = parallelRegions[z]->GetDataDir();
|
||||
const vector<int>& currentVariant = parallelRegions[z]->GetCurrentVariant();
|
||||
|
||||
@@ -2545,12 +2560,23 @@ void runPass(const int curr_regime, const char *proj_name, const char *folderNam
|
||||
for (int z1 = 0; z1 < currentVariant.size(); ++z1)
|
||||
{
|
||||
if (tmp[z1].first->IsTemplate())
|
||||
{
|
||||
if (consoleMode)
|
||||
{
|
||||
SgExpression* rule = new SgExpression(EXPR_LIST);
|
||||
tmp[z1].second[currentVariants[z1][z]].GenRule(new File(current_file), new Expression(rule), tmp[z1].first->GetNewTemplateDimsOrder());
|
||||
fprintf(templatesInfo, "%s(%s)\n", tmp[z1].first->GetShortName().c_str(), rule->unparse());
|
||||
}
|
||||
tmp[z1].first->ClearTemplateClones();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (tmpFolder != "" && consoleMode)
|
||||
folderName = NULL;
|
||||
|
||||
if (consoleMode)
|
||||
fclose(templatesInfo);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -4383,8 +4383,6 @@ void removeSpecialCommentsFromProject(SgFile* file)
|
||||
genVersionDone.erase(file);
|
||||
}
|
||||
}
|
||||
if (stF->lineNumber() > 0)
|
||||
break;
|
||||
stF = stF->lexNext();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define VERSION_SPF "2222"
|
||||
#define VERSION_SPF "2223"
|
||||
|
||||
Reference in New Issue
Block a user