timer_internal_graph.hxx

00001 // timer_internal_graph.hxx: this file is part of the Vaucanson project.
00002 //
00003 // Vaucanson, a generic library for finite state machines.
00004 //
00005 // Copyright (C) 2006, 2007 The Vaucanson Group.
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 //
00012 // The complete GNU General Public Licence Notice can be found as the
00013 // `COPYING' file in the root directory.
00014 //
00015 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
00016 //
00017 
00026 #ifndef VCSN_MISC_TIMER_INTERNAL_GRAPH_HXX
00027 # define VCSN_MISC_TIMER_INTERNAL_GRAPH_HXX
00028 
00029 # ifdef VAUCANSON
00030 #  include <vaucanson/misc/timer_internal_graph.hh>
00031 # else
00032 #  include "timer_internal_graph.hh"
00033 # endif
00034 
00035 NAMESPACE_VCSN_BEGIN
00036 
00037 namespace misc
00038 {
00039   namespace timer
00040   {
00041     /*----------------------.
00042     | Timer::GraphTask.     |
00043     `----------------------*/
00044 
00045     inline
00046     bool
00047     GraphTask::operator< (const GraphTask& task) const
00048     {
00049       return self.cpu == task.self.cpu ?
00050         id < task.id :
00051         self.cpu > task.self.cpu;
00052     }
00053 
00054     /*------------------------.
00055     | Timer::GraphComponent.  |
00056     `------------------------*/
00057 
00058     inline
00059     void
00060     GraphComponent::add_call_out (GraphCall&    call)
00061     {
00062       out_calls += call.count;
00063 
00064       calls_out.push_back (&call);
00065     }
00066 
00067     inline
00068     void
00069     GraphComponent::add_call_internal (GraphCall&       call)
00070     {
00071       int_calls += call.count;
00072     }
00073 
00074   } // namespace timer
00075 } // namespace misc
00076 
00077 NAMESPACE_VCSN_END
00078 
00079 #endif 

Generated on Sun Jul 29 19:35:30 2007 for Vaucanson by  doxygen 1.5.2