Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit ec7e793b authored by kraus's avatar kraus
Browse files

Merge branch '635-get-correct-output-of-value-option-autophase' into 'master'

Resolve "Get correct output of VALUE, OPTION->AUTOPHASE"

Closes #635

See merge request !472

(cherry picked from commit 49fc5b28)

64a1faee update the attribute values of OPTION
parent 662548df
No related branches found
No related tags found
1 merge request!473Merge branch '635-get-correct-output-of-value-option-autophase' into 'OPAL-2.4'
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
// along with OPAL. If not, see <https://www.gnu.org/licenses/>. // along with OPAL. If not, see <https://www.gnu.org/licenses/>.
// //
#include "BasicActions/Option.h" #include "BasicActions/Option.h"
#include "AbstractObjects/OpalData.h"
#include "Attributes/Attributes.h" #include "Attributes/Attributes.h"
#include "Parser/FileStream.h" #include "Parser/FileStream.h"
#include "Utilities/Options.h" #include "Utilities/Options.h"
...@@ -65,7 +66,7 @@ namespace { ...@@ -65,7 +66,7 @@ namespace {
AUTOPHASE, AUTOPHASE,
SURFDUMPFREQ, SURFDUMPFREQ,
NUMBLOCKS, NUMBLOCKS,
RECYCLEBLOCKS, RECYCLEBLOCKS,
NLHS, NLHS,
CZERO, CZERO,
RNGTYPE, RNGTYPE,
...@@ -491,6 +492,11 @@ void Option::execute() { ...@@ -491,6 +492,11 @@ void Option::execute() {
if(Attributes::getBool(itsAttr[TELL])) { if(Attributes::getBool(itsAttr[TELL])) {
*gmsg << "\nCurrent settings of options:\n" << *this << endl; *gmsg << "\nCurrent settings of options:\n" << *this << endl;
} }
Option* main = dynamic_cast<Option*>(OpalData::getInstance()->find("OPTION"));
if (main) {
main->update(itsAttr);
}
} }
void Option::handlePsDumpFrame(const std::string &dumpFrame) { void Option::handlePsDumpFrame(const std::string &dumpFrame) {
...@@ -518,4 +524,10 @@ std::string DumpFrameToString(DumpFrame df) { ...@@ -518,4 +524,10 @@ std::string DumpFrameToString(DumpFrame df) {
default: default:
return std::string("GLOBAL"); return std::string("GLOBAL");
} }
}
void Option::update(const std::vector<Attribute>& othersAttributes) {
for (int i = 0; i < SIZE; ++ i) {
itsAttr[i] = othersAttributes[i];
}
} }
\ No newline at end of file
...@@ -39,6 +39,7 @@ public: ...@@ -39,6 +39,7 @@ public:
private: private:
void handlePsDumpFrame(const std::string &dumpFrame); void handlePsDumpFrame(const std::string &dumpFrame);
void update(const std::vector<Attribute>&);
// Not implemented. // Not implemented.
Option(const Option &); Option(const Option &);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment