• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/tmp/buildd/coinor-ipopt-3.8.3/Ipopt/src/Algorithm/IpTimingStatistics.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2005, 2008 International Business Machines and others.
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // $Id: IpTimingStatistics.hpp 1324 2008-09-16 14:19:26Z andreasw $
00006 //
00007 // Authors:  Andreas Waechter               IBM    2005-09-19
00008 
00009 #ifndef __IPTIMINGSTATISTICS_HPP__
00010 #define __IPTIMINGSTATISTICS_HPP__
00011 
00012 #include "IpReferenced.hpp"
00013 #include "IpJournalist.hpp"
00014 #include "IpTimedTask.hpp"
00015 
00016 #ifdef HAVE_CTIME
00017 # include <ctime>
00018 #else
00019 # ifdef HAVE_TIME_H
00020 #  include <time.h>
00021 # else
00022 #  error "don't have header file for time"
00023 # endif
00024 #endif
00025 
00026 // The following lines are copied from CoinTime.hpp
00027 // We should probably make some more tests here
00028 #if defined(_MSC_VER)
00029 // Turn off compiler warning about long names
00030 #  pragma warning(disable:4786)
00031 #else
00032 // MacOS-X and FreeBSD needs sys/time.h
00033 # if defined(__MACH__) || defined (__FreeBSD__)
00034 #  include <sys/time.h>
00035 # endif
00036 # if !defined(__MSVCRT__)
00037 #  include <sys/resource.h>
00038 # endif
00039 #endif
00040 
00041 namespace Ipopt
00042 {
00045   class TimingStatistics : public ReferencedObject
00046   {
00047   public:
00051     TimingStatistics()
00052     {}
00053 
00055     virtual ~TimingStatistics()
00056     {}
00058 
00060     void ResetTimes();
00061 
00063     void PrintAllTimingStatistics(Journalist& jnlst,
00064                                   EJournalLevel level,
00065                                   EJournalCategory category) const;
00066 
00069     TimedTask& OverallAlgorithm()
00070     {
00071       return OverallAlgorithm_;
00072     }
00073     TimedTask& PrintProblemStatistics()
00074     {
00075       return PrintProblemStatistics_;
00076     }
00077     TimedTask& InitializeIterates()
00078     {
00079       return InitializeIterates_;
00080     }
00081     TimedTask& UpdateHessian()
00082     {
00083       return UpdateHessian_;
00084     }
00085     TimedTask& OutputIteration()
00086     {
00087       return OutputIteration_;
00088     }
00089     TimedTask& UpdateBarrierParameter()
00090     {
00091       return UpdateBarrierParameter_;
00092     }
00093     TimedTask& ComputeSearchDirection()
00094     {
00095       return ComputeSearchDirection_;
00096     }
00097     TimedTask& ComputeAcceptableTrialPoint()
00098     {
00099       return ComputeAcceptableTrialPoint_;
00100     }
00101     TimedTask& AcceptTrialPoint()
00102     {
00103       return AcceptTrialPoint_;
00104     }
00105     TimedTask& CheckConvergence()
00106     {
00107       return CheckConvergence_;
00108     }
00109 
00110     TimedTask& PDSystemSolverTotal()
00111     {
00112       return PDSystemSolverTotal_;
00113     }
00114     TimedTask& PDSystemSolverSolveOnce()
00115     {
00116       return PDSystemSolverSolveOnce_;
00117     }
00118     TimedTask& ComputeResiduals()
00119     {
00120       return ComputeResiduals_;
00121     }
00122     TimedTask& StdAugSystemSolverMultiSolve()
00123     {
00124       return StdAugSystemSolverMultiSolve_;
00125     }
00126     TimedTask& LinearSystemScaling()
00127     {
00128       return LinearSystemScaling_;
00129     }
00130     TimedTask& LinearSystemSymbolicFactorization()
00131     {
00132       return LinearSystemSymbolicFactorization_;
00133     }
00134     TimedTask& LinearSystemFactorization()
00135     {
00136       return LinearSystemFactorization_;
00137     }
00138     TimedTask& LinearSystemBackSolve()
00139     {
00140       return LinearSystemBackSolve_;
00141     }
00142     TimedTask& LinearSystemStructureConverter()
00143     {
00144       return LinearSystemStructureConverter_;
00145     }
00146     TimedTask& LinearSystemStructureConverterInit()
00147     {
00148       return LinearSystemStructureConverterInit_;
00149     }
00150     TimedTask& QualityFunctionSearch()
00151     {
00152       return QualityFunctionSearch_;
00153     }
00154     TimedTask& TryCorrector()
00155     {
00156       return TryCorrector_;
00157     }
00158 
00159     TimedTask& Task1()
00160     {
00161       return Task1_;
00162     }
00163     TimedTask& Task2()
00164     {
00165       return Task2_;
00166     }
00167     TimedTask& Task3()
00168     {
00169       return Task3_;
00170     }
00171     TimedTask& Task4()
00172     {
00173       return Task4_;
00174     }
00175     TimedTask& Task5()
00176     {
00177       return Task5_;
00178     }
00179     TimedTask& Task6()
00180     {
00181       return Task6_;
00182     }
00184 
00185   private:
00195     TimingStatistics(const TimingStatistics&);
00196 
00198     void operator=(const TimingStatistics&);
00200 
00203     TimedTask OverallAlgorithm_;
00204     TimedTask PrintProblemStatistics_;
00205     TimedTask InitializeIterates_;
00206     TimedTask UpdateHessian_;
00207     TimedTask OutputIteration_;
00208     TimedTask UpdateBarrierParameter_;
00209     TimedTask ComputeSearchDirection_;
00210     TimedTask ComputeAcceptableTrialPoint_;
00211     TimedTask AcceptTrialPoint_;
00212     TimedTask CheckConvergence_;
00213 
00214     TimedTask PDSystemSolverTotal_;
00215     TimedTask PDSystemSolverSolveOnce_;
00216     TimedTask ComputeResiduals_;
00217     TimedTask StdAugSystemSolverMultiSolve_;
00218     TimedTask LinearSystemScaling_;
00219     TimedTask LinearSystemSymbolicFactorization_;
00220     TimedTask LinearSystemFactorization_;
00221     TimedTask LinearSystemBackSolve_;
00222     TimedTask LinearSystemStructureConverter_;
00223     TimedTask LinearSystemStructureConverterInit_;
00224     TimedTask QualityFunctionSearch_;
00225     TimedTask TryCorrector_;
00226 
00227     TimedTask Task1_;
00228     TimedTask Task2_;
00229     TimedTask Task3_;
00230     TimedTask Task4_;
00231     TimedTask Task5_;
00232     TimedTask Task6_;
00234   };
00235 
00236 } // namespace Ipopt
00237 
00238 #endif

Generated on Thu Jul 29 2010 19:56:08 by  doxygen 1.7.1