From 5e6790171845a6c78f86cea3247249d46304b89a Mon Sep 17 00:00:00 2001 From: Hamed Gorjiara Date: Tue, 19 Nov 2019 01:30:09 -0800 Subject: [PATCH] using vartunable instead of tunable --- src/Test/serializestatictuner.cc | 40 ++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/src/Test/serializestatictuner.cc b/src/Test/serializestatictuner.cc index 0813706..9811865 100644 --- a/src/Test/serializestatictuner.cc +++ b/src/Test/serializestatictuner.cc @@ -15,13 +15,23 @@ int main(int argc, char **argv) { elem_bin->setTunable(ELEMENTOPT, &onoff, 1); elem_bin->setTunable(ELEMENTOPTSETS, &onoff, 1); elem_bin->setTunable(ENCODINGGRAPHOPT, &offon, 0); - elem_bin->setTunable(NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED); + elem_bin->setVarTunable(0, NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED); + elem_bin->setVarTunable(1, NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED); + elem_bin->setVarTunable(2, NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED); elem_bin->setTunable(VARIABLEORDER, &boolVarOrderingDesc, REVERSEORDERING); elem_bin->setTunable(PROXYVARIABLE, &proxyparameter, 2); - elem_bin->setTunable(MUSTREACHGLOBAL, &onoff, 1); - elem_bin->setTunable(MUSTREACHLOCAL, &onoff, 1); - elem_bin->setTunable(MUSTREACHPRUNE, &onoff, 1); - elem_bin->setTunable(MUSTEDGEPRUNE, &onoff, 1); + elem_bin->setVarTunable(0, MUSTREACHGLOBAL, &onoff, 1); + elem_bin->setVarTunable(1, MUSTREACHGLOBAL, &onoff, 1); + elem_bin->setVarTunable(2, MUSTREACHGLOBAL, &onoff, 1); + elem_bin->setVarTunable(0, MUSTREACHLOCAL, &onoff, 1); + elem_bin->setVarTunable(1, MUSTREACHLOCAL, &onoff, 1); + elem_bin->setVarTunable(2, MUSTREACHLOCAL, &onoff, 1); + elem_bin->setVarTunable(0, MUSTREACHPRUNE, &onoff, 1); + elem_bin->setVarTunable(1, MUSTREACHPRUNE, &onoff, 1); + elem_bin->setVarTunable(2, MUSTREACHPRUNE, &onoff, 1); + elem_bin->setVarTunable(0, MUSTEDGEPRUNE, &onoff, 1); + elem_bin->setVarTunable(1, MUSTEDGEPRUNE, &onoff, 1); + elem_bin->setVarTunable(2, MUSTEDGEPRUNE, &onoff, 1); elem_bin->setTunable(OPTIMIZEORDERSTRUCTURE, &onoff, 1); elem_bin->setTunable(MUSTVALUE, &mustValueBinaryIndex, 3); @@ -78,13 +88,23 @@ int main(int argc, char **argv) { elem_bin->setTunable(ELEMENTOPT, &onoff, 1); elem_bin->setTunable(ELEMENTOPTSETS, &onoff, 1); elem_bin->setTunable(ENCODINGGRAPHOPT, &offon, 0); - elem_bin->setTunable(NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED); + elem_bin->setVarTunable(0, NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED); + elem_bin->setVarTunable(1, NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED); + elem_bin->setVarTunable(2, NODEENCODING, &NodeEncodingDesc, ELEM_UNASSIGNED); elem_bin->setTunable(VARIABLEORDER, &boolVarOrderingDesc, REVERSEORDERING); elem_bin->setTunable(PROXYVARIABLE, &proxyparameter, 2); - elem_bin->setTunable(MUSTREACHGLOBAL, &onoff, 1); - elem_bin->setTunable(MUSTREACHLOCAL, &onoff, 1); - elem_bin->setTunable(MUSTREACHPRUNE, &onoff, 1); - elem_bin->setTunable(MUSTEDGEPRUNE, &onoff, 1); + elem_bin->setVarTunable(0, MUSTREACHGLOBAL, &onoff, 1); + elem_bin->setVarTunable(1, MUSTREACHGLOBAL, &onoff, 1); + elem_bin->setVarTunable(2, MUSTREACHGLOBAL, &onoff, 1); + elem_bin->setVarTunable(0, MUSTREACHLOCAL, &onoff, 1); + elem_bin->setVarTunable(1, MUSTREACHLOCAL, &onoff, 1); + elem_bin->setVarTunable(2, MUSTREACHLOCAL, &onoff, 1); + elem_bin->setVarTunable(0, MUSTREACHPRUNE, &onoff, 1); + elem_bin->setVarTunable(1, MUSTREACHPRUNE, &onoff, 1); + elem_bin->setVarTunable(2, MUSTREACHPRUNE, &onoff, 1); + elem_bin->setVarTunable(0, MUSTEDGEPRUNE, &onoff, 1); + elem_bin->setVarTunable(1, MUSTEDGEPRUNE, &onoff, 1); + elem_bin->setVarTunable(2, MUSTEDGEPRUNE, &onoff, 1); elem_bin->setTunable(OPTIMIZEORDERSTRUCTURE, &onoff, 1); elem_onehot->setTunable(ORDERINTEGERENCODING, &offon, 1); elem_unary->setTunable(ORDERINTEGERENCODING, &offon, 1); -- 2.34.1