37 #ifndef vtkParallelTimer_h
38 #define vtkParallelTimer_h
40 #define vtkParallelTimerDEBUG -1
43 #include "vtkRenderingParallelLICModule.h"
49 #if vtkParallelTimerDEBUG > 0
54 class vtkParallelTimerBuffer;
85 vtkSetMacro(WriterRank,
int);
86 vtkGetMacro(WriterRank,
int);
92 vtkSetStringMacro(FileName);
93 vtkGetStringMacro(FileName);
96 { this->SetFileName(fileName.c_str()); }
107 void StartEvent(
const char *event);
108 void StartEvent(
int rank,
const char *event);
109 void EndEvent(
const char *event);
110 void EndEvent(
int rank,
const char *event);
111 void EndEventSynch(
const char *event);
112 void EndEventSynch(
int rank,
const char *event);
156 static void DeleteGlobalInstance();
161 vtkSetMacro(WriteOnClose,
int);
162 vtkGetMacro(WriteOnClose,
int);
168 vtkSetMacro(GlobalLevel,
int);
169 vtkGetMacro(GlobalLevel,
int);
183 class VTKRENDERINGPARALLELLIC_EXPORT vtkParallelTimerDestructor
186 vtkParallelTimerDestructor() : Log(0) {}
187 ~vtkParallelTimerDestructor();
204 std::vector<double> StartTime;
205 #if vtkParallelTimerDEBUG < 0
206 std::vector<std::string> EventId;
209 vtkParallelTimerBuffer *Log;
212 static vtkParallelTimerDestructor GlobalInstanceDestructor;
214 std::ostringstream HeaderBuffer;
225 if (this->WorldRank == this->WriterRank)
227 this->HeaderBuffer << s;
228 #if vtkParallelTimerDEBUG > 0
241 if (log->WorldRank == log->WriterRank)
243 log->HeaderBuffer << s;
244 #if vtkParallelTimerDEBUG > 0
259 #if vtkParallelTimerDEBUG > 0
friend class LogHeaderType
abstract base class for most VTK objects
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
LogBodyType & operator<<(const T &s)
void SetFileName(const std::string &fileName)
static vtkParallelTimer * GetGlobalInstance()
vtkParallelTimer::LogBodyType GetBody()
VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, const vtkIndent &o)
vtkParallelTimer::LogHeaderType GetHeader()
friend VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, vtkObjectBase &o)
vtkParallelTimer & operator<<(const T &s)