Commit ac850f51 authored by Houtan Bastani's avatar Houtan Bastani

pac: stop processing of PAC equation if optimizing share parameter is hard-coded

parent d3bd6ace
......@@ -5264,6 +5264,15 @@ BinaryOpNode::getPacOptimizingShareAndExprNodes(set<int> &optim_share,
set<int> params1, params2;
arg1->collectVariables(SymbolType::parameter, params1);
arg2->collectVariables(SymbolType::parameter, params2);
if (dynamic_cast<NumConstNode *>(arg1) != nullptr
|| dynamic_cast<NumConstNode *>(arg2) != nullptr)
{
cerr << "Error: Please do not use hard-coded parameter values in the PAC equation"
<< endl;
exit(EXIT_FAILURE);
}
if (optim_part == nullptr)
if (test_arg1 != nullptr || test_arg2 != nullptr)
if (params1.size() == 1 || params2.size() == 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment