[Compbench-devel] CompBenchmarks++/libcompbenchmarks/Base Config.h, 1.7, 1.8 XML.h, 1.5, 1.6
Brought to you by:
xfred
From: Frederic T. <xf...@us...> - 2007-05-01 14:40:40
|
Update of /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv28058 Modified Files: Config.h XML.h Log Message: Updated documentation. Index: XML.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/XML.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** XML.h 25 Jan 2007 16:57:09 -0000 1.5 --- XML.h 1 May 2007 14:40:35 -0000 1.6 *************** *** 168,171 **** --- 168,172 ---- virtual std::string str(int _indent = 0); + /** Destructor */ virtual ~XMLNode(); }; Index: Config.h =================================================================== RCS file: /cvsroot/compbench/CompBenchmarks++/libcompbenchmarks/Base/Config.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Config.h 19 Apr 2007 17:51:09 -0000 1.7 --- Config.h 1 May 2007 14:40:35 -0000 1.8 *************** *** 100,127 **** CBM::Package::Status _status); virtual void setContext(std::string _bid, class Compiler *_currentCompiler, class CompilerOptions *_currentOptions); virtual std::string getContextCompiler(std::string _bid); - virtual std::string getContextCompilerOptions(std::string _bid); virtual int contextMatches(std::string _bid, class Compiler *_currentCompiler, class CompilerOptions *_currentOptions); virtual void contextReset(std::string _bid); virtual std::string Path(CBM::System::Dir dir); virtual std::string str(void); virtual void setPlan(XMLNode *_plan); virtual int Changes(void); virtual void ignoreChanges(void); ! /** Destructor */ virtual ~Config(); }; --- 100,182 ---- CBM::Package::Status _status); + /** Set benchmark's context + * For a benchmark, a context keeps the compiler and options used at compilation + * time. This prevent re-compilation when performance evaluation on same + * compiler/options pairs is asked (e.g. through CBM::Benchmark::Bench(). + * \param _bid Benchmark's ID + * \param _currrentCompiler Compiler instance + * \param _currentOptions Options + * \sa contextMatches() + * \sa CBM::Compiler + * \sa CBM::Benchmark + * \sa CBM::Package */ virtual void setContext(std::string _bid, class Compiler *_currentCompiler, class CompilerOptions *_currentOptions); + /** Retrieve compiler previously used + * Restore compiler stored by setContext() + * \param _bid Benchmark's ID + * \return std::string holding compiler's binary + */ virtual std::string getContextCompiler(std::string _bid); + /** Retrieves options previously used + * Restore options stored by setContext() + * \param _bid Benchmark's ID + * \return std::string holding options */ + virtual std::string getContextCompilerOptions(std::string _bid); + + /** Check if previous context matches previous one + * This method avoids useless compilation passes when a benchmark/package is + * asked to be compilated with same options. + * \param _bid Benchmark's ID + * \param _currrentCompiler Compiler instance + * \param _currentOptions Options + * \return 1 if ok, 0 is context doesn't match. + * \sa setContext() + */ virtual int contextMatches(std::string _bid, class Compiler *_currentCompiler, class CompilerOptions *_currentOptions); + /** Reset benchmark's context + * Used in CBM::Package::Release() to invalidate current context. + * \param _bid Benchmark's ID + * \sa contextMatches() + */ virtual void contextReset(std::string _bid); + /** Returns a libcompbenchmarks path + * Many default/user set paths are used to store packages, uncompress or compile + * them and so on. This method retrieves them. + * \parma dir Directory/Path ID + * \return Path as std::string */ virtual std::string Path(CBM::System::Dir dir); + /** Returns related XML configuration data as std::string + * \return Configuration (XML dump to std::string) */ virtual std::string str(void); + /** Set a new Plan node + * A plan holds all options to apply to selected compilers for a bunch of + * benchmarks. This method set these data. + * \param _plan New plan settings + * \sa CBM::Plan + */ virtual void setPlan(XMLNode *_plan); + /** Detect changes + * \return 1 if configuration has changed since last save. + */ virtual int Changes(void); + /** Don't save changes + * Disable automatic saving of configuration changes */ virtual void ignoreChanges(void); ! /** Destructor ! * !!! May (re-)write file specified in Config() construction if Changes() returns 1 ! * and ignoreChanges() has not been called. */ virtual ~Config(); }; |