 |
VTK
9.1.0
|
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);
108 this->SetFileName(fileName.c_str());
131 template <
typename T>
183 vtkSetMacro(WriteOnClose,
int);
184 vtkGetMacro(WriteOnClose,
int);
192 vtkSetMacro(GlobalLevel,
int);
193 vtkGetMacro(GlobalLevel,
int);
207 class VTKRENDERINGPARALLELLIC_EXPORT vtkParallelTimerDestructor
210 vtkParallelTimerDestructor()
214 ~vtkParallelTimerDestructor();
229 std::vector<double> StartTime;
230 #if vtkParallelTimerDEBUG < 0
231 std::vector<std::string> EventId;
234 vtkParallelTimerBuffer* Log;
237 static vtkParallelTimerDestructor GlobalInstanceDestructor;
239 std::ostringstream HeaderBuffer;
246 template <
typename T>
249 if (this->WorldRank == this->WriterRank)
251 this->HeaderBuffer << s;
252 #if vtkParallelTimerDEBUG > 0
260 template <
typename T>
265 if (log->WorldRank == log->WriterRank)
267 log->HeaderBuffer << s;
268 #if vtkParallelTimerDEBUG > 0
277 template <
typename T>
283 #if vtkParallelTimerDEBUG > 0
void StartEvent(const char *event)
The log works as an event stack.
void StartEvent(int rank, const char *event)
The log works as an event stack.
int Write()
Write the log contents to a file.
Provides distributed log functionality.
void SetFileName(VTK_FILEPATH const std::string &fileName)
static vtkParallelTimer * GetGlobalInstance()
The log class implements the singleton pattern so that it may be shared across class boundaries.
vtkSetFilePathMacro(FileName)
Set the filename that is used during write when the object is used as a singleton.
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.
vtkGetFilePathMacro(FileName)
Set the filename that is used during write when the object is used as a singleton.
void EndEvent(const char *event)
The log works as an event stack.
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)
The log works as an event stack.
friend VTKCOMMONCORE_EXPORT ostream & operator<<(ostream &os, vtkObjectBase &o)
void EndEventSynch(const char *event)
The log works as an event stack.
Type used to direct an output stream into the log's body.
void EndEventSynch(int rank, const char *event)
The log works as an event stack.