compbench-devel Mailing List for CompBenchmarks (Page 4)
Brought to you by:
xfred
You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(48) |
Oct
(51) |
Nov
(66) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(242) |
Feb
(56) |
Mar
(95) |
Apr
(120) |
May
(127) |
Jun
(32) |
Jul
(10) |
Aug
(55) |
Sep
(114) |
Oct
(3) |
Nov
|
Dec
|
From: Frederic T. <xf...@us...> - 2007-09-12 16:24:58
|
Update of /cvsroot/compbench/CompBenchmarks++/Qt-4/Status In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29619 Modified Files: Status-Console.cpp Status-Console.h Status.cpp Log Message: Working message console. Index: Status-Console.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/Status/Status-Console.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Status-Console.h 11 Sep 2007 20:17:40 -0000 1.1 --- Status-Console.h 12 Sep 2007 16:24:52 -0000 1.2 *************** *** 15,19 **** namespace CQT { ! class StatusConsole : public QGroupBox, public CBM::UI { --- 15,19 ---- namespace CQT { ! class StatusConsole : public QWidget, public CBM::UI { Index: Status.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/Status/Status.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Status.cpp 11 Sep 2007 20:17:40 -0000 1.4 --- Status.cpp 12 Sep 2007 16:24:52 -0000 1.5 *************** *** 31,38 **** --- 31,42 ---- progressBar=new QProgressBar(); progressBar->setRange(0,100); + progressBar->setMinimumWidth(256); + progressBar->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); lay->addWidget(progressBar); } + setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); lay->setMargin(2); + lay->setSizeConstraint(QLayout::SetMinimumSize); setLayout(lay); } Index: Status-Console.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/Status/Status-Console.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Status-Console.cpp 11 Sep 2007 21:24:10 -0000 1.2 --- Status-Console.cpp 12 Sep 2007 16:24:52 -0000 1.3 *************** *** 7,19 **** StatusConsole::StatusConsole(QWidget *parent) ! : QGroupBox(parent), UI() { ! setTitle(tr("Message window")); lay=new QVBoxLayout(); setLayout(lay); ! setMinimumSize(500,300); connect(this, SIGNAL(sigMessageShow(CBM::UIMsg*)), --- 7,28 ---- StatusConsole::StatusConsole(QWidget *parent) ! : QWidget(parent), ! // QGroupBox(parent), UI() { ! // setTitle(tr("Message window")); lay=new QVBoxLayout(); setLayout(lay); + /* int i = 30; + while (i--) + lay->addWidget(new QLabel("what aizeuaziue")); + */ ! // setBackgroundRole(QPalette::BrightText); ! setMinimumSize(0,0); ! setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); ! lay->setSizeConstraint(QLayout::SetMinAndMaxSize); ! // QSizePolicy::Ignored, QSizePolicy::Ignored); connect(this, SIGNAL(sigMessageShow(CBM::UIMsg*)), *************** *** 202,205 **** --- 211,216 ---- } + if (_msg->getFlags()==CBM::UIMsg::Progress) + r+=" : "; return(r); } *************** *** 212,215 **** --- 223,227 ---- if (label!="") { StatusAction *widget = new StatusAction(msg, label, this); + printf("%x d=%d\n", msg, CBM::UI::depth(msg)*16); widget->setContentsMargins(CBM::UI::depth(msg)*16, 0, 0, 0); lay->addWidget(widget); |
From: Frederic T. <xf...@us...> - 2007-09-12 16:24:42
|
Update of /cvsroot/compbench/CompBenchmarks++/Qt-4 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv29596 Modified Files: main.cpp Log Message: Working message console. Index: main.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/main.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** main.cpp 11 Sep 2007 20:18:53 -0000 1.10 --- main.cpp 12 Sep 2007 16:24:38 -0000 1.11 *************** *** 9,12 **** --- 9,14 ---- #include <QFileDialog> #include <QIcon> + #include <QScrollArea> + #include <QHBoxLayout> using namespace CQT; *************** *** 120,123 **** --- 122,127 ---- { QSplitter *sp = new QSplitter(Qt::Vertical); + QScrollArea *sa = new QScrollArea; + QHBoxLayout *laycon = new QHBoxLayout; QIcon I1(":/icons/success.png"); *************** *** 135,138 **** --- 139,143 ---- mainTab = new QTabWidget; + // sa->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); console=new StatusConsole; planCompilerSelected=0; *************** *** 156,162 **** sp->addWidget(mainTab); - sp->addWidget(console); - lay->addWidget(sp); mainW->setLayout(lay); --- 161,178 ---- sp->addWidget(mainTab); + QWidget *qw = new QWidget; + qw->setLayout(laycon); + + laycon->addWidget(console); + sa->setWidget(console); + laycon->addWidget(sa); + sa->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + sa->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); + + + sp->addWidget(qw); + + lay->addWidget(sp); mainW->setLayout(lay); |
From: Frederic T. <xf...@us...> - 2007-09-11 21:24:16
|
Update of /cvsroot/compbench/CompBenchmarks++/Qt-4/Status In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv14656 Modified Files: Status-Console.cpp Log Message: Better look. Index: Status-Console.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/Status/Status-Console.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Status-Console.cpp 11 Sep 2007 20:17:40 -0000 1.1 --- Status-Console.cpp 11 Sep 2007 21:24:10 -0000 1.2 *************** *** 15,18 **** --- 15,20 ---- setLayout(lay); + setMinimumSize(500,300); + connect(this, SIGNAL(sigMessageShow(CBM::UIMsg*)), this, SLOT(uiMessageShow(CBM::UIMsg*)), *************** *** 260,265 **** status=(CBM::UIMsg::Status)atoi(A->Value().c_str()); act=MsgStatus(msg); ! if (act) act->changeStatus(status); } } --- 262,270 ---- status=(CBM::UIMsg::Status)atoi(A->Value().c_str()); act=MsgStatus(msg); ! if (act) { act->changeStatus(status); + if (flags(msg)==CBM::UIMsg::Progress) + act->updateProgress(100); + } } } |
From: Frederic T. <xf...@us...> - 2007-09-11 20:18:56
|
Update of /cvsroot/compbench/CompBenchmarks++/Qt-4 In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21797 Modified Files: compbenchmarks-ui-qt4.pro main.cpp main.h Log Message: CBM::UIMsg handling revisited. Index: main.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/main.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** main.cpp 29 Aug 2007 20:34:06 -0000 1.9 --- main.cpp 11 Sep 2007 20:18:53 -0000 1.10 *************** *** 8,11 **** --- 8,12 ---- #include <QFileDialog> + #include <QIcon> using namespace CQT; *************** *** 118,123 **** --- 119,139 ---- : QApplication(argc, argv) { + QSplitter *sp = new QSplitter(Qt::Vertical); + + QIcon I1(":/icons/success.png"); + pixmapOK=I1.pixmap(12); + + QIcon I2(":/icons/error.png"); + pixmapKO=I2.pixmap(12); + + QIcon I3(":/icons/arrow-right.png"); + pixmapRunning=I3.pixmap(12); + + mainW=new QWidget; + lay = new QHBoxLayout; + mainTab = new QTabWidget; + console=new StatusConsole; planCompilerSelected=0; App=this; *************** *** 139,142 **** --- 155,164 ---- mainTab->setTabToolTip(2, tr("Define and order contexts for benchmarks")); + sp->addWidget(mainTab); + sp->addWidget(console); + lay->addWidget(sp); + + mainW->setLayout(lay); + connect(this, SIGNAL(sigPackageInstallation(CBM::Package*)), this, SLOT(doPackageInstallation(CBM::Package*)), *************** *** 210,213 **** --- 232,251 ---- } + QPixmap *Application::pixmapObject(LedColor _color) + { + switch(_color) { + case Running: + return(&pixmapRunning); + break; + case OK: + return(&pixmapOK); + break; + case KO: + return(&pixmapKO); + break; + } + return(0); + } + void Application::doPackagesRefresh(void) { *************** *** 344,355 **** void Application::doCompilerAutodetect(void) { ! StatusWidget *W; ! CompilerAutodetectThread *T; ! ! W=new StatusWidget(0); ! W->show(); ! T=new CompilerAutodetectThread(W); ! T->start(); } --- 382,394 ---- void Application::doCompilerAutodetect(void) { ! /* StatusWidget *W; ! CompilerAutodetectThread *T; ! ! W=new StatusWidget(0); ! W->show(); ! T=new CompilerAutodetectThread(W); ! T->start(); ! */ } *************** *** 488,492 **** */ ! app->mainTab->show(); result=app->exec(); --- 527,531 ---- */ ! app->mainW->show(); result=app->exec(); Index: compbenchmarks-ui-qt4.pro =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/compbenchmarks-ui-qt4.pro,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** compbenchmarks-ui-qt4.pro 29 Aug 2007 20:34:06 -0000 1.7 --- compbenchmarks-ui-qt4.pro 11 Sep 2007 20:18:53 -0000 1.8 *************** *** 25,29 **** plan_sources = Plan/PlanAvailableOption Plan/PlanAvailableCompiler Plan/PlanAvailable Plan/PlanAvailableBenchmark Plan/PlanDefineToolBox Plan/PlanDefineBatch Plan/PlanDefine Plan/PlanManager ! all_sources = $$base_sources $$option_sources $$package_sources $$compiler_sources $$plan_sources Status/Status-UI Status/Status main defineReplace(headers) { --- 25,29 ---- plan_sources = Plan/PlanAvailableOption Plan/PlanAvailableCompiler Plan/PlanAvailable Plan/PlanAvailableBenchmark Plan/PlanDefineToolBox Plan/PlanDefineBatch Plan/PlanDefine Plan/PlanManager ! all_sources = $$base_sources $$option_sources $$package_sources $$compiler_sources $$plan_sources Status/Status Status/Status-Console main defineReplace(headers) { Index: main.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/main.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** main.h 22 May 2007 17:26:06 -0000 1.7 --- main.h 11 Sep 2007 20:18:53 -0000 1.8 *************** *** 7,19 **** #include <QProgressBar> #include <QThread> #include <Package/PackageManager.h> #include <Compiler/CompilerManager.h> #include <Plan/PlanManager.h> ! #include <Plan/Plan-Batch.h> namespace CQT { class PackageInstallThread : public QThread, public PackageHolder --- 7,25 ---- #include <QProgressBar> #include <QThread> + #include <QPixmap> #include <Package/PackageManager.h> #include <Compiler/CompilerManager.h> #include <Plan/PlanManager.h> ! #include <Status/Status-Console.h> #include <Plan/Plan-Batch.h> namespace CQT { + typedef enum { Running, + Fatal, + OK, + KO } LedColor; + class PackageInstallThread : public QThread, public PackageHolder *************** *** 58,63 **** CBM::Compiler *planCompilerSelected; - public: QTabWidget *mainTab; protected: --- 64,78 ---- CBM::Compiler *planCompilerSelected; QTabWidget *mainTab; + StatusConsole *console; + QHBoxLayout *lay; + + QPixmap pixmapOK; + QPixmap pixmapKO; + QPixmap pixmapRunning; + + + public: + QWidget *mainW; protected: *************** *** 126,129 **** --- 141,146 ---- Application(int &argc, char **argv); + QPixmap *pixmapObject(LedColor _color); + virtual void packageInstallation(CBM::Package *_package); virtual void packageUninstallation(CBM::Package *_package); |
From: Frederic T. <xf...@us...> - 2007-09-11 20:17:49
|
Update of /cvsroot/compbench/CompBenchmarks++/Qt-4/Status In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21359 Modified Files: Status.cpp Status.h Added Files: Status-Console.cpp Status-Console.h Log Message: CBM::UIMsg handling revisited. --- NEW FILE: Status-Console.h --- #ifndef H_CQT_STATUSCONSOLE #define H_CQT_STATUSCONSOLE #include <UI/UI-Msg.h> #include <UI/UI.h> #include <QGroupBox> #include <QPixmap> #include <QLabel> #include <QVBoxLayout> #include <QProgressBar> // Q_DECLARE_METATYPE(CBM::UIMsg) namespace CQT { class StatusConsole : public QGroupBox, public CBM::UI { private: Q_OBJECT protected: // virtual class StatusAction *ActionObject(CBM::UIMsg *msg); QVBoxLayout *lay; virtual std::string MsgLabel(CBM::UIMsg *_msg); virtual class StatusAction *MsgStatus(CBM::UIMsg *_msg); signals: virtual void sigMessageShow(CBM::UIMsg *msg); virtual void sigMessageProgress(CBM::UIMsg *msg); virtual void sigMessageDone(CBM::UIMsg *msg); protected slots: virtual void uiMessageShow(CBM::UIMsg *msg); virtual void uiMessageProgress(CBM::UIMsg *msg); virtual void uiMessageDone(CBM::UIMsg *msg); public: StatusConsole(QWidget *parent = 0); virtual void Display(CBM::UIMsg *_msg); virtual void DisplayProgressUpdate(CBM::UIMsg *_msg); virtual void DisplayDone(CBM::UIMsg *_msg); virtual ~StatusConsole(); }; } #endif Index: Status.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/Status/Status.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Status.h 29 Aug 2007 20:34:06 -0000 1.3 --- Status.h 11 Sep 2007 20:17:40 -0000 1.4 *************** *** 4,7 **** --- 4,8 ---- #include <UI/UI.h> #include <UI/UI-Msg.h> + #include <main.h> #include <QWidget> *************** *** 16,61 **** namespace CQT { - - class StatusWidget : public QWidget, - public CBM::UI - { - private: - Q_OBJECT - QLabel *actionLabel; - QProgressBar *progressBar; - protected: - QGridLayout *layout; - - signals: - virtual void sigMessageShow(CBM::UIMsg *msg); - virtual void sigMessageProgress(CBM::UIMsg *msg); - virtual void sigMessageDone(CBM::UIMsg *msg); - - protected slots: - virtual void uiMessageShow(CBM::UIMsg *msg); - virtual void uiMessageProgress(CBM::UIMsg *msg); - virtual void uiMessageDone(CBM::UIMsg *msg); - - public: - StatusWidget(QWidget *parent = 0); - - public: - virtual void Display(CBM::UIMsg *_msg); - virtual void DisplayProgressUpdate(CBM::UIMsg *_msg); - virtual void DisplayDone(CBM::UIMsg *_msg); - - public: - virtual ~StatusWidget(); - }; - class StatusAction : public QWidget { private: Q_OBJECT - public: - typedef enum { Running, - Fatal, - OK, - KO } LedColor; private: QPixmap pixmapOK; --- 17,24 ---- *************** *** 66,85 **** QLabel *icon; QLabel *label; QProgressBar *progressBar; CBM::UIMsg *msg; ! QPixmap *pixmapObject(LedColor _color); ! ! public: ! StatusAction(CBM::UIMsg *_msg, ! QWidget *_parent = 0); public slots: ! virtual void changeColor(LedColor _color); public: virtual ~StatusAction(); --- 29,50 ---- QLabel *icon; QLabel *label; + QProgressBar *progressBar; CBM::UIMsg *msg; ! virtual void changeColor(LedColor _color); public: ! StatusAction(CBM::UIMsg *_msg, ! std::string _label, ! QWidget *_parent = 0); public slots: ! virtual void changeStatus(CBM::UIMsg::Status _status); ! virtual void updateProgress(int _p); public: + virtual CBM::UIMsg *Message(void); virtual ~StatusAction(); Index: Status.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/Qt-4/Status/Status.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Status.cpp 29 Aug 2007 20:34:06 -0000 1.3 --- Status.cpp 11 Sep 2007 20:17:40 -0000 1.4 *************** *** 9,76 **** using namespace CQT; - StatusWidget::StatusWidget(QWidget *parent) - : QWidget(parent), - CBM::UI() - { - layout = new QGridLayout; - - actionLabel=new QLabel(tr("")); - layout->addWidget(actionLabel, 0, 0, 1, 2); - - progressBar=new QProgressBar(); - progressBar->setRange(0,100); - - layout->addWidget(progressBar, 1, 0, 1, 2); - setLayout(layout); - setWindowTitle(tr("Progress")); - // setWindowModality(Qt::ApplicationModal); - - progressBar->setRange(0,100); - connect(this, SIGNAL(sigMessageShow(CBM::UIMsg*)), - this, SLOT(uiMessageShow(CBM::UIMsg*)), - Qt::QueuedConnection); - - connect(this, SIGNAL(sigMessageProgress(CBM::UIMsg*)), - this, SLOT(uiMessageProgress(CBM::UIMsg*)), - Qt::QueuedConnection); - - connect(this, SIGNAL(sigMessageDone(CBM::UIMsg*)), - this, SLOT(uiMessageDone(CBM::UIMsg*)), - Qt::QueuedConnection); - } - - void StatusWidget::uiMessageShow(CBM::UIMsg *msg) - { - } - - void StatusWidget::uiMessageProgress(CBM::UIMsg *msg) - { - } - - void StatusWidget::uiMessageDone(CBM::UIMsg *msg) - { - } - - void StatusWidget::Display(CBM::UIMsg *_msg) - { - emit sigMessageShow(_msg); - } - - void StatusWidget::DisplayProgressUpdate(CBM::UIMsg *_msg) - { - emit sigMessageProgress(_msg); - } - - void StatusWidget::DisplayDone(CBM::UIMsg *_msg) - { - emit sigMessageDone(_msg); - } - - StatusWidget::~StatusWidget() - { - } - StatusAction::StatusAction(CBM::UIMsg *_msg, ! QWidget *_parent) : QWidget(_parent) { --- 9,15 ---- using namespace CQT; StatusAction::StatusAction(CBM::UIMsg *_msg, ! std::string _label, ! QWidget *_parent) : QWidget(_parent) { *************** *** 78,95 **** msg=_msg; - QIcon I1(":/icons/success.png"); - pixmapOK=I1.pixmap(12); - - QIcon I2(":/icons/error.png"); - pixmapKO=I2.pixmap(12); - - QIcon I3(":/icons/arrow-right.png"); - pixmapRunning=I3.pixmap(12); icon=new QLabel(); ! icon->setPixmap(*pixmapObject(Running)); lay->addWidget(icon); icon->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); if (_msg->getFlags()==CBM::UIMsg::Progress) { progressBar=new QProgressBar(); --- 17,31 ---- msg=_msg; + lay->setAlignment(Qt::AlignLeft); icon=new QLabel(); ! icon->setPixmap(*App->pixmapObject(Running)); lay->addWidget(icon); icon->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); + label=new QLabel(_label.c_str()); + lay->addWidget(label); + label->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); + if (_msg->getFlags()==CBM::UIMsg::Progress) { progressBar=new QProgressBar(); *************** *** 97,103 **** lay->addWidget(progressBar); } - label=new QLabel("test...!!!"); - lay->addWidget(label); - label->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); lay->setMargin(2); --- 33,36 ---- *************** *** 105,127 **** } ! QPixmap *StatusAction::pixmapObject(LedColor _color) { ! switch(_color) { ! case Running: ! return(&pixmapRunning); ! break; ! case OK: ! return(&pixmapOK); ! break; ! case KO: ! return(&pixmapKO); ! break; } ! return(0); } ! void StatusAction::changeColor(LedColor _color) { ! icon->setPixmap(*pixmapObject(_color)); } --- 38,69 ---- } ! void StatusAction::changeColor(LedColor _color) { ! icon->setPixmap(*App->pixmapObject(_color)); ! } ! ! void StatusAction::changeStatus(CBM::UIMsg::Status _status) ! { ! LedColor ncolor = Fatal; ! ! switch(_status) { ! case CBM::UIMsg::OK: ! ncolor=OK; ! break; ! case CBM::UIMsg::KO: ! ncolor=KO; ! break; } ! changeColor(ncolor); } ! void StatusAction::updateProgress(int _p) { ! progressBar->setValue(_p); ! } ! ! CBM::UIMsg *StatusAction::Message(void) ! { ! return(msg); } --- NEW FILE: Status-Console.cpp --- #include <Status/Status-Console.h> #include <Status/Status.h> #include <QHBoxLayout> using namespace CQT; StatusConsole::StatusConsole(QWidget *parent) : QGroupBox(parent), UI() { setTitle(tr("Message window")); lay=new QVBoxLayout(); setLayout(lay); connect(this, SIGNAL(sigMessageShow(CBM::UIMsg*)), this, SLOT(uiMessageShow(CBM::UIMsg*)), Qt::QueuedConnection); connect(this, SIGNAL(sigMessageProgress(CBM::UIMsg*)), this, SLOT(uiMessageProgress(CBM::UIMsg*)), Qt::QueuedConnection); connect(this, SIGNAL(sigMessageDone(CBM::UIMsg*)), this, SLOT(uiMessageDone(CBM::UIMsg*)), Qt::QueuedConnection); } StatusAction *StatusConsole::MsgStatus(CBM::UIMsg *_msg) { QLayoutItem *child; StatusAction *r; int i, n = lay->count(); for(i=0; i<n; i++) { child=lay->itemAt(i); r=dynamic_cast<StatusAction*>(child->widget()); if (r) { if (r->Message()==_msg) return(r); } } return(0); } std::string StatusConsole::MsgLabel(CBM::UIMsg *_msg) { std::string r; CBM::UIMsg::ActionType at; at=action(_msg); if (at==CBM::UIMsg::ShellCommand) return(""); switch(at) { case CBM::UIMsg::ShellCommand: r+="Executing : '"; r+=objectField(_msg, "name"); r+="'"; break; case CBM::UIMsg::FatalError: r+="FATAL : "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::BenchmarkBench: r+="Benchmarking result(s)"; break; case CBM::UIMsg::PackageUninstall: r+="Uninstalling "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PackageInstall: r+="Installing "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PackageDownload: r+="Downloading "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PackageExtract: r+="Extracting"; break; case CBM::UIMsg::PackageConfigure: r+="Configuring"; break; case CBM::UIMsg::PackageMake: r+="Building"; break; case CBM::UIMsg::PackageClean: r+="Cleaning "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PackagePreconfigure: r+="Pre-configuring"; break; case CBM::UIMsg::PackageFetch: r+="Fetching "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PackageTest: r+="Testing "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PackagePatch: r+="Patching "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::Checksum: r+="Checksuming "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::Group: r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanRegister: r+="Registering plan "; r+=objectField(_msg, "file"); break; case CBM::UIMsg::PlanRestore: r+="Restoring plan "; r+=objectField(_msg, "file"); break; case CBM::UIMsg::PlanUnregister: r+="Unregistering plan "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanBatchRegister: r+="Registering batch "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanBatchUnregister: r+="Unregistering batch "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanCompilerRegister: r+="Registering compiler "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanCompilerUnregister: r+="Unregistering compiler "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanOptionsetRegister: r+="Registering option set "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanOptionsetUnregister: r+="Unregistering option set "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanOptionsRegister: r+="Registering options "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanOptionsUnregister: r+="Unregistering options "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanOptionRegister: r+="Registering option "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanOptionUnregister: r+="Unregistering option "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanBenchmarkRegister: r+="Registering benchmark "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanBenchmarkUnregister: r+="Unregistering benchmark "; r+=objectField(_msg, "name"); break; case CBM::UIMsg::PlanRun: r+="Running benchmark plan "; // r+=objectField(_msg, "name"); break; default: r+="Display::DEFAULT/"; r+=_msg->str(); r+="\n"; break; } return(r); } void StatusConsole::uiMessageShow(CBM::UIMsg *msg) { std::string label = MsgLabel(msg); if (label!="") { StatusAction *widget = new StatusAction(msg, label, this); widget->setContentsMargins(CBM::UI::depth(msg)*16, 0, 0, 0); lay->addWidget(widget); } } void StatusConsole::uiMessageProgress(CBM::UIMsg *msg) { StatusAction *act; if (action(msg)==CBM::UIMsg::ShellCommand) return; act=MsgStatus(msg); if (act) act->updateProgress((int)progress(msg)); } void StatusConsole::uiMessageDone(CBM::UIMsg *msg) { CBM::XMLNode *R; CBM::XMLNode *N; CBM::XMLAttribute *A; StatusAction *act; CBM::UIMsg::Status status; int i, n; if (action(msg)==CBM::UIMsg::ShellCommand) return; R=msg->getNode("output"); n=R->nodeNumber(); // std::cout << _msg->str() << std::endl; for(i=0;i<n;i++) { N=R->getNode(i); if (N->Name()!="text") continue; A=N->getAttribute("status"); if (!A) continue; status=(CBM::UIMsg::Status)atoi(A->Value().c_str()); act=MsgStatus(msg); if (act) act->changeStatus(status); } } void StatusConsole::Display(CBM::UIMsg *_msg) { emit sigMessageShow(_msg); } void StatusConsole::DisplayProgressUpdate(CBM::UIMsg *_msg) { emit sigMessageProgress(_msg); } void StatusConsole::DisplayDone(CBM::UIMsg *_msg) { emit sigMessageDone(_msg); } StatusConsole::~StatusConsole() { } |
From: Frederic T. <xf...@us...> - 2007-09-11 20:16:55
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20986 Modified Files: UI-Console.cpp UI-Console.h UI.cpp UI.h Log Message: Code from UI::Console moved to UI. Index: UI.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** UI.h 6 Sep 2007 17:38:36 -0000 1.16 --- UI.h 11 Sep 2007 20:16:51 -0000 1.17 *************** *** 39,42 **** --- 39,80 ---- protected: + /** Compute depth of a message. + * + * Returns the number of parents of a message + * \param _msg Message instance + * \return Number of parents for given message + */ + virtual int depth(UIMsg *_msg); + + + /** Get flags from a message. + * \param _msg Message instance + * \return Flags for the given message + */ + virtual UIMsg::Flags flags(UIMsg *_msg); + + + /** Get progress information on a message. + * \param _msg Message instance + * \return Progress (0 to 100.0) + */ + virtual float progress(UIMsg *_msg); + + /** Get action from a message. + * \param _msg Message instance + * \return Action for the given message + */ + virtual UIMsg::ActionType action(UIMsg *_msg); + + /** Get a field from a message. + * \param _msg Message instance + * \param _field Field to get + * \return Value of field in message + */ + virtual std::string objectField(UIMsg *_msg, + std::string _field); + + + /** \brief Internal method to post a message. * Index: UI.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** UI.cpp 24 Aug 2007 18:52:50 -0000 1.15 --- UI.cpp 11 Sep 2007 20:16:51 -0000 1.16 *************** *** 31,34 **** --- 31,111 ---- } + int UI::depth(UIMsg *_msg) + { + int d = 0; + + while ((_msg) && (_msg->getParent())) { + _msg=(UIMsg*)_msg->getParent()->getParent(); + if ((UO_verbose==CBM::All) || + (action(_msg)!=UIMsg::ShellCommand)) + d++; + } + + return(d); + } + + UIMsg::Flags UI::flags(UIMsg *_msg) + { + XMLAttribute *A = _msg->getAttribute("flags"); + + if (A->Value()=="Progress") + return(UIMsg::Progress); + else + return(UIMsg::NoProgress); + } + + float UI::progress(UIMsg *_msg) + { + XMLNode *N = _msg->getNode("progress"); + XMLAttribute *A; + + if (!N) + return(0.0f); + + A=N->getAttribute("value"); + + if (!A) + return(0.0f); + + return((float)atof(A->Value().c_str())); + } + + UIMsg::ActionType UI::action(UIMsg *_msg) + { + XMLNode *N = _msg->getNode("action"); + XMLAttribute *A; + UIMsg::ActionType r; + + if (!N) + return(UIMsg::UndefAction); + + + A=N->getAttribute("type"); + if (!A) + return(UIMsg::UndefAction); + + r=(UIMsg::ActionType)atoi(A->Value().c_str()); + + return(r); + } + + std::string UI::objectField(UIMsg *_msg, + std::string _field) + { + XMLNode *N = _msg->getNode("object"); + XMLAttribute *A; + + if (!N) + return(""); + + + A=N->getAttribute(_field); + if (!A) + return(""); + + return(A->Value()); + } + + UIMsg *UI::currentMsg(void) { Index: UI-Console.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI-Console.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** UI-Console.cpp 10 Sep 2007 16:42:19 -0000 1.8 --- UI-Console.cpp 11 Sep 2007 20:16:51 -0000 1.9 *************** *** 30,109 **** } - int UIConsole::depth(UIMsg *_msg) - { - int d = 0; - - while ((_msg) && (_msg->getParent())) { - _msg=(UIMsg*)_msg->getParent()->getParent(); - if ((UO_verbose==CBM::All) || - (action(_msg)!=UIMsg::ShellCommand)) - d++; - } - - return(d); - } - - UIMsg::Flags UIConsole::flags(UIMsg *_msg) - { - XMLAttribute *A = _msg->getAttribute("flags"); - - if (A->Value()=="Progress") - return(UIMsg::Progress); - else - return(UIMsg::NoProgress); - } - - float UIConsole::progress(UIMsg *_msg) - { - XMLNode *N = _msg->getNode("progress"); - XMLAttribute *A; - - if (!N) - return(0.0f); - - A=N->getAttribute("value"); - - if (!A) - return(0.0f); - - return((float)atof(A->Value().c_str())); - } - - UIMsg::ActionType UIConsole::action(UIMsg *_msg) - { - XMLNode *N = _msg->getNode("action"); - XMLAttribute *A; - UIMsg::ActionType r; - - if (!N) - return(UIMsg::UndefAction); - - - A=N->getAttribute("type"); - if (!A) - return(UIMsg::UndefAction); - - r=(UIMsg::ActionType)atoi(A->Value().c_str()); - - return(r); - } - - std::string UIConsole::objectField(UIMsg *_msg, - std::string _field) - { - XMLNode *N = _msg->getNode("object"); - XMLAttribute *A; - - if (!N) - return(""); - - - A=N->getAttribute(_field); - if (!A) - return(""); - - return(A->Value()); - } - int UIConsole::childNumber(UIMsg *_msg) { --- 30,33 ---- Index: UI-Console.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI-Console.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** UI-Console.h 9 Sep 2007 18:21:19 -0000 1.3 --- UI-Console.h 11 Sep 2007 20:16:51 -0000 1.4 *************** *** 31,68 **** virtual void LF(void); protected: - /** Compute depth of a message. - * - * Returns the number of parents of a message - * \param _msg Message instance - * \return Number of parents for given message - */ - virtual int depth(UIMsg *_msg); - - /** Get flags from a message. - * \param _msg Message instance - * \return Flags for the given message - */ - virtual UIMsg::Flags flags(UIMsg *_msg); - - /** Get progress information on a message. - * \param _msg Message instance - * \return Progress (0 to 100.0) - */ - virtual float progress(UIMsg *_msg); - - /** Get action from a message. - * \param _msg Message instance - * \return Action for the given message - */ - virtual UIMsg::ActionType action(UIMsg *_msg); - - /** Get a field from a message. - * \param _msg Message instance - * \param _field Field to get - * \return Value of field in message - */ - virtual std::string objectField(UIMsg *_msg, - std::string _field); - /** Get message's child number. * \param _msg Message instance --- 31,34 ---- |
From: Frederic T. <xf...@us...> - 2007-09-10 20:33:56
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Benchmark In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9246 Modified Files: Benchmark.h Package.h Log Message: For SF's TID #141819 : improving documentation. Index: Benchmark.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Benchmark/Benchmark.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Benchmark.h 4 Sep 2007 19:43:54 -0000 1.9 --- Benchmark.h 10 Sep 2007 20:28:12 -0000 1.10 *************** *** 54,58 **** --- 54,61 ---- /** Pure virtual method to run benchmark. * + * This method is called by Bench(). + * * \return Benchmark's result (as number). + * \sa Bench() */ virtual std::string bench(void) = 0; *************** *** 81,84 **** --- 84,88 ---- * \sa Make() * \sa executionTime() + * \sa bench() * \sa status */ virtual Result *Bench(Compiler *C, Index: Package.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Benchmark/Package.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Package.h 4 Sep 2007 19:45:35 -0000 1.8 --- Package.h 10 Sep 2007 20:28:12 -0000 1.9 *************** *** 52,56 **** * This class can be overloaded in order to get new external packages * supported by CompBenchmarks. Basically it sets up packages (like gzip), ! * and prepares related benchmarks for evaluation. * * \sa Benchmark --- 52,58 ---- * This class can be overloaded in order to get new external packages * supported by CompBenchmarks. Basically it sets up packages (like gzip), ! * and prepares related benchmarks for evaluation. Notice that a generic XML ! * configured pseudo-package is studied, so that no C++ coding nor changes in ! * libcompenchmarks will be necessary to get a package supported. * * \sa Benchmark *************** *** 483,487 **** * This step won't be done and'll return 0 if getStatus()<Package::Made. May changes status. * \return 1 if ok. ! * \sa Bench() */ virtual int Release(void); --- 485,489 ---- * This step won't be done and'll return 0 if getStatus()<Package::Made. May changes status. * \return 1 if ok. ! */ virtual int Release(void); |
From: Frederic T. <xf...@us...> - 2007-09-10 20:28:55
|
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9292 Modified Files: Benchmark-LINPACKC.cpp Log Message: Package jumped to 0.1.2 version. Index: Benchmark-LINPACKC.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-LINPACKC.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Benchmark-LINPACKC.cpp 6 Sep 2007 17:38:10 -0000 1.12 --- Benchmark-LINPACKC.cpp 10 Sep 2007 20:28:53 -0000 1.13 *************** *** 23,32 **** std::string PackageLINPACKC::downloadURL(void) { ! return("http://downloads.sourceforge.net/compbench/cbm-bm-linpackc-0.1.1.tar.gz"); } std::string PackageLINPACKC::expectedMD5(void) { ! return("0fe702b78af01716a0ed1b3f5d05ac89"); } --- 23,32 ---- std::string PackageLINPACKC::downloadURL(void) { ! return("http://downloads.sourceforge.net/compbench/cbm-bm-linpackc-0.1.2.tar.gz"); } std::string PackageLINPACKC::expectedMD5(void) { ! return("30e230832adec2e0df55a9a654edeae4"); } *************** *** 43,47 **** int PackageLINPACKC::Size(void) { ! return(75029); } --- 43,47 ---- int PackageLINPACKC::Size(void) { ! return(75072); } |
From: Frederic T. <xf...@us...> - 2007-09-10 20:28:28
|
Update of /cvsroot/compbench/CompBenchmarks++/compbenchmarks-core In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv9274 Modified Files: main.h Log Message: For SF's TID #141819 : improving documentation. Index: main.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/compbenchmarks-core/main.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** main.h 27 May 2007 16:06:22 -0000 1.1 --- main.h 10 Sep 2007 20:28:25 -0000 1.2 *************** *** 14,18 **** * \section intro_sec A foreword * ! * This document presents concepts, source layout and organisation of CompBenchmarks. * As a reminder, this software has been released under the GPL license and aims to * provide a convenient environment to benchmark software using different compilers --- 14,18 ---- * \section intro_sec A foreword * ! * This document presents concepts, source layout and organization of CompBenchmarks. * As a reminder, this software has been released under the GPL license and aims to * provide a convenient environment to benchmark software using different compilers |
From: Frederic T. <xf...@us...> - 2007-09-10 19:43:21
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Plan In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv24130 Modified Files: Plan-Batch.cpp Plan.cpp Plan.h Log Message: Run number (number of times each benchmark'll get evaluated) has been introduced. Index: Plan.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Plan/Plan.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Plan.h 6 Sep 2007 16:51:40 -0000 1.11 --- Plan.h 10 Sep 2007 19:43:18 -0000 1.12 *************** *** 74,77 **** --- 74,81 ---- int compilerCopied; + /** Number of evaluations per benchmarks. + * Number of time a benchmark'll be evaluated using same compiler and options */ + int runNumber; + /** Get batch and its interal iteration index. * *************** *** 96,99 **** --- 100,111 ---- virtual int setOutputDirectory(std::string _outputDirectory); + /** Return number of times each benchmark'll be evaluated. + * \sa runNumber */ + virtual int getRunNumber(void); + + /** Set number of times each benchmark'll be evaluated. + * \sa runNumber */ + virtual void setRunNumber(int _runNumber); + /** Get output directory. * Index: Plan.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Plan/Plan.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Plan.cpp 21 Aug 2007 19:49:09 -0000 1.19 --- Plan.cpp 10 Sep 2007 19:43:18 -0000 1.20 *************** *** 31,34 **** --- 31,35 ---- hostCopied=0; compilerCopied=0; + runNumber=1; } *************** *** 45,48 **** --- 46,59 ---- } + int Plan::getRunNumber(void) + { + return(runNumber); + } + + void Plan::setRunNumber(int _runNumber) + { + runNumber=_runNumber; + } + std::string Plan::getOutputDirectory(void) { *************** *** 329,332 **** --- 340,346 ---- outp->addAttribute("name", outputDirectory); + sprintf(c, "%d", getRunNumber()); + root->addAttribute("runNumber", c); + root->add(outp); root->add(batchs); *************** *** 432,435 **** --- 446,456 ---- } + A=planRootNode->getAttribute("runNumber"); + if (!A) { + cbmUI->outputKO("runNumber attribute not found on libcompbenchmarks-plan"); + return(0); + } + runNumber=atoi(A->Value().c_str()); + PBs=planRootNode->getNode("plan-batchs"); if (!PBs) { Index: Plan-Batch.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Plan/Plan-Batch.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Plan-Batch.cpp 4 Sep 2007 16:38:14 -0000 1.13 --- Plan-Batch.cpp 10 Sep 2007 19:43:18 -0000 1.14 *************** *** 249,252 **** --- 249,253 ---- std::string _id) { + return(_set->add(_id)); } *************** *** 455,459 **** int PlanBatch::totalIterations(void) { ! return(compilerNumber()*compilerOptionsTotalNumber()*benchmarkNumber()); } --- 456,460 ---- int PlanBatch::totalIterations(void) { ! return(compilerNumber()*compilerOptionsTotalNumber()*benchmarkNumber()*plan->getRunNumber()); } *************** *** 470,474 **** CBM::Compiler *PlanBatch::currentCompiler(void) { ! int compilerIndex = (iteration/(compilerOptionSetNumber()*benchmarkNumber()))%compilerNumber(); CBM::Compiler *C = getCompiler(compilerIndex); --- 471,475 ---- CBM::Compiler *PlanBatch::currentCompiler(void) { ! int compilerIndex = (iteration/(compilerOptionSetNumber()*benchmarkNumber()*plan->getRunNumber()))%compilerNumber(); CBM::Compiler *C = getCompiler(compilerIndex); *************** *** 478,482 **** CBM::CompilerOptions *PlanBatch::currentCompilerOptions(void) { ! int rawIndex = (iteration/(benchmarkNumber()*compilerNumber()))%compilerOptionsTotalNumber(); int i, n = compilerOptionSetNumber(); CBM::CompilerOptionSet *OS; --- 479,483 ---- CBM::CompilerOptions *PlanBatch::currentCompilerOptions(void) { ! int rawIndex = (iteration/(benchmarkNumber()*compilerNumber()*plan->getRunNumber()))%compilerOptionsTotalNumber(); int i, n = compilerOptionSetNumber(); CBM::CompilerOptionSet *OS; *************** *** 496,500 **** CBM::Benchmark *PlanBatch::currentBenchmark(void) { ! int benchmarkIndex = iteration%benchmarkNumber(); CBM::Benchmark *B = getBenchmark(benchmarkIndex); --- 497,501 ---- CBM::Benchmark *PlanBatch::currentBenchmark(void) { ! int benchmarkIndex = (iteration*plan->getRunNumber())%benchmarkNumber(); CBM::Benchmark *B = getBenchmark(benchmarkIndex); |
From: Frederic T. <xf...@us...> - 2007-09-10 19:42:45
|
Update of /cvsroot/compbench/CompBenchmarks++/compbenchmarks-plan In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23764 Modified Files: cloptions.cpp Log Message: --run-number added. Index: cloptions.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/compbenchmarks-plan/cloptions.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** cloptions.cpp 10 Sep 2007 16:41:51 -0000 1.10 --- cloptions.cpp 10 Sep 2007 19:42:41 -0000 1.11 *************** *** 53,56 **** --- 53,59 ---- << "Plan management :" << std::endl << " --plan-register <file> [--default] : create file[.xml] plan." << std::endl + << " --run-number <n> : among with --plan-register, " << std::endl + << " defines how many times each" << std::endl + << " benchmark'll be evaluated." << std::endl << " --output-directory <directory> : defines the directory holding results" << std::endl << " for new plan." << std::endl *************** *** 233,236 **** --- 236,240 ---- std::string benchmarkName; std::string outputDirectoryName; + int runNumber = 0; std::string archiveName; *************** *** 253,256 **** --- 257,261 ---- {"plan-use", required_argument, 0, 1003}, {"default", no_argument, 0, 1004}, + {"run-number", required_argument, 0, 1005}, {"batch-register", required_argument, 0, 2001}, *************** *** 328,331 **** --- 333,339 ---- } break; + case 1005: + runNumber=atoi(optarg); + break; case 2001: action=ActionRegisterBatch; *************** *** 421,424 **** --- 429,440 ---- break; case ActionRegisterPlan: + if (runNumber<0) { + std::cerr << "Please specify a valid --run-number <n> (n must be >=1)." << std::endl; + break; + } + if (!runNumber) { + std::cerr << "--run-number <n> don't given. Each benchmark'll be evaluated 3 times" << std::endl; + runNumber=3; + } if (cbmSystem->fileExists(planFileName)) { std::cerr << "File " << planFileName << " exists." << std::endl *************** *** 427,431 **** } P = new CBM::Plan; ! if (outputDirectoryName=="") { std::cerr << "Please, specify an output directory name (see --output-directory)" << std::endl; --- 443,447 ---- } P = new CBM::Plan; ! P->setRunNumber(runNumber); if (outputDirectoryName=="") { std::cerr << "Please, specify an output directory name (see --output-directory)" << std::endl; |
From: Frederic T. <xf...@us...> - 2007-09-10 16:42:29
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv18974 Modified Files: UI-Console.cpp Log Message: Option registration handled. Index: UI-Console.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI-Console.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** UI-Console.cpp 21 Aug 2007 19:54:39 -0000 1.7 --- UI-Console.cpp 10 Sep 2007 16:42:19 -0000 1.8 *************** *** 268,271 **** --- 268,281 ---- break; + case UIMsg::PlanOptionRegister: + curmsg+="Registering option "; + curmsg+=objectField(_msg, "name"); + break; + + case UIMsg::PlanOptionUnregister: + curmsg+="Unregistering option "; + curmsg+=objectField(_msg, "name"); + break; + case UIMsg::PlanBenchmarkRegister: curmsg+="Registering benchmark "; |
From: Frederic T. <xf...@us...> - 2007-09-10 16:41:54
|
Update of /cvsroot/compbench/CompBenchmarks++/compbenchmarks-plan In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv18564 Modified Files: cloptions.cpp Log Message: API changes, due to SF's TID #141918: Plan and incompatible options. Index: cloptions.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/compbenchmarks-plan/cloptions.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** cloptions.cpp 21 Aug 2007 19:45:41 -0000 1.9 --- cloptions.cpp 10 Sep 2007 16:41:51 -0000 1.10 *************** *** 711,715 **** if (!OS) break; ! O=new CBM::CompilerOptions(optionsName, ""); if (OS->add(O)) { storePlan(P, planFileName); --- 711,715 ---- if (!OS) break; ! O=new CBM::CompilerOptions(optionsName); if (OS->add(O)) { storePlan(P, planFileName); *************** *** 805,810 **** O=OS->get(optionsName); if (O) { ! if (O->add(option)) { storePlan(P, planFileName); } delete(O); --- 805,812 ---- O=OS->get(optionsName); if (O) { ! if (O->add(B, option)) { storePlan(P, planFileName); + } else { + cbmUI->outputKO("Operation interrupted; can't add option(s)"); } delete(O); |
From: Frederic T. <xf...@us...> - 2007-09-10 16:41:42
|
Update of /cvsroot/compbench/CompBenchmarks++/compbenchmarks-core In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv18540 Modified Files: cloptions.cpp Log Message: API changes, due to SF's TID #141918: Plan and incompatible options. Index: cloptions.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/compbenchmarks-core/cloptions.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** cloptions.cpp 4 Sep 2007 16:23:19 -0000 1.9 --- cloptions.cpp 10 Sep 2007 16:41:39 -0000 1.10 *************** *** 810,814 **** } ! O=new CBM::CompilerOptions("command-line", options); P=B->Package(); if (P->getStatus()<CBM::Package::Preconfigured) { --- 810,815 ---- } ! O=new CBM::CompilerOptions("command-line"); ! O->add(0, options); // !! no checks! P=B->Package(); if (P->getStatus()<CBM::Package::Preconfigured) { |
From: Frederic T. <xf...@us...> - 2007-09-10 16:40:24
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv18036 Modified Files: Compiler-Options.cpp Compiler-Options.h Log Message: SF's TID #141918: Plan and incompatible options. Index: Compiler-Options.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Options.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Compiler-Options.h 4 Sep 2007 20:02:55 -0000 1.6 --- Compiler-Options.h 10 Sep 2007 16:40:10 -0000 1.7 *************** *** 11,14 **** --- 11,16 ---- #include <Compiler/Compiler-Option.h> + #include <Plan/Plan-Batch.h> + #include <Base/XML.h> *************** *** 31,34 **** --- 33,55 ---- std::string id; + + /** Checks compatibility of an added option. + * + * Returns a string like CBM::Compiler::analyzeOptions() does. + * \parma _batch Batch file (checks for existing options and compiler compatibility) + * \param _option Option to add + * \return String with warning/errors */ + virtual std::string checkCompatibilityInternal(CBM::PlanBatch *_batch, + std::string option); + + /** Checks compatibility of an added option. + * + * Returns a more suitable string. + * \parma _batch Batch file (checks for existing options and compiler compatibility) + * \param _option Option to add + * \return String with warning/errors */ + virtual std::string checkCompatibility(CBM::PlanBatch *_batch, + std::string option); + protected: /** Add an option. *************** *** 46,53 **** /** Add an option. * * \param _option Option to add * \return 1 on success, 0 otherwise */ ! virtual int addSingle(std::string _option); /** Remove an option. --- 67,76 ---- /** Add an option. * + * \parma _batch Batch file (checks for existing options and compiler compatibility) * \param _option Option to add * \return 1 on success, 0 otherwise */ ! virtual int addSingle(CBM::PlanBatch *_batch, ! std::string _option); /** Remove an option. *************** *** 62,69 **** * * \param id Instance's identifier - * \param _options Options to manage in current object */ ! CompilerOptions(std::string id, ! std::string _options = ""); /** Retrieve identifier. --- 85,90 ---- * * \param id Instance's identifier */ ! CompilerOptions(std::string id); /** Retrieve identifier. *************** *** 89,95 **** /** Add a bunch of options * * \param _options Options to add * \return 1 on success, 0 otherwise */ ! virtual int add(std::string _options); /** Remove a bunch of options --- 110,118 ---- /** Add a bunch of options * + * \parma _batch Batch file (checks for existing options and compiler compatibility) * \param _options Options to add * \return 1 on success, 0 otherwise */ ! virtual int add(CBM::PlanBatch *_batch, ! std::string _options); /** Remove a bunch of options Index: Compiler-Options.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Options.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Compiler-Options.cpp 31 Jul 2007 17:23:13 -0000 1.6 --- Compiler-Options.cpp 10 Sep 2007 16:40:10 -0000 1.7 *************** *** 8,20 **** #include <Compiler/Compiler-Options.h> #include <System/System.h> using namespace CBM; ! CompilerOptions::CompilerOptions(std::string _id, ! std::string _options) { id=_id; ! add(_options); } --- 8,91 ---- #include <Compiler/Compiler-Options.h> + #include <Compiler/Compiler.h> + #include <System/System.h> + #include <UI/UI.h> using namespace CBM; ! CompilerOptions::CompilerOptions(std::string _id) { id=_id; ! } ! ! std::string CompilerOptions::checkCompatibilityInternal(CBM::PlanBatch *_batch, ! std::string option) ! { ! int i; ! int n = optionNumber(); ! CBM::Compiler *C; ! std::string cr; ! std::string opts; ! std::string r; ! ! if (!_batch) ! return("1\n"); ! ! for(i=0; i<n; i++) { ! opts+=Option(i)->Option(); ! opts+=" "; ! } ! opts+=option; ! ! n= _batch->compilerNumber(); ! for(i=0; i<n; i++) { ! C=_batch->getCompiler(i); ! cr=C->analyzeOptions(opts); ! if (cr!="1\n") { ! r+=C->Name(); ! r+=": "; ! r+=cr; ! } ! } ! if (r=="") ! r="1\n"; ! ! return(r); ! } ! ! std::string CompilerOptions::checkCompatibility(CBM::PlanBatch *_batch, ! std::string option) ! { ! std::string rin = checkCompatibilityInternal(_batch, option); ! int i = 0; ! std::string o = "!"; ! std::string r; ! int times = 0; ! int ok = 0; ! ! if (rin=="1\n") ! return("1\n"); ! ! ! while (o!="") { ! o=cbmSystem->Split(rin, "\n", i++); ! if (o=="") { ! if ((!times) && (rin!="")) ! o=rin; ! else ! break; ! } ! times++; ! ! if (o=="1") ! ok++; ! else { ! r+=o; ! r+=". "; ! } ! } ! ! return(r); } *************** *** 47,56 **** } ! int CompilerOptions::addSingle(std::string _option) { if (!Option(_option)) { ! add(new CompilerOption(_option)); return(1); } else { return(0); } --- 118,138 ---- } ! int CompilerOptions::addSingle(CBM::PlanBatch *_batch, std::string _option) { + std::string comp; + + cbmUI->msgPlanOptionRegister(_option); if (!Option(_option)) { ! comp=checkCompatibility(_batch, _option); ! if (comp=="1\n") { ! add(new CompilerOption(_option)); ! cbmUI->outputOK(); ! } else { ! cbmUI->outputKO(comp); ! return(0); ! } return(1); } else { + cbmUI->outputKO("Option already presents"); return(0); } *************** *** 96,104 **** } ! int CompilerOptions::add(std::string _options) { std::string o = "!"; int i = 0; int r = 0; if (_options=="") --- 178,187 ---- } ! int CompilerOptions::add(CBM::PlanBatch *_batch, std::string _options) { std::string o = "!"; int i = 0; int r = 0; + int c; if (_options=="") *************** *** 108,117 **** o=cbmSystem->Split(_options, " ", i++); if ((o=="") && (i==1)) { ! r+=addSingle(_options); } if (o!="") { ! r+=addSingle(o); } } return(r); } --- 191,203 ---- o=cbmSystem->Split(_options, " ", i++); if ((o=="") && (i==1)) { ! cbmUI->msgPlanOptionRegister(o); ! c=addSingle(_batch, _options); ! r+=c; } if (o!="") { ! r+=addSingle(_batch, o); } } + return(r); } |
From: Frederic T. <xf...@us...> - 2007-09-09 18:24:17
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv23078 Modified Files: ChangeLog Log Message: Updated for BETA3. Minor correction (english). Index: ChangeLog =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/ChangeLog,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** ChangeLog 26 Aug 2007 19:02:17 -0000 1.25 --- ChangeLog 9 Sep 2007 18:24:14 -0000 1.26 *************** *** 1,2 **** --- 1,7 ---- + 0.5.0-BETA3 + * Updated compbenchmark-core inline documentation. + * Fixes SEGFAULT on inexistant compiler binary given in XML plan file. + * Fixes possible SEGFAULT on compiler/package language(s) cross-checking. + 0.5.0-BETA2 * compbenchmarks-plan introduced to handle plan and *************** *** 14,18 **** * Testsuite added. * Many fixes in benchpplinux and nbench support interfaces. ! * Build method improved, code has been reorganised and API made more clear. * New native Perl API binding to libcompbenchmarks. --- 19,23 ---- * Testsuite added. * Many fixes in benchpplinux and nbench support interfaces. ! * Build method improved, code has been reorganized and API made more clear. * New native Perl API binding to libcompbenchmarks. |
From: Frederic T. <xf...@us...> - 2007-09-09 18:23:34
|
Update of /cvsroot/compbench/CompBenchmarks++ In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv22671 Modified Files: configure.in Log Message: Now BETA3. Index: configure.in =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/configure.in,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** configure.in 28 Aug 2007 19:50:13 -0000 1.38 --- configure.in 9 Sep 2007 18:23:31 -0000 1.39 *************** *** 15,19 **** AC_CANONICAL_TARGET ! AM_INIT_AUTOMAKE(compbenchmarks, 0.5.0-BETA2) AM_CONFIG_HEADER(libcompbenchmarks/config.h) --- 15,19 ---- AC_CANONICAL_TARGET ! AM_INIT_AUTOMAKE(compbenchmarks, 0.5.0-BETA3) AM_CONFIG_HEADER(libcompbenchmarks/config.h) |
From: Frederic T. <xf...@us...> - 2007-09-09 18:21:21
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv21809 Modified Files: UI-Console.h Log Message: For SF's TID #141819 : improving Doxygen documentation. Index: UI-Console.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI-Console.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** UI-Console.h 1 Aug 2007 19:48:38 -0000 1.2 --- UI-Console.h 9 Sep 2007 18:21:19 -0000 1.3 *************** *** 21,37 **** --- 21,72 ---- { private: + /** String for current message. */ std::string curmsg; + /** 1 if last displayed character is a line feed. */ int lastisLF; + /** 1 if a line feed may need to be appended next. */ int lastprogressmayneedLF; + /** Display a line feed. */ virtual void LF(void); protected: + /** Compute depth of a message. + * + * Returns the number of parents of a message + * \param _msg Message instance + * \return Number of parents for given message + */ virtual int depth(UIMsg *_msg); + /** Get flags from a message. + * \param _msg Message instance + * \return Flags for the given message + */ virtual UIMsg::Flags flags(UIMsg *_msg); + + /** Get progress information on a message. + * \param _msg Message instance + * \return Progress (0 to 100.0) + */ virtual float progress(UIMsg *_msg); + + /** Get action from a message. + * \param _msg Message instance + * \return Action for the given message + */ virtual UIMsg::ActionType action(UIMsg *_msg); + + /** Get a field from a message. + * \param _msg Message instance + * \param _field Field to get + * \return Value of field in message + */ virtual std::string objectField(UIMsg *_msg, std::string _field); + + /** Get message's child number. + * \param _msg Message instance + * \return Child number for given message + */ virtual int childNumber(UIMsg *_msg); public: |
Update of /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20562 Modified Files: Benchmark-BENCHPP.cpp Benchmark-BENCHPPLINUX.cpp Benchmark-BZIP2.cpp Benchmark-GZIP.cpp Benchmark-LINPACKC.cpp Benchmark-NBENCH.cpp Benchmark-SCIMARK2.cpp benchmarks-genlibwrapper.pl Makefile.am Removed Files: Benchmark-BENCHPP.libwrapper.h Benchmark-BENCHPPLINUX.libwrapper.h Benchmark-BZIP2.libwrapper.h Benchmark-GZIP.libwrapper.h Benchmark-LINPACKC.libwrapper.h Benchmark-NBENCH.libwrapper.h Benchmark-SCIMARK2.libwrapper.h Log Message: Extension for generated wrapping include files is now .inc - Index: Benchmark-BENCHPP.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPP.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Benchmark-BENCHPP.cpp 17 Apr 2007 18:20:54 -0000 1.8 --- Benchmark-BENCHPP.cpp 6 Sep 2007 17:38:10 -0000 1.9 *************** *** 14,18 **** #include <fstream> ! #include <SupportedBenchmarks/Benchmark-BENCHPP.libwrapper.h> PackageBENCHPP::PackageBENCHPP(CBM::System *_system) --- 14,18 ---- #include <fstream> ! #include <SupportedBenchmarks/Benchmark-BENCHPP.libwrapper.inc> PackageBENCHPP::PackageBENCHPP(CBM::System *_system) --- Benchmark-NBENCH.libwrapper.h DELETED --- Index: Benchmark-NBENCH.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-NBENCH.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Benchmark-NBENCH.cpp 17 Apr 2007 18:20:54 -0000 1.7 --- Benchmark-NBENCH.cpp 6 Sep 2007 17:38:10 -0000 1.8 *************** *** 13,17 **** #include <fstream> ! #include <SupportedBenchmarks/Benchmark-NBENCH.libwrapper.h> using namespace CBM; --- 13,17 ---- #include <fstream> ! #include <SupportedBenchmarks/Benchmark-NBENCH.libwrapper.inc> using namespace CBM; Index: benchmarks-genlibwrapper.pl =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/benchmarks-genlibwrapper.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** benchmarks-genlibwrapper.pl 15 Feb 2007 18:54:10 -0000 1.5 --- benchmarks-genlibwrapper.pl 6 Sep 2007 17:38:10 -0000 1.6 *************** *** 7,11 **** my $BENCHLIST_DIR = $ARGV[1]; ! $PACKAGE=~ s/.+Benchmark-(.*?)\.libwrapper.h/$1/; sub parse { --- 7,11 ---- my $BENCHLIST_DIR = $ARGV[1]; ! $PACKAGE=~ s/.+Benchmark-(.*?)\.libwrapper.inc/$1/; sub parse { --- Benchmark-BENCHPPLINUX.libwrapper.h DELETED --- Index: Benchmark-BZIP2.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BZIP2.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Benchmark-BZIP2.cpp 17 Apr 2007 18:20:54 -0000 1.9 --- Benchmark-BZIP2.cpp 6 Sep 2007 17:38:10 -0000 1.10 *************** *** 14,18 **** #include <fstream> ! #include <SupportedBenchmarks/Benchmark-BZIP2.libwrapper.h> using namespace CBM; --- 14,18 ---- #include <fstream> ! #include <SupportedBenchmarks/Benchmark-BZIP2.libwrapper.inc> using namespace CBM; Index: Benchmark-GZIP.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-GZIP.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Benchmark-GZIP.cpp 17 Apr 2007 18:20:54 -0000 1.9 --- Benchmark-GZIP.cpp 6 Sep 2007 17:38:10 -0000 1.10 *************** *** 14,18 **** #include <config.h> ! #include <SupportedBenchmarks/Benchmark-GZIP.libwrapper.h> #include <Benchmark/Benchmark-DLLoader.h> #include <UI/UI.h> --- 14,18 ---- #include <config.h> ! #include <SupportedBenchmarks/Benchmark-GZIP.libwrapper.inc> #include <Benchmark/Benchmark-DLLoader.h> #include <UI/UI.h> --- Benchmark-SCIMARK2.libwrapper.h DELETED --- --- Benchmark-BENCHPP.libwrapper.h DELETED --- --- Benchmark-LINPACKC.libwrapper.h DELETED --- Index: Makefile.am =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.am 29 Aug 2007 19:34:46 -0000 1.5 --- Makefile.am 6 Sep 2007 17:38:10 -0000 1.6 *************** *** 24,47 **** libcompbenchmarks_bm_linpackc_la_LIBADD = ../libcompbenchmarks/libcompbenchmarks.la ! Benchmark-GZIP.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-GZIP.libwrapper.h ! libcompbenchmarks_bm_gzip_la_SOURCES = Benchmark-GZIP.cpp Benchmark-GZIP.h Benchmark-GZIP.libwrapper.h ! Benchmark-BZIP2.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-BZIP2.libwrapper.h ! libcompbenchmarks_bm_bzip2_la_SOURCES = Benchmark-BZIP2.cpp Benchmark-BZIP2.h Benchmark-BZIP2.libwrapper.h ! Benchmark-NBENCH.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-NBENCH.libwrapper.h ! libcompbenchmarks_bm_nbench_la_SOURCES = Benchmark-NBENCH.cpp Benchmark-NBENCH.h Benchmark-NBENCH.libwrapper.h ! Benchmark-SCIMARK2.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-SCIMARK2.libwrapper.h ! libcompbenchmarks_bm_scimark2_la_SOURCES = Benchmark-SCIMARK2.cpp Benchmark-SCIMARK2.h Benchmark-SCIMARK2.libwrapper.h ! Benchmark-BENCHPP.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-BENCHPP.libwrapper.h ! libcompbenchmarks_bm_benchpp_la_SOURCES = Benchmark-BENCHPP.cpp Benchmark-BENCHPP.h Benchmark-BENCHPP.libwrapper.h ! Benchmark-BENCHPPLINUX.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-BENCHPPLINUX.libwrapper.h ! libcompbenchmarks_bm_benchpplinux_la_SOURCES = Benchmark-BENCHPPLINUX.cpp Benchmark-BENCHPPLINUX.h Benchmark-BENCHPPLINUX.libwrapper.h ! Benchmark-LINPACKC.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-LINPACKC.libwrapper.h ! libcompbenchmarks_bm_linpackc_la_SOURCES = Benchmark-LINPACKC.cpp Benchmark-LINPACKC.h Benchmark-LINPACKC.libwrapper.h INCLUDES = -I $(top_srcdir)/libcompbenchmarks -I $(top_srcdir) --- 24,47 ---- libcompbenchmarks_bm_linpackc_la_LIBADD = ../libcompbenchmarks/libcompbenchmarks.la ! Benchmark-GZIP.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-GZIP.libwrapper.inc ! libcompbenchmarks_bm_gzip_la_SOURCES = Benchmark-GZIP.cpp Benchmark-GZIP.h Benchmark-GZIP.libwrapper.inc ! Benchmark-BZIP2.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-BZIP2.libwrapper.inc ! libcompbenchmarks_bm_bzip2_la_SOURCES = Benchmark-BZIP2.cpp Benchmark-BZIP2.h Benchmark-BZIP2.libwrapper.inc ! Benchmark-NBENCH.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-NBENCH.libwrapper.inc ! libcompbenchmarks_bm_nbench_la_SOURCES = Benchmark-NBENCH.cpp Benchmark-NBENCH.h Benchmark-NBENCH.libwrapper.inc ! Benchmark-SCIMARK2.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-SCIMARK2.libwrapper.inc ! libcompbenchmarks_bm_scimark2_la_SOURCES = Benchmark-SCIMARK2.cpp Benchmark-SCIMARK2.h Benchmark-SCIMARK2.libwrapper.inc ! Benchmark-BENCHPP.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-BENCHPP.libwrapper.inc ! libcompbenchmarks_bm_benchpp_la_SOURCES = Benchmark-BENCHPP.cpp Benchmark-BENCHPP.h Benchmark-BENCHPP.libwrapper.inc ! Benchmark-BENCHPPLINUX.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-BENCHPPLINUX.libwrapper.inc ! libcompbenchmarks_bm_benchpplinux_la_SOURCES = Benchmark-BENCHPPLINUX.cpp Benchmark-BENCHPPLINUX.h Benchmark-BENCHPPLINUX.libwrapper.inc ! Benchmark-LINPACKC.cpp: $(top_srcdir)/SupportedBenchmarks/Benchmark-LINPACKC.libwrapper.inc ! libcompbenchmarks_bm_linpackc_la_SOURCES = Benchmark-LINPACKC.cpp Benchmark-LINPACKC.h Benchmark-LINPACKC.libwrapper.inc INCLUDES = -I $(top_srcdir)/libcompbenchmarks -I $(top_srcdir) *************** *** 52,57 **** EXTRA_DIST = benchmarks-genlibwrapper.pl benchmarks.list ! $(top_srcdir)/SupportedBenchmarks/%.libwrapper.h: $(top_srcdir)/SupportedBenchmarks/benchmarks.list $(CBM_GENLIBWRAPPER) $(CBM_GENLIBWRAPPER) $@ $(top_srcdir)/SupportedBenchmarks > $@ ! clean-all: rm *.libwrapper.h \ No newline at end of file --- 52,57 ---- EXTRA_DIST = benchmarks-genlibwrapper.pl benchmarks.list ! $(top_srcdir)/SupportedBenchmarks/%.libwrapper.inc: $(top_srcdir)/SupportedBenchmarks/benchmarks.list $(CBM_GENLIBWRAPPER) $(CBM_GENLIBWRAPPER) $@ $(top_srcdir)/SupportedBenchmarks > $@ ! clean-all: rm *.libwrapper.inc \ No newline at end of file Index: Benchmark-SCIMARK2.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-SCIMARK2.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Benchmark-SCIMARK2.cpp 6 Jun 2007 16:03:02 -0000 1.9 --- Benchmark-SCIMARK2.cpp 6 Sep 2007 17:38:10 -0000 1.10 *************** *** 12,16 **** #include <config.h> ! #include <SupportedBenchmarks/Benchmark-SCIMARK2.libwrapper.h> using namespace CBM; --- 12,16 ---- #include <config.h> ! #include <SupportedBenchmarks/Benchmark-SCIMARK2.libwrapper.inc> using namespace CBM; --- Benchmark-GZIP.libwrapper.h DELETED --- Index: Benchmark-LINPACKC.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-LINPACKC.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Benchmark-LINPACKC.cpp 17 Apr 2007 18:20:54 -0000 1.11 --- Benchmark-LINPACKC.cpp 6 Sep 2007 17:38:10 -0000 1.12 *************** *** 12,16 **** #include <config.h> ! #include <SupportedBenchmarks/Benchmark-LINPACKC.libwrapper.h> using namespace CBM; --- 12,16 ---- #include <config.h> ! #include <SupportedBenchmarks/Benchmark-LINPACKC.libwrapper.inc> using namespace CBM; Index: Benchmark-BENCHPPLINUX.cpp =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/SupportedBenchmarks/Benchmark-BENCHPPLINUX.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Benchmark-BENCHPPLINUX.cpp 23 May 2007 15:26:53 -0000 1.12 --- Benchmark-BENCHPPLINUX.cpp 6 Sep 2007 17:38:10 -0000 1.13 *************** *** 16,20 **** #include <stdlib.h> ! #include <SupportedBenchmarks/Benchmark-BENCHPPLINUX.libwrapper.h> using namespace CBM; --- 16,20 ---- #include <stdlib.h> ! #include <SupportedBenchmarks/Benchmark-BENCHPPLINUX.libwrapper.inc> using namespace CBM; --- Benchmark-BZIP2.libwrapper.h DELETED --- |
From: Frederic T. <xf...@us...> - 2007-09-06 17:42:58
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv20630 Modified Files: UI.h Log Message: For SF's TID #141819 : improving Doxygen documentation. Index: UI.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** UI.h 6 Sep 2007 17:12:35 -0000 1.15 --- UI.h 6 Sep 2007 17:38:36 -0000 1.16 *************** *** 74,120 **** virtual UIMsg *msgFatal(std::string _text); ! /** \brief Emit a shell command execution information * * \param _shellCommand Shell command to be executed. */ virtual UIMsg *msgShell(std::string _shellCommand); virtual UIMsg *msgCreate(UIMsg::ObjectType _type, std::string _name); virtual UIMsg *msgDownload(std::string _url); virtual UIMsg *msgChecksum(std::string _file); virtual UIMsg *msgExtract(std::string _name); virtual UIMsg *msgPatch(std::string _name); virtual UIMsg *msgPreconfigure(std::string _name); virtual UIMsg *msgConfigure(std::string _info); virtual UIMsg *msgMake(std::string _name); virtual UIMsg *msgTest(std::string _name); virtual UIMsg *msgRelease(std::string _name); virtual UIMsg *msgInstall(std::string _name); virtual UIMsg *msgFetch(std::string _name); virtual UIMsg *msgUninstall(std::string _name); virtual UIMsg *msgBench(std::string _name); virtual UIMsg *msgGroup(std::string _name); virtual UIMsg *msgPlanRegister(std::string _file, int _default); virtual UIMsg *msgPlanRestore(std::string _name); virtual UIMsg *msgPlanUnregister(std::string _name); virtual UIMsg *msgPlanBatchRegister(std::string _name); virtual UIMsg *msgPlanBatchUnregister(std::string _name); virtual UIMsg *msgPlanCompilerRegister(std::string _name); virtual UIMsg *msgPlanCompilerUnregister(std::string _name); virtual UIMsg *msgPlanOptionsetRegister(std::string _name); virtual UIMsg *msgPlanOptionsetUnregister(std::string _name); virtual UIMsg *msgPlanOptionsRegister(std::string _name); virtual UIMsg *msgPlanOptionsUnregister(std::string _name); virtual UIMsg *msgPlanOptionRegister(std::string _name); virtual UIMsg *msgPlanOptionUnregister(std::string _name); virtual UIMsg *msgPlanBenchmarkRegister(std::string _name); virtual UIMsg *msgPlanBenchmarkUnregister(std::string _name); virtual UIMsg *msgPlanRun(std::string _name); virtual UIMsg *outputInfo(std::string _text); virtual UIMsg *outputInfo(CBM::Result *_r); virtual UIMsg *Progress(float _pc); --- 74,324 ---- virtual UIMsg *msgFatal(std::string _text); ! /** Emit a shell command execution information * * \param _shellCommand Shell command to be executed. + * \return Created message */ virtual UIMsg *msgShell(std::string _shellCommand); + + /** Emit a object creation message + * + * \param _type Object type + * \param _name Created object name + * \return Created message + */ virtual UIMsg *msgCreate(UIMsg::ObjectType _type, std::string _name); + + /** Emit a download message + * + * \param _url URL to be downloaded + * \return Created message + */ virtual UIMsg *msgDownload(std::string _url); + + /** Emit a checksum message + * + * \param _file File to be checksumed + * \return Created message + */ virtual UIMsg *msgChecksum(std::string _file); + + /** Emit an object extraction message + * + * \param _name Object (file) to be extracted + * \return Created message + */ virtual UIMsg *msgExtract(std::string _name); + + /** Emit a patch message + * + * \param _name Object (file) to be patched + * \return Created message + */ virtual UIMsg *msgPatch(std::string _name); + + /** Emit a preconfiguration message + * + * \param _name Package to be preconfigured + * \return Created message + */ virtual UIMsg *msgPreconfigure(std::string _name); + + /** Emit a configuration message + * + * \param _info Package to be configured + * \return Created message + */ virtual UIMsg *msgConfigure(std::string _info); + + /** Emit a build message + * + * \param _name Package to be built + * \return Created message + */ virtual UIMsg *msgMake(std::string _name); + + /** Emit a testing message + * + * \param _name Package to be tested + * \return Created message + */ virtual UIMsg *msgTest(std::string _name); + + /** Emit a releasing message + * + * \param _name Package to be released + * \return Created message + */ virtual UIMsg *msgRelease(std::string _name); + + /** Emit an installation message + * + * \param _name Package to be installed + * \return Created message + */ virtual UIMsg *msgInstall(std::string _name); + + /** Emit an fetch message + * + * \param _name Package to be fetched + * \return Created message + */ virtual UIMsg *msgFetch(std::string _name); + + /** Emit an uninstallation message + * + * \param _name Package to be uninstalled + * \return Created message + */ virtual UIMsg *msgUninstall(std::string _name); + + /** Emit an benchmarking message + * + * \param _name Benchmark to be evaluated + * \return Created message + */ virtual UIMsg *msgBench(std::string _name); + + /** Emit a group message + * + * This allows grouping some child messages together (at a same + * depth). + * \param _name Group's name + * \return Created message + */ virtual UIMsg *msgGroup(std::string _name); + /** Emit a plan registration message + * + * \param _file Plan file to be registered + * \param _default Whether the plan is to be the default or not + * \return Created message + */ virtual UIMsg *msgPlanRegister(std::string _file, int _default); + + /** Emit a plan restoration message + * + * \param _name Plan file to be read + * \return Created message + */ virtual UIMsg *msgPlanRestore(std::string _name); + + /** Emit a plan unregistration message + * + * \param _name Plan file to be unregistered + * \return Created message + */ virtual UIMsg *msgPlanUnregister(std::string _name); + + /** Emit a batch registration message + * + * \param _name Batch to be registered + * \return Created message + */ virtual UIMsg *msgPlanBatchRegister(std::string _name); + + /** Emit a batch unregistration message + * + * \param _name Batch to be unregistered + * \return Created message + */ virtual UIMsg *msgPlanBatchUnregister(std::string _name); + + /** Emit a compiler registration message + * + * \param _name Compiler to be registered + * \return Created message + */ virtual UIMsg *msgPlanCompilerRegister(std::string _name); + + /** Emit a compiler unregistration message + * + * \param _name Compiler to be unregistered + * \return Created message + */ virtual UIMsg *msgPlanCompilerUnregister(std::string _name); + + /** Emit an option set registration message + * + * \param _name Option set to be registered + * \return Created message + */ virtual UIMsg *msgPlanOptionsetRegister(std::string _name); + + /** Emit an option set unregistration message + * + * \param _name Option set to be unregistered + * \return Created message + */ virtual UIMsg *msgPlanOptionsetUnregister(std::string _name); + + /** Emit a registration message for a set of options + * + * \param _name Options to be registered + * \return Created message + */ virtual UIMsg *msgPlanOptionsRegister(std::string _name); + + /** Emit an unregistration message for a set of options + * + * \param _name Options to be unregistered + * \return Created message + */ virtual UIMsg *msgPlanOptionsUnregister(std::string _name); + + /** Emit an option registration message + * + * \param _name Option to be registered + * \return Created message + */ virtual UIMsg *msgPlanOptionRegister(std::string _name); + + /** Emit an option unregistration message. + * + * \param _name Option to be unregistered + * \return Created message + */ virtual UIMsg *msgPlanOptionUnregister(std::string _name); + + /** Emit a benchmark registration message. + * + * \param _name Benchmark to be registered + * \return Created message + */ virtual UIMsg *msgPlanBenchmarkRegister(std::string _name); + + /** Emit a benchmark unregistration message. + * + * \param _name Benchmark to be unregistered + * \return Created message + */ virtual UIMsg *msgPlanBenchmarkUnregister(std::string _name); + + /** Emit a running message for a plan evaluation. + * + * \param _name Plan to be ran + * \return Created message + */ virtual UIMsg *msgPlanRun(std::string _name); + /** Append text to current message's output + * \param _text Text to append + * \return Pointer on current message + */ virtual UIMsg *outputInfo(std::string _text); + + /** Append a benchmark's result to current message's output + * \param _r Result to be appended. + * \return Pointer on current message + */ virtual UIMsg *outputInfo(CBM::Result *_r); + /** Update current progress for a message. + * \param _pc Progress percent (from 0 to 100.0) + * \return Pointer on current message + * \sa Flags + */ virtual UIMsg *Progress(float _pc); *************** *** 131,136 **** --- 335,351 ---- virtual UIMsg *outputKO(std::string _test = ""); + /** UI end method to display a message. + * \param _msg Message to display + */ virtual void Display(UIMsg *_msg) = 0; + + /** UI end method to display advancement on a message + * \param _msg Concerned message + */ virtual void DisplayProgressUpdate(UIMsg *_msg) = 0; + + /** UI end method to close a message + * \param _msg Concerned message (0, default, is current) + */ virtual void DisplayDone(UIMsg *_msg) = 0; |
From: Frederic T. <xf...@us...> - 2007-09-06 17:15:53
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv4393 Modified Files: System-Cygwin.h System-FreeBSD.h System.h System-Linux.h System-Unix.h Log Message: For SF's TID #141819 : improving Doxygen documentation. Index: System-Linux.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System-Linux.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** System-Linux.h 25 Jan 2007 15:38:49 -0000 1.2 --- System-Linux.h 6 Sep 2007 16:57:54 -0000 1.3 *************** *** 22,26 **** protected: public: - /** Constructor */ SystemLinux(std::string _filename = ""); --- 22,25 ---- Index: System-FreeBSD.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System-FreeBSD.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** System-FreeBSD.h 25 Jan 2007 15:38:49 -0000 1.2 --- System-FreeBSD.h 6 Sep 2007 16:57:54 -0000 1.3 *************** *** 22,26 **** protected: public: - /** Constructor */ SystemFreeBSD(std::string _filename = ""); --- 22,25 ---- Index: System-Unix.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System-Unix.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** System-Unix.h 25 Jan 2007 15:38:49 -0000 1.2 --- System-Unix.h 6 Sep 2007 16:57:54 -0000 1.3 *************** *** 30,34 **** public: - /** Constructor. */ SystemUnix(std::string _filename = ""); --- 30,33 ---- Index: System-Cygwin.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System-Cygwin.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** System-Cygwin.h 25 Jan 2007 15:38:49 -0000 1.2 --- System-Cygwin.h 6 Sep 2007 16:57:54 -0000 1.3 *************** *** 21,28 **** { private: std::string cache; protected: public: - /** Constructor */ SystemCygwin(std::string _filename = ""); --- 21,28 ---- { private: + /** Internal dummy variable */ std::string cache; protected: public: SystemCygwin(std::string _filename = ""); Index: System.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/System/System.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** System.h 20 Aug 2007 17:07:43 -0000 1.11 --- System.h 6 Sep 2007 16:57:54 -0000 1.12 *************** *** 29,34 **** --- 29,36 ---- { protected: + /** Internal (XML based) configuration. */ class Config *configuration; + /** Configuration filename. */ std::string configurationFile; *************** *** 71,81 **** */ virtual std::string exec0(std::string& command); virtual std::string exec0(char *command); /** Checks a given directory. ! Directory is given according to its purpose in CompBenchmarks. ! \sa Temp ! \sa checkDirectory() ! \return 1 if ok. */ virtual int CheckDirectory(Dir where); --- 73,91 ---- */ virtual std::string exec0(std::string& command); + /** External command execution. + * Uses shell to execute command. + * \param command shell command to execute + * \return stdout dump + * \sa exec() + */ virtual std::string exec0(char *command); /** Checks a given directory. ! * ! * Directory is given according to its purpose in CompBenchmarks. ! * \param where Directory function ! * \sa Temp ! * \sa checkDirectory() ! * \return 1 if ok. */ virtual int CheckDirectory(Dir where); *************** *** 144,149 **** virtual std::string arch(void); ! /** Give a list containing the compatible benchmarks ! * in declared directories. * \return a std::string list of benchmarks (id) * \sa Package() */ --- 154,163 ---- virtual std::string arch(void); ! /** Give a list containing the compatible benchmarks. ! * ! * Check only in declared directories. ! * ! * \param _force Do the stuff, even action is marked as already done. ! * * \return a std::string list of benchmarks (id) * \sa Package() */ *************** *** 156,159 **** --- 170,175 ---- /** Get a package according to its index + * + * \param index Package index * \return Package instance * \sa packageNumber() |
From: Frederic T. <xf...@us...> - 2007-09-06 17:12:43
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv10350 Modified Files: UI.h UI-Msg.h Log Message: For SF's TID #141819 : improving Doxygen documentation. Index: UI.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** UI.h 24 Aug 2007 21:52:21 -0000 1.14 --- UI.h 6 Sep 2007 17:12:35 -0000 1.15 *************** *** 45,48 **** --- 45,50 ---- * Finally, it calls Display to report message to user interface. * + * \param _msg message to be posted + * * \sa mui * \sa current *************** *** 117,122 **** virtual UIMsg *Progress(float _pc); ! /** Call childDone() */ virtual UIMsg *outputOK(std::string _test = ""); virtual UIMsg *outputKO(std::string _test = ""); --- 119,132 ---- virtual UIMsg *Progress(float _pc); ! /** Set current message's output to OK. ! * \param _test More detailed information ! * \return Pointer on current message ! */ virtual UIMsg *outputOK(std::string _test = ""); + + /** Set current message's output to KO. + * \param _test More detailed information + * \return Pointer on current message + */ virtual UIMsg *outputKO(std::string _test = ""); Index: UI-Msg.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/UI/UI-Msg.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** UI-Msg.h 21 Aug 2007 19:52:50 -0000 1.7 --- UI-Msg.h 6 Sep 2007 17:12:35 -0000 1.8 *************** *** 12,66 **** #include <Base/XML.h> - /* - <msg timestamp="..." flags="[No]Progress> - <object type="4" name="file.tar.gz"/> - <action type="4"/> - <output> - <text status="info">Blah</text> - <text status="ok"/> - </output> - <progress [value="4"]> - <childs/> - </msg> - */ namespace CBM { class UIMsg : public XMLNode { public: typedef enum Flags { ! NoProgress, ! Progress }; typedef enum Status { ! KO, OK, Info }; typedef enum ObjectType { ! UndefObject, ! Shell, File, Directory, Package, Benchmark, Compiler }; typedef enum ActionType { ! UndefAction, ! ShellCommand, ! FatalError, ! Group, ! Create, Read, Write, Remove, Checksum, ! PackageInstall, PackageUninstall, ! PackageFetch, ! PackageDownload, PackageExtract, PackagePatch, PackagePreconfigure, ! PackageConfigure, ! PackageMake, PackageTest, PackageClean, ! BenchmarkBench, BenchmarkResult, ! CompilerAutodetect, ! PlanRegister, PlanRestore, PlanUnregister, ! PlanBatchRegister, PlanBatchUnregister, ! PlanCompilerRegister, PlanCompilerUnregister, ! PlanOptionsetRegister, PlanOptionsetUnregister, ! PlanOptionsRegister, PlanOptionsUnregister, ! PlanOptionRegister, PlanOptionUnregister, ! PlanBenchmarkRegister, PlanBenchmarkUnregister, ! PlanRun }; --- 12,94 ---- #include <Base/XML.h> namespace CBM { + /** \brief Basic message + * + * Define a (UI) message based on XML. + */ + class UIMsg : public XMLNode { public: + /** Flags for message */ typedef enum Flags { ! NoProgress, /*!< Standard message */ ! Progress /*!< Message with progress (percentage) information associated */ }; + /** Message (output) status */ typedef enum Status { ! KO, /*!< Message (associated action) ended correctly */ ! OK, /*!< Message (associated action) terminated with an error */ ! Info /*!< Informative text appended to output. Message is not "closed" */ }; + /** Object types for message's actors */ typedef enum ObjectType { ! UndefObject, /*!< Not specified actor */ ! Shell, /*!< Message concerns a shell command */ ! File, /*!< Message concerns a file */ ! Directory, /*!< Message concerns a directory */ ! Package, /*!< Message concerns a package */ ! Benchmark, /*!< Message concerns a benchmark */ ! Compiler /*!< Message concerns a compiler */ }; + /** Action described by message */ typedef enum ActionType { ! UndefAction, /*<! Undefined action */ ! ShellCommand, /*<! Action is a shell command */ ! FatalError, /*<! Fatal error occured */ ! Group, /*<! Defines a group of actions */ ! ! Create, /*<! Object is being created */ ! Read, /*<! Object is being read */ ! Write, /*<! Object is being wrote */ ! Remove, /*<! Object is being removed */ ! Checksum, /*<! Object (file) is being checksumed */ ! ! PackageInstall, /*<! Package installation */ ! PackageUninstall, /*<! Package removing */ ! PackageFetch, /*<! Package is being fetched */ ! PackageDownload, /*<! Package is being downloaded */ ! PackageExtract, /*<! Package is being extracted */ ! PackagePatch, /*<! Package is being fetched */ ! PackagePreconfigure, /*<! Package is being pre-configured */ ! PackageConfigure, /*<! Package is being configured */ ! PackageMake, /*<! Package is being built */ ! PackageTest, /*<! Package is being tested */ ! PackageClean, /*<! Package is being cleaned */ ! ! BenchmarkBench, /*<! Benchmark is being evaluated */ ! BenchmarkResult, /*<! Benchmark result */ ! ! CompilerAutodetect, /*<! Compiler auto-detection asked */ ! ! PlanRegister, /*<! Plan is being registered */ ! PlanRestore, /*<! Plan is being restored (from file) */ ! PlanUnregister, /*<! Plan is being unregistered */ ! PlanBatchRegister, /*<! Batch is being registered */ ! PlanBatchUnregister, /*<! Batch is being unregistered */ ! PlanCompilerRegister, /*<! Compiler is being registered */ ! PlanCompilerUnregister, /*<! Compiler is being unregistered */ ! PlanOptionsetRegister, /*<! Option set is being registered */ ! PlanOptionsetUnregister, /*<! Option set is being unregistered */ ! PlanOptionsRegister, /*<! Options are being registered */ ! PlanOptionsUnregister, /*<! Options are being unregistered */ ! PlanOptionRegister, /*<! Option is being registered */ ! PlanOptionUnregister, /*<! Option is being unregistered */ ! PlanBenchmarkRegister, /*<! Benchmark is being registered */ ! PlanBenchmarkUnregister, /*<! Benchmark is being unregistered */ ! PlanRun /*<! Plan is being ran */ }; |
From: Frederic T. <xf...@us...> - 2007-09-06 16:56:02
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv2053 Modified Files: Compiler.h Compiler-OptionSet.h Log Message: For SF's TID #141819 : improving Doxygen documentation. Index: Compiler.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Compiler.h 4 Sep 2007 19:45:50 -0000 1.14 --- Compiler.h 6 Sep 2007 16:51:27 -0000 1.15 *************** *** 29,37 **** ! typedef struct CompilerOptionLogicVar { ! std::string id; ! std::string value; ! std::string lastWriter; }; --- 29,49 ---- ! /** Internal compiler variable. ! * ! * Such a variable is used to store a id/value pair and associate it to ! * a writer. Both id and writer can be a compiler option identifier (eg. ! * maybe O2 for -O2 GCC's option. ! * ! * A list of CompilerOptionLogicVar is used to represents an option ! * evaluation context, for instance to warn about incompatible options. ! * ! * \sa CBM::Compiler::colVariables ! * \sa CBM::CompilerDescriptions ! */ typedef struct CompilerOptionLogicVar { ! std::string id; /*!< Variable's identifier */ ! std::string value; /*!< Variable's value */ ! std::string lastWriter; /*!< Object identifier (or variable's) that has ! * modified current variable last time */ }; *************** *** 43,71 **** { private: ! /** Internal usage * Speeds up compilerName(). */ std::string cacheCompilerName; ! /** Internal usage * Speeds up Version(). */ std::string cacheCompilerVersion; ! /** Internal usage ! * Speeds up VanillaVersion(). */ std::string cacheCompilerVanillaVersion; ! /** Internal usage * Cache used to get supported compilers version (e.g. 2.95.x, 4.1.x an so * on, for GCC). */ std::vector<std::string> supportedVersionDirectories; int supportedVersionInitialized; std::vector<CompilerOptionLogicVar*> colVariables; std::vector<std::string> colOptions; CBM_COD *cacheOptionDescriptions; --- 55,119 ---- { private: ! /** Compiler name ! * ! * Cached string. ! * * Speeds up compilerName(). + * \sa compilerName(); */ std::string cacheCompilerName; ! /** Complete compiler's version. ! * * Speeds up Version(). + * \sa CompilerVersion() + * \sa VanillaVersion() */ std::string cacheCompilerVersion; ! /** Short compiler's version. ! * ! * e.g., simple string like 3.3.0. ! * ! * Speeds up VanillaVersion() ! * ! * \sa VanillaVersion() ! * \sa CompilerVersion() */ std::string cacheCompilerVanillaVersion; ! /** List of supported versions for current compiler (familly) ! * * Cache used to get supported compilers version (e.g. 2.95.x, 4.1.x an so * on, for GCC). */ std::vector<std::string> supportedVersionDirectories; + + /** Initialization flag for version cache + * + * Set to 1 if the version related variables has been cached, + * 0 otherwise. + * + * \sa VanillaVersion() + * \sa CompilerVersion() + */ int supportedVersionInitialized; + /** Internal variables to analyze options. + * + * \sa analyzeOptions() + */ std::vector<CompilerOptionLogicVar*> colVariables; + + /** Internal variables to analyze options. + * + * Keep used options. + * + * \sa analyzeOptions() + */ std::vector<std::string> colOptions; + /** Options' descriptions. + */ CBM_COD *cacheOptionDescriptions; *************** *** 75,116 **** /** Initialised by constructor. ! \sa Compiler() */ std::string compilerBinary; ! /** Constructor ! \param _system the System to use internaly. ! \param _compilerBinary absolute or relative path to the compiler program */ Compiler(class System *_system, std::string _compilerBinary); ! /** Gets compiler's name * \return std::string containing the name of the compiler * \sa getCompilerName() */ virtual std::string getCompilerName(void) = 0; ! /** Gets compiler's version * \return std::string containing the version of the compiler * \sa Version() ! * \sa getVanillaVersion() */ virtual std::string getCompilerVersion(void) = 0; ! /** Gets vanilla version * Removes extra characters from getCompilerVersion() and just keeps ! * something like <M>.<m>.<p> or <M>.<m> * \return 'Simplified' version * \sa Version() */ virtual std::string getCompilerVanillaVersion(void) = 0; ! virtual void supportedVersionAddUnique(std::string _version); virtual void supportedVersions(std::string baseDir); ! /** Detects supported versions * Uses XML file and KB directories to initialize supportedVersions */ virtual void supportedVersions(void); virtual void colDestroy(void); --- 123,197 ---- /** Initialised by constructor. ! * ! * \sa Compiler() */ std::string compilerBinary; ! /** Constructor. ! * ! * \param _system the System to use internaly. ! * \param _compilerBinary absolute or relative path to the compiler program */ Compiler(class System *_system, std::string _compilerBinary); ! /** Gets compiler's name. ! * * \return std::string containing the name of the compiler * \sa getCompilerName() */ virtual std::string getCompilerName(void) = 0; ! /** Gets compiler's version. ! * * \return std::string containing the version of the compiler * \sa Version() ! * \sa VanillaVersion() ! * \sa getCompilerVersion() */ virtual std::string getCompilerVersion(void) = 0; ! /** Gets vanilla version. ! * * Removes extra characters from getCompilerVersion() and just keeps ! * something like Major.minor.patch or Major.minor * \return 'Simplified' version + * + * \sa VanillaVersion() + * \sa getVanillaVersion() * \sa Version() */ virtual std::string getCompilerVanillaVersion(void) = 0; ! /** Updates supported versions. ! * ! * Add a new supported version to supportedVersionDirectories. Do nothing ! * if the given version was known. ! * ! * \param _version Vanilla version supported. ! * ! * \sa supportedVersionDirectories */ virtual void supportedVersionAddUnique(std::string _version); + /** Initialize supported versions. + * + * Uses supportedVersionAddUnique() to feed supportedVersionDirectories + * list with compiler's versions that have specific directories containing + * XML option descriptions. Directories have same name as vanilla version, + * and this is only done for compiler of the same familly as the + * current compiler's familly. + * + * \param baseDir Base directory where to look for. + * + * \sa supportedVersionAddUnique() */ virtual void supportedVersions(std::string baseDir); ! /** Detects supported versions. ! * * Uses XML file and KB directories to initialize supportedVersions */ virtual void supportedVersions(void); + /** Destroy internal variables. + * + * \sa colVariables + * \sa colOptions + */ virtual void colDestroy(void); *************** *** 118,153 **** /** Internal compiler id. ! \return std::string like 'gcc' or 'g++'. ! */ virtual std::string compiler(void) = 0; /** Gets compiler's name. Do not overload. ! \sa getCompilerName() ! \return The compiler name. */ virtual std::string Name(void); ! /** Gets compiler's version. Do not overload. ! \sa getCompilerVersion() ! \return The compiler version. */ virtual std::string Version(void); virtual std::string VanillaVersion(void); /** Gets compiler's program (as specified in constructor). ! \return The compiler program (absolute or relative, depending on method used in instanciation). */ virtual std::string Binary(void); /** Gets compiler's language. ! \return C or C++. */ virtual std::string Language(void) = 0; /** Virtual destructor */ ! virtual std::string relativeDescriptionDirectory(void); ! /** Return (supported) option descriptions ! \return Option descriptions */ virtual CBM_COD *OptionDescriptions(void); virtual CompilerOptionLogicVar* colVarGet(std::string _id); --- 199,256 ---- /** Internal compiler id. ! * ! * \return std::string like 'gcc' or 'g++'. ! */ virtual std::string compiler(void) = 0; + /** Gets compiler's name. Do not overload. ! * ! * \sa getCompilerName() ! * \return The compiler name. */ virtual std::string Name(void); ! /** Gets compiler's full version string. Do not overload. ! * ! * \sa getCompilerVersion() ! * \return The compiler version. */ virtual std::string Version(void); + /** Gets compiler's short version. Do not overload. + * + * \sa getCompilerVersion() + * \return The compiler vanilla version. */ virtual std::string VanillaVersion(void); /** Gets compiler's program (as specified in constructor). ! * ! * \return The compiler program (absolute or relative, depending on method used in instanciation). */ virtual std::string Binary(void); /** Gets compiler's language. ! * ! * \return C or C++ (as this time) */ virtual std::string Language(void) = 0; /** Virtual destructor */ ! /** Get closest option descriptions' directory. ! * ! * This method tries to get the closest relevant match for the current vanilla ! * version of the used compiler. ! * ! * \return Directory (absolute path) ! */ virtual std::string relativeDescriptionDirectory(void); ! /** Return (supported) option descriptions. ! * ! * \return Option descriptions */ virtual CBM_COD *OptionDescriptions(void); + /** Get value of an internal variable + * + * \param _id Variable's identifier + * \return Variable's structure pointer + */ virtual CompilerOptionLogicVar* colVarGet(std::string _id); Index: Compiler-OptionSet.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-OptionSet.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Compiler-OptionSet.h 4 Sep 2007 20:02:55 -0000 1.3 --- Compiler-OptionSet.h 6 Sep 2007 16:51:27 -0000 1.4 *************** *** 50,54 **** /** Retrives identifer. ! * \param Internal instance's identifier */ virtual std::string Id(void); --- 50,55 ---- /** Retrives identifer. ! * ! * \return Internal instance's identifier */ virtual std::string Id(void); |
From: Frederic T. <xf...@us...> - 2007-09-06 16:55:41
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Plan In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv2069 Modified Files: Plan-Batch.h Plan.h Log Message: For SF's TID #141819 : improving Doxygen documentation. Index: Plan.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Plan/Plan.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Plan.h 21 Aug 2007 19:49:09 -0000 1.10 --- Plan.h 6 Sep 2007 16:51:40 -0000 1.11 *************** *** 36,95 **** namespace CBM { /** \brief Configure and run benchmarks within specified contexts. * This class manage sets of benchmarks, compiler options and compilers ! * to evaluate performances in a convenient way. */ class Plan { protected: std::vector<CBM_PB*> planBatch; /** Current iteration. * This value represents the index of the current benchmarking evaluation ! * !!! */ int iteration; std::string filename; std::string outputDirectory; int hostCopied; int planCopied; int compilerCopied; virtual CBM_PB *batchForIteration(int *it_in_plan); public: Plan(); virtual int setOutputDirectory(std::string _outputDirectory); virtual std::string getOutputDirectory(void); virtual int outputDirectoryAdd(CBM::Result *_result); virtual int outputDirectoryCopyHost(void); virtual int outputDirectoryCopyPlan(void); virtual int outputDirectoryCopyCompilers(void); virtual CBM_PB *addBatch(CBM_PB *_ps); virtual int removeBatch(CBM_PB *_ps); virtual int removeBatch(std::string _id); virtual int batchNumber(void); virtual CBM_PB *getBatch(std::string _id); - virtual CBM_PB *getBatch(int i); virtual int totalIterations(void); virtual int currentIteration(void); virtual class Compiler* currentCompiler(void); virtual CBM_OP *currentCompilerOptions(void); virtual class Benchmark *currentBenchmark(void); ! /** 0 means end. */ virtual int nextIteration(int simule = 0); virtual void stop(void); class XMLNode *XML(void); virtual void reset(void); virtual int store(std::string _filename = "", int _keepFilename=1); virtual int restore(std::string _filename); virtual ~Plan(); }; --- 36,263 ---- namespace CBM { /** \brief Configure and run benchmarks within specified contexts. + * * This class manage sets of benchmarks, compiler options and compilers ! * to evaluate performances in a convenient way. ! * ! * All theses parameters are owned by CBM::PlanBatch instances. ! */ class Plan { protected: + /** List of active CBM::PlanBatch instances. + * \sa iteration + * \sa batchForIteration() */ std::vector<CBM_PB*> planBatch; /** Current iteration. * This value represents the index of the current benchmarking evaluation ! * for the whole Plan. ! * ! * See CBM::PlanBatch::iteration */ int iteration; + + /** XML Filename for current plan object. */ std::string filename; + /** XML output directory for benchmarking results. */ std::string outputDirectory; + + /** 1 if host information XML file has been generated in outputDirectory, + * 0 otherwise. */ int hostCopied; + + /** 1 if plan XML file has been generated in outputDirectory, + * 0 otherwise. */ int planCopied; + + /** 1 if compiler description XML files have been generated in + * outputDirectory, 0 otherwise. */ int compilerCopied; + /** Get batch and its interal iteration index. + * + * Method uses iteration variable to do so. + * \param it_in_plan Pointer to integer variable that'll contain batch iteration + * \return Batch on which the it_in_plan has to be applied on + */ virtual CBM_PB *batchForIteration(int *it_in_plan); public: + /** Constructor */ Plan(); + /** Define output directory. + * + * Output directory keeps plan, compilers and host parameters. It also + * contains all XML result files for benchmarks. + * + * \param _outputDirectory Directory to use (can be created) + * \return 1 on success, 0 otherwise + * \sa getOutputDirectory() */ virtual int setOutputDirectory(std::string _outputDirectory); + + /** Get output directory. + * + * \return Output directory defined or previously stored. + * \sa setOuputDirectory + * \sa outputDirectory */ virtual std::string getOutputDirectory(void); + + /** Store a result object on disk. + * + * Stores a XML representation of a benchmark evaluation in the + * output directory. + * + * \param _result Result to store + * \return 1 on success, 0 otherwise + * \sa outputDirectory + */ virtual int outputDirectoryAdd(CBM::Result *_result); + + /** Copy host information to output directory. + * + * First check for file presence, then copy file (host representation). + * + * \return 1 on success, 0 otherwise + */ virtual int outputDirectoryCopyHost(void); + + /** Copy plan information to output directory. + * + * Duplicates plan information into output directory (plan information + * XML file is not supposed to be in output directory; thus copying it + * allows to have whole plan information going together with, for + * instance, XML files describing benchmark results. + * + * \return 1 on success, 0 otherwise + */ virtual int outputDirectoryCopyPlan(void); + + /** Copy compilers' information to output directory. + * + * First check for file presence, then copy file (compilers' XML + * representation). + * + * \return 1 on success, 0 otherwise + */ virtual int outputDirectoryCopyCompilers(void); + /** Add a batch. + * + * \param _ps Batch to add in current plan + * \return Pointer to added batch + */ virtual CBM_PB *addBatch(CBM_PB *_ps); + + /** Remove a batch. + * + * \param _ps Batch to remove from current plan + * \return 1 on success, 0 otherwise + * \sa batchNumber() + * \sa removeBatch(std::string) + */ virtual int removeBatch(CBM_PB *_ps); + + /** Remove a batch by its identifier + * + * \param _id Identifier of batch to remove from current plan + * \return 1 on success, 0 otherwise + */ virtual int removeBatch(std::string _id); + + /** Get batch number + * \return Number of batchs defined. + * \sa getBatch() + */ virtual int batchNumber(void); + /** Get a batch by its identifier. + * \param _id Batch's identifier + * \return Wanted batch object + */ virtual CBM_PB *getBatch(std::string _id); + /** Get a batch by its index + * \param i Batch's index + * \return Wanted batch object + * \sa batchNumber + */ + virtual CBM_PB *getBatch(int i); + /** Get total iterations for plan + * \return Number of total iterations + * \sa iteration */ virtual int totalIterations(void); + /** Get current iteration index + * \return Current iteration + * \sa iteration + */ virtual int currentIteration(void); + + + /** Get current compiler + * \return Current compiler + * \sa iteration + */ virtual class Compiler* currentCompiler(void); + + /** Get current options + * \return Current options + * \sa iteration + */ virtual CBM_OP *currentCompilerOptions(void); + + /** Get current benchmark + * \return Current benchmark + * \sa iteration + */ virtual class Benchmark *currentBenchmark(void); ! /** Run an iteration. ! * ! * This method try to benchmark current compiler with current options, ! * and current benchmark. ! * ! * \param simule Just display context, don't launch benchmarking. ! * ! * \sa CBM::PlanBatch::currentIteration() ! * \return 0 if we've reach the end of the batch, 1 otherwise */ virtual int nextIteration(int simule = 0); + /** Stop plan. + * + * \sa CBM::PlanBatch::stop() + */ virtual void stop(void); + /** Get XML representation + * \return XML plan representation */ class XMLNode *XML(void); + /** Reset plan. + * + * Reset all internal contexts, all call reset() method of each + * defined batch. + * + * \sa CBM::PlanBatch::reset() + */ virtual void reset(void); + + /** Save context (as XML) + * \param _filename File to use, leave empty for default (previous) + * \param _keepFilename 1 (defaults) to keep the previous name, 0 otherwise + * \return 1 on success, 0 otherwise + * \sa restore() + */ virtual int store(std::string _filename = "", int _keepFilename=1); + + /** Restore context (from XML file) + * \param _filename File to use for reading plan parameters + * \return 1 on success, 0 otherwise + * \sa store(std::string, int) + */ virtual int restore(std::string _filename); + /** Destructor */ virtual ~Plan(); }; Index: Plan-Batch.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Plan/Plan-Batch.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Plan-Batch.h 1 Aug 2007 19:45:21 -0000 1.5 --- Plan-Batch.h 6 Sep 2007 16:51:40 -0000 1.6 *************** *** 52,126 **** /** Current iteration. * This value represents the index of the current benchmarking evaluation ! * !!! */ int iteration; virtual int isUnique(class Compiler *_compiler); ! /** languages */ virtual int isLanguageCompatibleWithCompilers(std::string _lang); virtual int isLanguageCompatibleWithBenchmarks(std::string _lang); virtual int isUnique(CBM_OS *_set); virtual int isUnique(class Benchmark *_benchmark); virtual void restoreBenchmarks(class XMLNode *_benchmarksNode); virtual void restoreCompilerOptionSet(class XMLNode *_cosNode); virtual void restoreCompilers(class XMLNode *_compilersNode); public: ! PlanBatch(CBM::Plan *_plan, std::string _id); virtual std::string Id(void); virtual void setId(std::string _id); virtual int add(class Compiler *_compiler); virtual int add(CBM_OS *_set); virtual CBM_OP *addOptions(CBM_OS *_set, std::string _id); virtual int add(class Benchmark *_benchmark); virtual int remove(class Compiler *_compiler); virtual int remove(CBM_OS *_set); virtual int remove(CBM_OS *_set, CBM_OP *_opt); virtual int remove(class Benchmark *_benchmark); virtual int compilerNumber(void); virtual int compilerOptionSetNumber(void); virtual int compilerOptionsTotalNumber(void); virtual int benchmarkNumber(void); virtual class Compiler* getCompiler(int _index); virtual CBM_OS *getCompilerOptionSet(int _index); virtual CBM_OS *getCompilerOptionSet(std::string id); virtual CBM_BM *getBenchmark(int _index); virtual int totalIterations(void); virtual int currentIteration(void); virtual void setIteration(int _it); virtual class Compiler* currentCompiler(void); virtual CBM_OP *currentCompilerOptions(void); virtual class Benchmark *currentBenchmark(void); ! /** 0 means end. */ virtual int nextIteration(int simule = 0); virtual void stop(int _broadcast); ! class XMLNode *XML(void); virtual void reset(void); virtual int restore(XMLNode *_planRootNode); virtual ~PlanBatch(); }; --- 52,326 ---- /** Current iteration. + * * This value represents the index of the current benchmarking evaluation ! * within the CBM::PlanBatch instance; index is computed according to ! * option set number, compiler number, selected benchmarks' number, and ! * number of evaluations per benchmarks. */ int iteration; + /** Detect if a compiler has already been selected. + * + * \param _compiler Compiler to check. + * \return 0 if the compiler is already in list, 1 otherwise. + */ virtual int isUnique(class Compiler *_compiler); ! /** Compiler language compilibility. ! * ! * \param _lang Language (C, C++ at this time) ! * \return 1 if all selected compilers are compatible with given language, 0 ! * otherwise */ virtual int isLanguageCompatibleWithCompilers(std::string _lang); + + /** Benchmark language compilibility. + * + * \param _lang Language (C, C++ at this time) + * \return 1 if all selected benchmarks are compatible with given language, 0 + * otherwise */ virtual int isLanguageCompatibleWithBenchmarks(std::string _lang); + /** Detect if an option set has already been selected. + * + * \param _set Option set. + * \return 0 if option set has already been selected, 0 otherwise. */ virtual int isUnique(CBM_OS *_set); + + /** Detect if a benchmark has already been selected. + * + * \param _benchmark Benchmark + * \return 0 if benchmark has already been selected, 0 otherwise. */ virtual int isUnique(class Benchmark *_benchmark); + /** Initialize selected benchmarks from XML. + * + * \param _benchmarksNode XML node used to initialize selected benchmarks' list */ virtual void restoreBenchmarks(class XMLNode *_benchmarksNode); + + /** Initialize option sets from XML. + * + * \param _cosNode XML node used to initialize option sets */ virtual void restoreCompilerOptionSet(class XMLNode *_cosNode); + + /** Initialize compiler list from XML. + * + * \param _compilersNode XML node used to initialize compilers' list */ virtual void restoreCompilers(class XMLNode *_compilersNode); public: ! /** Constructor. ! * \param _plan Parent plan object ! * \param _id Internal identifier ! */ ! PlanBatch(CBM::Plan *_plan, std::string _id); + /** Get internal identifier. + * \return Internal identifier for instance (user defined label). */ virtual std::string Id(void); + + /** Set internal identifier. + * \param _id Internal identifier for instance (user defined label). */ virtual void setId(std::string _id); + + /** Check and select a compiler. + * + * \param _compiler Compiler to be added + * \return 1 on success, 0 otherwise + */ virtual int add(class Compiler *_compiler); + + /** Check and select an option set. + * + * \param _set Option set to be added + * \return 1 on success, 0 otherwise + */ virtual int add(CBM_OS *_set); + + /** Add new options. + * + * \param _set Option set + * \param _id Internal label (identifier) for new options + * + * \return Pointer to options holder + */ + virtual CBM_OP *addOptions(CBM_OS *_set, std::string _id); + /** Add new benchmark. + * + * \param _benchmark Benchmark to be added + * \return 1 on success, 0 otherwise */ virtual int add(class Benchmark *_benchmark); + /** Remove a compiler. + * + * \param _compiler Compiler to remove + * \return 1 on success, 0 otherwise */ virtual int remove(class Compiler *_compiler); + + /** Remove an option set. + * + * \param _set Option set to remove + * \return 1 on success, 0 otherwise */ virtual int remove(CBM_OS *_set); + /** Remove options from a set. + * + * \param _set Option set + * \param _opt Options to remove from set + * \return 1 on success, 0 otherwise */ virtual int remove(CBM_OS *_set, CBM_OP *_opt); + /** Remove a benchmark. + * + * \param _benchmark Benchmark to remove + * \return 1 on success, 0 otherwise */ + virtual int remove(class Benchmark *_benchmark); + /** Get compiler number. + * + * Get number of compilers used within batch. + * \return Number of compilers + */ virtual int compilerNumber(void); + + /** Get option set number. + * + * Get number of option set used within batch. + * \return Number of option set + */ virtual int compilerOptionSetNumber(void); + /** Get options number. + * + * Get total number of options defined in all option set (through + * child CompilerOptions objects). + * \return Number of options + */ virtual int compilerOptionsTotalNumber(void); + /** Get benchmark number. + * + * Get number of benchmarks used within batch. + * \return Number of benchmarks + */ virtual int benchmarkNumber(void); + /** Get a compiler by its index. + * \param _index Compiler index + * \return Pointer to compiler + * \sa compilerNumber() + */ virtual class Compiler* getCompiler(int _index); + + /** Get an option set by its index. + * \param _index Option set index + * \return Pointer to an option set + * \sa compilerOptionSetNumber() + */ virtual CBM_OS *getCompilerOptionSet(int _index); + + /** Get an option set by its identifier. + * \param id Option set identifier + * \return Pointer to selected option set + */ virtual CBM_OS *getCompilerOptionSet(std::string id); + /** Get an benchmark by its index + * \param _index Benchmark's index + * \return Pointer to benchmark object + */ virtual CBM_BM *getBenchmark(int _index); + /** Get total number of iterations. + * \return Iterations + * \sa iteration + */ virtual int totalIterations(void); + /** Get current iteration. + * \return Current iteration + * \sa iteration + */ virtual int currentIteration(void); + + /** Set current iteration index. + * + * This is especialy useful on loading. + * + * \param _it (new) current iteration + * \sa restore() + * \sa iteration + */ virtual void setIteration(int _it); + /** Get current compiler. + * \return Current compiler + * \sa currentIteration() + */ virtual class Compiler* currentCompiler(void); + + /** Get current options. + * \return Current options + * \sa currentIteration() + */ virtual CBM_OP *currentCompilerOptions(void); + + /** Get current benchmark. + * \return Current benchmark + * \sa currentBenchmark() + */ virtual class Benchmark *currentBenchmark(void); ! ! /** Run an iteration. ! * ! * This method try to benchmark current compiler with current options, ! * and current benchmark. ! * ! * \sa currentCompiler() ! * \sa currentCompilerOptions() ! * \sa currentBenchmark() ! * \param simule set to 1 to not execute benchmark, and just display parameters ! * \return 0 if we've reach the end of the batch, 1 otherwise */ virtual int nextIteration(int simule = 0); + /** Stop current benchmarking. + * + * Initialize internal contexts, and set iteration to 0. This method is + * called on restore() when current and saved contexts differ. + * + * \param _broadcast Informs parent CBM::Plan object + * \sa iteration + */ virtual void stop(int _broadcast); ! ! /** Get XML representation. ! * ! * This include current iteration. ! * ! * \return XML Patch representation */ class XMLNode *XML(void); + /** Reset current benchmarking. + * + * Initialize internal contexts, and set iteration to 0. This method is + * called to restart a whole CBM::Plan or CBM::PlanBatch object. + * + * \sa iteration + */ virtual void reset(void); + + /** Restore instance parameter from XML. + * \param _planRootNode XML representation of a batch + * \return 1 on success, 0 otherwise + */ virtual int restore(XMLNode *_planRootNode); + /** Destructor */ virtual ~PlanBatch(); }; |
From: Frederic T. <xf...@us...> - 2007-09-04 20:03:00
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv19057 Modified Files: Compiler-Option-Description.h Compiler-Option.h Compiler-OptionSet.h Compiler-Options.h Log Message: For SF's TID #141819 : improving Doxygen documentation. Index: Compiler-Options.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Options.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Compiler-Options.h 31 Jul 2007 17:23:13 -0000 1.5 --- Compiler-Options.h 4 Sep 2007 20:02:55 -0000 1.6 *************** *** 17,22 **** * * This class defines the base object for all options to supported compilers. ! * It only stores options (std::string, or char*) into an object and allows ! * querying them. */ class CompilerOptions --- 17,22 ---- * * This class defines the base object for all options to supported compilers. ! * It only stores options (CBM::CompilerOption instances) into an object ! * and allows querying them. */ class CompilerOptions *************** *** 27,63 **** */ std::vector<CBM::CompilerOption*> options; std::string id; protected: virtual void add(CBM::CompilerOption *_option); virtual void remove(CBM::CompilerOption *_option); virtual int addSingle(std::string _option); virtual int removeSingle(std::string _option); public: ! /** Constructor ! \param _options Options to manage in current object. ! */ CompilerOptions(std::string id, std::string _options = ""); virtual std::string Id(void); virtual CompilerOption *Option(std::string _id); virtual CompilerOption *Option(int i); virtual int optionNumber(void); virtual int add(std::string _options); virtual int remove(std::string _options); /** Retrives options ! \return Options (to compiler instance) declared in constructor */ virtual std::string Options(void); virtual XMLNode *XML(void); virtual void restore(XMLNode *_from); virtual ~CompilerOptions(); }; --- 27,116 ---- */ std::vector<CBM::CompilerOption*> options; + + /** Identifier for instance. */ std::string id; protected: + /** Add an option. + * + * \param _option Option to add + */ virtual void add(CBM::CompilerOption *_option); + + /** Remove an option. + * + * \param _option Option to remove + */ virtual void remove(CBM::CompilerOption *_option); + /** Add an option. + * + * \param _option Option to add + * \return 1 on success, 0 otherwise + */ virtual int addSingle(std::string _option); + + /** Remove an option. + * + * \param _option Option to remove + * \return 1 on success, 0 otherwise + */ virtual int removeSingle(std::string _option); public: ! /** Constructor. ! * ! * \param id Instance's identifier ! * \param _options Options to manage in current object ! */ CompilerOptions(std::string id, std::string _options = ""); + /** Retrieve identifier. + * \return Current instance internal identifier */ virtual std::string Id(void); + /** Retrieve an option by its identifier. + * \param _id Option's identifier + * \return Option instance */ virtual CompilerOption *Option(std::string _id); + + /** Retrieve an option by its index. + * \param i Option's index + * \return Option instance + * \sa optionNumber() */ virtual CompilerOption *Option(int i); + /** Retrive options' number + * \return Number of option in instance. + * \sa Option(int) */ virtual int optionNumber(void); + /** Add a bunch of options + * + * \param _options Options to add + * \return 1 on success, 0 otherwise */ virtual int add(std::string _options); + + /** Remove a bunch of options + * + * \param _options Options to remove + * \return 1 on success, 0 otherwise */ virtual int remove(std::string _options); /** Retrives options ! \return Options defined */ virtual std::string Options(void); + /** Retrives XML representation. + * \return Internal XML object representation */ virtual XMLNode *XML(void); + + /** Initialize from an XML representation. + * + * \param _from XML description to use for initialization */ virtual void restore(XMLNode *_from); + /** Destructor */ virtual ~CompilerOptions(); }; Index: Compiler-Option.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Compiler-Option.h 17 May 2007 14:29:47 -0000 1.1 --- Compiler-Option.h 4 Sep 2007 20:02:55 -0000 1.2 *************** *** 22,26 **** * \sa Options() */ - std::string option; --- 22,25 ---- *************** *** 28,44 **** public: ! /** Constructor ! \param _options Options to manage in current object. */ CompilerOption(std::string _option); CompilerOption(); ! /** Retrives option ! \return Option (to compiler instance) declared in constructor */ virtual std::string Option(void); virtual XMLNode *XML(void); virtual void restore(XMLNode *_from); virtual ~CompilerOption(); }; --- 27,55 ---- public: ! /** Constructor. ! * ! \param _option Options to manage in current object. */ CompilerOption(std::string _option); + + /** Constructor. */ CompilerOption(); ! /** Retrives option. ! * ! * \return Option (to compiler instance) declared in constructor */ virtual std::string Option(void); + /** Retrives XML representation. + * \return XML object representation + */ virtual XMLNode *XML(void); + + /** Initialize instance from XML + * \param _from XML description to initialize current instance. + */ virtual void restore(XMLNode *_from); + /** Destructor. */ virtual ~CompilerOption(); }; Index: Compiler-Option-Description.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-Option-Description.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Compiler-Option-Description.h 4 Sep 2007 19:45:50 -0000 1.9 --- Compiler-Option-Description.h 4 Sep 2007 20:02:55 -0000 1.10 *************** *** 193,196 **** --- 193,197 ---- /** Returns a description by its litteral option. * + * \param _litt Litteral option (as -O2). * \return Option's description * \sa Description(std::string _id) Index: Compiler-OptionSet.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Compiler/Compiler-OptionSet.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Compiler-OptionSet.h 30 May 2007 17:01:35 -0000 1.2 --- Compiler-OptionSet.h 4 Sep 2007 20:02:55 -0000 1.3 *************** *** 29,51 **** namespace CBM { /** \brief Class for handling a set of compiler's options */ class CompilerOptionSet { private: std::vector<CBM_CO*> options; std::string id; protected: public: ! /** Constructor */ CompilerOptionSet(std::string _id); virtual std::string Id(void); virtual void setId(std::string _id); virtual CBM_CO *get(std::string _id); virtual CBM_CO *add(std::string _id); virtual CBM_CO *add(CBM_CO *_options); --- 29,72 ---- namespace CBM { /** \brief Class for handling a set of compiler's options + * + * A set of options is basically a set of CBM::CompilerOptions (many + * instances representing "-O2 -march=[...]", "-O3", and so on) which + * will be considered and applied in order of appearance. */ class CompilerOptionSet { private: + /** Options definition. */ std::vector<CBM_CO*> options; + /** Internal identifier. */ std::string id; protected: public: ! /** Constructor. ! * \param _id Internal identifier */ CompilerOptionSet(std::string _id); + /** Retrives identifer. + * \param Internal instance's identifier */ virtual std::string Id(void); + + /** Set identifier. + * \param _id New identifier. + */ virtual void setId(std::string _id); + /** Get options according to an CBM::CompilerOptions identifier. + * \param _id Identifier + * \return CBM::CompilerOptions instance */ virtual CBM_CO *get(std::string _id); + /** Creates a new CBM::CompilerOptions instance. + * \param _id CBM::CompilerOptions' identifier. + */ virtual CBM_CO *add(std::string _id); + + virtual CBM_CO *add(CBM_CO *_options); |