 |
VTK
9.0.1
|
Go to the documentation of this file.
38 #ifndef vtkParallelTimer_h
39 #define vtkParallelTimer_h
41 #define vtkParallelTimerDEBUG -1
44 #include "vtkRenderingParallelLICModule.h"
49 #if vtkParallelTimerDEBUG > 0
53 class vtkParallelTimerBuffer;
92 vtkSetMacro(WriterRank,
int);
93 vtkGetMacro(WriterRank,
int);
102 vtkSetStringMacro(FileName);
103 vtkGetStringMacro(FileName);
128 template <
typename T>
180 vtkSetMacro(WriteOnClose,
int);
181 vtkGetMacro(WriteOnClose,
int);
189 vtkSetMacro(GlobalLevel,
int);
190 vtkGetMacro(GlobalLevel,
int);
204 class VTKRENDERINGPARALLELLIC_EXPORT vtkParallelTimerDestructor
207 vtkParallelTimerDestructor()
211 ~vtkParallelTimerDestructor();
226 std::vector<double> StartTime;
227 #if vtkParallelTimerDEBUG < 0
228 std::vector<std::string> EventId;
231 vtkParallelTimerBuffer* Log;
234 static vtkParallelTimerDestructor GlobalInstanceDestructor;
236 std::ostringstream HeaderBuffer;
243 template <
typename T>
246 if (this->WorldRank == this->WriterRank)
248 this->HeaderBuffer << s;
249 #if vtkParallelTimerDEBUG > 0
257 template <
typename T>
262 if (log->WorldRank == log->WriterRank)
264 log->HeaderBuffer << s;
265 #if vtkParallelTimerDEBUG > 0
274 template <
typename T>
280 #if vtkParallelTimerDEBUG > 0
void StartEvent(const char *event)
The log works as an event stack.
void StartEvent(int rank, const char *event)
int Write()
Write the log contents to a file.
Provides distributed log functionality.
static vtkParallelTimer * GetGlobalInstance()
The log class implements the singleton pattern so that it may be shared across class boundaries.
virtual ~vtkParallelTimer()
abstract base class for most VTK objects
LogBodyType & operator<<(const T &s)
vtkParallelTimer::LogBodyType GetBody()
stream output to log body(all ranks).
void Update()
When an object is finished writing data to the log object it must call Update to send the data to the...
vtkParallelTimer::LogHeaderType GetHeader()
stream output to the log's header(root rank only).
vtkParallelTimer & operator<<(const T &s)
Insert text into the log header on the writer rank.
void Clear()
Clear the log.
friend class LogHeaderType
static void DeleteGlobalInstance()
Explicitly delete the singleton.
void EndEvent(const char *event)
a simple class to control print indentation
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkParallelTimer * New()
void EndEvent(int rank, const char *event)
friend VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, vtkObjectBase &o)
void EndEventSynch(const char *event)
Type used to direct an output stream into the log's body.
void EndEventSynch(int rank, const char *event)
void SetFileName(const std::string &fileName)